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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
87964fbc9891ff94eb638d26b841b3d1b9e3d7bd | f15889af407de46a94fd05f6226c66182c6085d0 | /trackrite/src/test/java/org/witchcraft/action/test/AbstractTestDataFactory.java | 17c70c4fb23fb9de4df88bb2f22975b1ba56563c | [] | no_license | oreon/sfcode-full | 231149f07c5b0b9b77982d26096fc88116759e5b | bea6dba23b7824de871d2b45d2a51036b88d4720 | refs/heads/master | 2021-01-10T06:03:27.674236 | 2015-04-27T10:23:10 | 2015-04-27T10:23:10 | 55,370,912 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,007 | java | package org.witchcraft.action.test;
import java.lang.reflect.Array;
import java.lang.reflect.GenericArrayType;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import javax.faces.FactoryFinder;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import org.hibernate.exception.ConstraintViolationException;
import org.jboss.seam.Seam;
import org.jboss.seam.contexts.ServletLifecycle;
import org.jboss.seam.core.Init;
import org.jboss.seam.init.Initialization;
import org.jboss.seam.mock.MockApplicationFactory;
import org.jboss.seam.mock.MockServletContext;
import org.witchcraft.exceptions.ContractViolationException;
public abstract class AbstractTestDataFactory<T> {
private static final String NOMBRE_PERSISTENCE_UNIT = "appEntityManager";
protected EntityManagerFactory emf;
protected EntityManager em;
public EntityManagerFactory getEntityManagerFactory() {
return emf;
}
public void init() {
emf = Persistence.createEntityManagerFactory(NOMBRE_PERSISTENCE_UNIT);
em = getEntityManagerFactory().createEntityManager();
}
void create() {
MockServletContext servletContext = new MockServletContext();
ServletLifecycle.beginApplication(servletContext);
FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY,
MockApplicationFactory.class.getName());
new Initialization(servletContext).create().init();
((Init) servletContext.getAttribute(Seam.getComponentName(Init.class)))
.setDebug(false);
}
protected void persist(T t) {
try {
em.getTransaction().begin();
em.persist(t);
em.getTransaction().commit();
} catch (ConstraintViolationException cve) {
System.out.println("Const Violation:" + cve.getMessage());
} catch (Exception e) {
System.out.println(e.getMessage());
} finally {
if (em.getTransaction().isActive())
em.getTransaction().rollback();
}
}
@SuppressWarnings("unchecked")
public T getRandomRecord() {
try {
if (getListOfRecords().isEmpty()) {
persistAll();
}
List<T> records = em.createQuery(getQuery()).getResultList();
return records.get(new Random().nextInt(records.size()));
} catch (Exception e) {
throw new ContractViolationException(
"error instaniating object of type ", e);
}
}
public abstract void persistAll();
public abstract List<T> getListOfRecords();
public abstract String getQuery();
protected String getClassName(T t) {
String name = t.getClass().getSimpleName();
if (name.indexOf("$$") > 0)
name = name.substring(0, name.indexOf("$$"));
return name;
}
@Override
protected void finalize() throws Throwable {
em.close();
emf.close();
super.finalize();
}
} | [
"singhj@38423737-2f20-0410-893e-9c0ab9ae497d"
] | singhj@38423737-2f20-0410-893e-9c0ab9ae497d |
c16b242f3cf8ef7d34f2f2aeec9ef04d131a7258 | 1913f62d7aa606d1d20fd5f595f49119f573631e | /unit-testing/src/test/java/org/tdd/example/junit/TestFixturesExampleTest.java | 4597478226936c43a378b27da7a5ce07aa0010eb | [] | no_license | codeprimate-software/test-driven-development | bc6503f8ffc52edd45dd826b87022d34e893c837 | 33259424501946c863a7ade0d00d18f6fd7a9d31 | refs/heads/master | 2021-01-15T11:40:45.285968 | 2015-07-25T08:14:36 | 2015-07-25T08:14:36 | 37,610,037 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,043 | java | package org.tdd.example.junit;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
/**
* The TestFixturesExampleTest class...
*
* @author John Blum
* @see org.junit.After
* @see org.junit.AfterClass
* @see org.junit.Before
* @see org.junit.BeforeClass
* @see org.junit.Test
* @since 1.0.0
*/
public class TestFixturesExampleTest {
@BeforeClass
public static void testSuiteSetup() {
System.out.println("Before Test Suite");
}
@AfterClass
public static void testSuiteTearDown() {
System.out.println("After Test Suite");
}
@Before
public void testCaseSetup() {
System.out.println("Before Test Case");
}
@After
public void testCaseTearDown() {
System.out.println("After Test Case");
}
@Test
public void one() {
System.out.println("Test Case 1");
}
@Test
public void two() {
System.out.println("Test Case 2");
}
@Test
public void three() {
System.out.println("Test Case 3");
}
}
| [
"jblum@pivotal.io"
] | jblum@pivotal.io |
4e3ef85b912d91dee09f0f52258efde917bcd937 | e586b2d10efd34152b68738c68a4579a04576a2c | /cc-kle/src/main/java/cc/creativecomputing/kle/elements/CCSequenceElementsRenderer.java | c67f42b4fb79f9ef0588cd2547a161e577086c33 | [] | no_license | dtbinh/creativecomputing | 69dd85920483f816977ae2c469508fbb96742af8 | 626b797ce90e34e84c55877e2fdf9f6e4fd48cdd | refs/heads/master | 2021-01-11T15:37:20.691423 | 2017-01-23T17:10:40 | 2017-01-23T17:10:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,294 | java | package cc.creativecomputing.kle.elements;
import cc.creativecomputing.core.CCProperty;
import cc.creativecomputing.graphics.CCGraphics;
import cc.creativecomputing.math.CCColor;
import cc.creativecomputing.math.CCMath;
public class CCSequenceElementsRenderer {
protected final CCSequenceElements _myElements;
@CCProperty(name = "rope color")
private CCColor _cRopeColor = new CCColor();
@CCProperty(name = "bound color")
private CCColor _cBoundColor = new CCColor();
public CCSequenceElementsRenderer(CCSequenceElements theElements){
_myElements = theElements;
}
public void drawElement(CCGraphics g, CCSequenceElement theElement){
}
public void draw(CCGraphics g){
for(CCSequenceElement myElement:_myElements){
g.pushMatrix();
g.applyMatrix(myElement.matrix());
g.color(_cRopeColor);
myElement.motorSetup().drawRopes(g);
if(_cBoundColor.a > 0){
g.color(_cBoundColor);
myElement.motorSetup().drawRangeBounds(g);
myElement.motorSetup().drawElementBounds(g);
}
g.pushAttribute();
g.pushMatrix();
g.translate(myElement.motorSetup().elementOffset());
g.rotateZ(CCMath.degrees(myElement.motorSetup().rotateZ()));
drawElement(g, myElement);
g.popMatrix();
g.popAttribute();
g.popMatrix();
}
}
}
| [
"info@texone.org"
] | info@texone.org |
3e61fefa8c313e9179b84bc1867eee08d27c1e71 | 8643a3eed82acddf80f93378fc1bca426bfd7a42 | /subprojects/core-api/src/main/java/org/gradle/api/initialization/resolve/RepositoriesMode.java | 17987c991ff1101e87e0acf4e4bad4ea9131c8f7 | [
"BSD-3-Clause",
"LGPL-2.1-or-later",
"LicenseRef-scancode-mit-old-style",
"EPL-2.0",
"CDDL-1.0",
"MIT",
"LGPL-2.1-only",
"Apache-2.0",
"MPL-2.0",
"EPL-1.0"
] | permissive | gradle/gradle | f5666240739f96166647b20f9bc2d57e78f28ddf | 1fd0b632a437ae771718982ef2aa1c3b52ee2f0f | refs/heads/master | 2023-09-04T02:51:58.940025 | 2023-09-03T18:42:57 | 2023-09-03T18:42:57 | 302,322 | 15,005 | 4,911 | Apache-2.0 | 2023-09-14T21:08:58 | 2009-09-09T18:27:19 | Groovy | UTF-8 | Java | false | false | 1,469 | java | /*
* Copyright 2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gradle.api.initialization.resolve;
import org.gradle.api.Incubating;
/**
* The repository mode configures how repositories are setup in the build.
*
* @since 6.8
*/
@Incubating
public enum RepositoriesMode {
/**
* If this mode is set, any repository declared on a project will cause
* the project to use the repositories declared by the project, ignoring
* those declared in settings.
*
* This is the default behavior.
*/
PREFER_PROJECT,
/**
* If this mode is set, any repository declared directly in a project,
* either directly or via a plugin, will be ignored.
*/
PREFER_SETTINGS,
/**
* If this mode is set, any repository declared directly in a project,
* either directly or via a plugin, will trigger a build error.
*/
FAIL_ON_PROJECT_REPOS;
}
| [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
2908e347bd2b7cdb770e2fa484a4696a87344afc | 2edfaee537ea7e532cc23dfec7703a96678ae0c2 | /src/main/java/com/contable/hibernate/model/Numeracion.java | 00c3df6890a8e338240fa2816981e358d05e54fe | [] | no_license | kaloyero/ZurbaranWebOriginal | 33efcc8f560d77036acdcd727964bec0df3892da | be6799890527b8b6388d6b092d104a61baac5e0e | refs/heads/master | 2020-12-31T02:49:36.754542 | 2015-07-17T09:59:01 | 2015-07-17T09:59:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,517 | java | package com.contable.hibernate.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;
import com.contable.common.beans.Form;
@Entity
@Table(name = "numeracion")
public class Numeracion implements Form {
/** Serial Version UID */
private static final long serialVersionUID = 1L;
public Numeracion() {
}
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name = "id", unique = true, nullable = false)
private int id ;
@Column(name = "NumeroLetra")
private String numeroLetra ;
@Column(name = "NumeroEstablecimiento")
private Integer numeroEstablecimiento ;
@Column(name = "NumeroAnio")
private Integer numeroAnio ;
@Column(name = "NumeroMes")
private Integer numeroMes ;
@Column(name = "NumeroDia")
private Integer numeroDia ;
@Column(name = "UltimoNumero")
private Integer ultimoNumero ;
@Column(name = "IdTipoDocumento")
private int tipoDocumentoId;
@Column(name = "IdAdministracion")
private Integer administracionId;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getNumeroLetra() {
return numeroLetra;
}
public void setNumeroLetra(String numeroLetra) {
this.numeroLetra = numeroLetra;
}
public Integer getNumeroEstablecimiento() {
return numeroEstablecimiento;
}
public void setNumeroEstablecimiento(Integer numeroEstablecimiento) {
this.numeroEstablecimiento = numeroEstablecimiento;
}
public Integer getNumeroAnio() {
return numeroAnio;
}
public void setNumeroAnio(Integer numeroAnio) {
this.numeroAnio = numeroAnio;
}
public Integer getNumeroMes() {
return numeroMes;
}
public void setNumeroMes(Integer numeroMes) {
this.numeroMes = numeroMes;
}
public Integer getNumeroDia() {
return numeroDia;
}
public void setNumeroDia(Integer numeroDia) {
this.numeroDia = numeroDia;
}
public Integer getUltimoNumero() {
return ultimoNumero;
}
public void setUltimoNumero(Integer ultimoNumero) {
this.ultimoNumero = ultimoNumero;
}
public int getTipoDocumentoId() {
return tipoDocumentoId;
}
public void setTipoDocumentoId(int tipoDocumentoId) {
this.tipoDocumentoId = tipoDocumentoId;
}
public Integer getAdministracionId() {
return administracionId;
}
public void setAdministracionId(Integer administracionId) {
this.administracionId = administracionId;
}
}
| [
"kaloye_ale@hotmail.com"
] | kaloye_ale@hotmail.com |
1807ec991c65458f48b541bca6113c9b6ea1ae2f | b3377380357479a592c2097ba0762bd9ae0ceef4 | /src/main/java/com/iinterchange/idepot/security/jwt/JWTConfigurer.java | 35be67a188cedaae59c061219823b549557ceb22 | [] | no_license | pramodkoshy1968/jhipster-sample-application | 40f03971181cd540d20e9155273a3ee956848cdc | 4bf996c0497fc7d0dd87eccd7c3a7caa06ea5083 | refs/heads/master | 2020-04-27T15:58:49.026090 | 2019-03-08T04:11:28 | 2019-03-08T04:11:28 | 174,467,396 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 863 | java | package com.iinterchange.idepot.security.jwt;
import org.springframework.security.config.annotation.SecurityConfigurerAdapter;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.web.DefaultSecurityFilterChain;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
public class JWTConfigurer extends SecurityConfigurerAdapter<DefaultSecurityFilterChain, HttpSecurity> {
private TokenProvider tokenProvider;
public JWTConfigurer(TokenProvider tokenProvider) {
this.tokenProvider = tokenProvider;
}
@Override
public void configure(HttpSecurity http) throws Exception {
JWTFilter customFilter = new JWTFilter(tokenProvider);
http.addFilterBefore(customFilter, UsernamePasswordAuthenticationFilter.class);
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
49b2f0c4b09e2f28485cd2ca50bb1b81e7e8d8c2 | c0fe21b86f141256c85ab82c6ff3acc56b73d3db | /mongodb/src/main/java/com/jdcloud/sdk/service/mongodb/model/CreateBackupSynchronicityResult.java | fe608c8b6f96a62f82f8df70e45191ef4acc8995 | [
"Apache-2.0"
] | permissive | jdcloud-api/jdcloud-sdk-java | 3fec9cf552693520f07b43a1e445954de60e34a0 | bcebe28306c4ccc5b2b793e1a5848b0aac21b910 | refs/heads/master | 2023-07-25T07:03:36.682248 | 2023-07-25T06:54:39 | 2023-07-25T06:54:39 | 126,275,669 | 47 | 61 | Apache-2.0 | 2023-09-07T08:41:24 | 2018-03-22T03:41:41 | Java | UTF-8 | Java | false | false | 1,647 | java | /*
* Copyright 2018 JDCLOUD.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.
*
* 跨区域备份管理
* API related to Relational MONGODB Service
*
* OpenAPI spec version: v1
* Contact:
*
* NOTE: This class is auto generated by the jdcloud code generator program.
*/
package com.jdcloud.sdk.service.mongodb.model;
import com.jdcloud.sdk.service.JdcloudResult;
/**
* 创建跨区域备份同步服务
*/
public class CreateBackupSynchronicityResult extends JdcloudResult implements java.io.Serializable {
private static final long serialVersionUID = 1L;
/**
* serviceId
*/
private String serviceId;
/**
* get serviceId
*
* @return
*/
public String getServiceId() {
return serviceId;
}
/**
* set serviceId
*
* @param serviceId
*/
public void setServiceId(String serviceId) {
this.serviceId = serviceId;
}
/**
* set serviceId
*
* @param serviceId
*/
public CreateBackupSynchronicityResult serviceId(String serviceId) {
this.serviceId = serviceId;
return this;
}
} | [
"tancong@jd.com"
] | tancong@jd.com |
f0caa06c1780c818431f77ab9324b1d4c63161af | aa424ea451ae34fb82c259ab0d40d8d7dd8fdbb8 | /src/com/jatools/web/dwr/push/SalableRateDwr.java | ab4b25ac944e860e5dd231f075d0a1d5ec9141f1 | [] | no_license | lejingw/wlscm | 494fc3e8b39cd4ff5d20854f48a629c3c92842e8 | f152aaf93657e712722283f53a6bd62091398799 | refs/heads/master | 2020-12-24T16:50:31.168377 | 2013-11-08T09:35:58 | 2013-11-08T09:35:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 785 | java | package com.jatools.web.dwr.push;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.jatools.common.CommonUtil;
import com.jatools.manager.push.SalableRateManager;
import com.jatools.vo.push.SalableRate;
public class SalableRateDwr {
private SalableRateManager salableRateManager;
public void setSalableRateManager(SalableRateManager salableRateManager) {
this.salableRateManager = salableRateManager;
}
public String saveOrUpdateSalableRate(SalableRate dn, HttpServletRequest req){
String userId = CommonUtil.getSessionUserId(req);
salableRateManager.saveOrUpdateSalableRate(dn, userId);
return null;
}
public String deleteSalableRate(List<String> billIdList){
salableRateManager.deleteSalableRate(billIdList);
return null;
}
} | [
"lejingw@163.com"
] | lejingw@163.com |
ce768e999a20d6be621b9b108f2aac00a8446373 | d669e67a5cfd22363b20cc7dc1c56fcb230454ec | /src/davi/mutation/equalizacao/AOIS_20/Equalizacao.java | 50574cc6abe0bddf851efb747f5323d29f8e56e5 | [
"Apache-2.0"
] | permissive | DaviSRodrigues/TAIGA | f1fe37583bd5009fa0ee192954d0c5ce5d051ee0 | 7997a8e4a31a177335178571a443b03f1bf3f2e4 | refs/heads/master | 2022-04-10T16:11:10.871395 | 2020-03-09T14:34:04 | 2020-03-09T14:34:04 | 101,459,116 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,811 | java | // This is a mutant program.
// Author : ysma
package davi.mutation.equalizacao.AOIS_20;
import davi.genetic.algorithm.Image;
public class Equalizacao
{
public static void main( java.lang.String[] args )
throws java.lang.Exception
{
}
public static davi.genetic.algorithm.Image equaliza( davi.genetic.algorithm.Image img )
{
try {
int altura = img.getHeight();
int largura = img.getWidth();
int[] histograma = new int[256];
int[] histogramaIdeal = new int[256];
int[] pixels = img.getBufferedImage().getRaster().getPixels( 0, 0, largura, altura, (int[]) null );
int[] histogramaEq = pixels.clone();
for (int i = 0; i < pixels.length; i++) {
histograma[pixels[i]] += 1;
verificaTimeout();
}
int ideal = largura * altura-- / 256;
int acumulado = 0;
int temp = 0;
for (int i = 0; i <= 255; i++) {
acumulado += histograma[i];
temp = (int) (acumulado / ideal) - 1;
histogramaIdeal[i] = temp > 0 ? temp : 0;
verificaTimeout();
}
for (int i = 0; i < pixels.length; i++) {
histogramaEq[i] = histogramaIdeal[pixels[i]];
verificaTimeout();
}
img.getBufferedImage().getRaster().setPixels( 0, 0, largura, altura, histogramaEq );
} catch ( java.lang.Exception e ) {
return null;
}
return img;
}
public static void verificaTimeout()
throws java.lang.InterruptedException
{
if (Thread.currentThread().isInterrupted()) {
throw new java.lang.InterruptedException();
}
}
}
| [
"davisilvarodrigues@gmail.com"
] | davisilvarodrigues@gmail.com |
14cd17c9a20fad6fd76d7d5e5b873bb788939e4c | 3e24cc42539db6cfaa51586c55854e0bf14a4a65 | /src/org/editeur/onix/v30/references/PrizeYear.java | e661540d92702ca069e7dd8a936b93a3e41386eb | [] | no_license | MiladRamsys/jonix | 08dc77edff0f0addc49a5d20f45534c818b3a0e2 | fc493bb2e354686488ad63c2c051e73039c468a7 | refs/heads/master | 2021-01-10T21:23:41.811111 | 2013-04-04T14:39:26 | 2013-04-04T14:39:26 | 32,104,199 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,567 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6
// 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: 2013.03.15 at 09:12:39 AM IST
//
package org.editeur.onix.v30.references;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <simpleContent>
* <extension base="<http://ns.editeur.org/onix/3.0/reference>dt.Year">
* <attGroup ref="{http://ns.editeur.org/onix/3.0/reference}generalAttributes"/>
* <attribute name="refname">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}token">
* <enumeration value="PrizeYear"/>
* </restriction>
* </simpleType>
* </attribute>
* <attribute name="shortname">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}token">
* <enumeration value="g127"/>
* </restriction>
* </simpleType>
* </attribute>
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"value"
})
@XmlRootElement(name = "PrizeYear")
public class PrizeYear {
@XmlValue
protected String value;
@XmlAttribute(name = "refname")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
protected String refname;
@XmlAttribute(name = "shortname")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
protected String shortname;
@XmlAttribute(name = "datestamp")
protected String datestamp;
@XmlAttribute(name = "sourcetype")
protected String sourcetype;
@XmlAttribute(name = "sourcename")
@XmlSchemaType(name = "anySimpleType")
protected String sourcename;
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
/**
* Gets the value of the refname property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRefname() {
return refname;
}
/**
* Sets the value of the refname property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRefname(String value) {
this.refname = value;
}
/**
* Gets the value of the shortname property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getShortname() {
return shortname;
}
/**
* Sets the value of the shortname property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setShortname(String value) {
this.shortname = value;
}
/**
* Gets the value of the datestamp property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDatestamp() {
return datestamp;
}
/**
* Sets the value of the datestamp property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDatestamp(String value) {
this.datestamp = value;
}
/**
* Gets the value of the sourcetype property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSourcetype() {
return sourcetype;
}
/**
* Sets the value of the sourcetype property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSourcetype(String value) {
this.sourcetype = value;
}
/**
* Gets the value of the sourcename property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSourcename() {
return sourcename;
}
/**
* Sets the value of the sourcename property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSourcename(String value) {
this.sourcename = value;
}
}
| [
"tsahim@gmail.com@d7478ce8-731c-9f3f-b499-ac6574b89192"
] | tsahim@gmail.com@d7478ce8-731c-9f3f-b499-ac6574b89192 |
087c09bc13224c4656b6e5fb0cc307801a6b53ba | 3fb9bdbe88ee2e59f80887e3a27e86b8433a4797 | /app/src/main/java/com/example/haoji/phoneticsymbol/type/presenter/TypePresenter.java | ac9fe6473caf61955b290c265c95eb06e3bd3eed | [] | no_license | wuhoulang/PhoneticSymbol1 | 51781cf80615b8a43e3faac8a65916e4ff271c5d | 0850956dc9bdc2162dc92f4ab80c0776f0d1ee9d | refs/heads/master | 2020-09-30T14:14:34.827619 | 2020-01-20T10:09:21 | 2020-01-20T10:09:21 | 227,304,733 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,766 | java | package com.example.haoji.phoneticsymbol.type.presenter;
import android.content.Context;
import com.example.haoji.phoneticsymbol.home.bean.DataBean1;
import com.example.haoji.phoneticsymbol.home.bean.TextViewDataBean;
import com.example.haoji.phoneticsymbol.home.interf.FiveMethod;
import com.example.haoji.phoneticsymbol.home.interf.ModelCallback;
import com.example.haoji.phoneticsymbol.home.interf.RetrofitTextCallback;
import com.example.haoji.phoneticsymbol.home.interf.SuccessCallBack;
import com.example.haoji.phoneticsymbol.home.interf.SuccessTextCallBack;
import com.example.haoji.phoneticsymbol.home.model.BeanModel;
import com.example.haoji.phoneticsymbol.home.view.ProgreesView;
import com.example.haoji.phoneticsymbol.type.interf.TwoMethod;
import com.example.haoji.phoneticsymbol.type.model.TypeModel;
import retrofit2.Response;
/**
* Created by HAOJI on 2019/11/25.
*/
public class TypePresenter implements TwoMethod {
public static TypePresenter biaoUser = null;
private Context context;
private SuccessCallBack successCallBack;
public ProgreesView mView;
public TypePresenter(Context mContext){
this.context = mContext;
}
public TypePresenter(ProgreesView view){
this.mView = view;
}
@Override
public void getPostBean(Context context, String url, String picur, String id, String title, String sutitle, final SuccessCallBack successCallBack) {
TypeModel.requestPostOKhttp(context, url, picur,id,title,sutitle, new ModelCallback() {
@Override
public void onSuccess(String data) {
successCallBack.IsSuccess(data);
}
@Override
public void onFailure(String msg) {
}
});
}
}
| [
"1022845861@qq.com"
] | 1022845861@qq.com |
acb569b38560ba6e2f06ded1a094a9919b1635d6 | ef6740fbba8e68f2a92d3a27962a48faac1da01e | /RTI/src/eu/gloria/rti/CamGetAcquisitionMode.java | 1cd3cc5ef727932d37ecb7e2914644ff823535aa | [] | no_license | mclopez-uma/GLORIA_RTSInteractiveCommon | 995cf0b5bb587c8b6c404bb3cb1783080bb34efb | 1172c1789c16638a434ef8a6821c3836bd402b2b | refs/heads/master | 2020-05-07T21:51:04.020520 | 2014-05-20T11:31:59 | 2014-05-20T11:31:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,207 | java |
package eu.gloria.rti;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Clase Java para anonymous complex type.
*
* <p>El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="session" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="deviceId" type="{http://www.w3.org/2001/XMLSchema}string"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"session",
"deviceId"
})
@XmlRootElement(name = "camGetAcquisitionMode")
public class CamGetAcquisitionMode {
@XmlElement(required = true)
protected String session;
@XmlElement(required = true)
protected String deviceId;
/**
* Obtiene el valor de la propiedad session.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSession() {
return session;
}
/**
* Define el valor de la propiedad session.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSession(String value) {
this.session = value;
}
/**
* Obtiene el valor de la propiedad deviceId.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDeviceId() {
return deviceId;
}
/**
* Define el valor de la propiedad deviceId.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDeviceId(String value) {
this.deviceId = value;
}
}
| [
"mclopezc@uma.es"
] | mclopezc@uma.es |
38a9cd799bcdf9a1b93883b9ae6225094068efd9 | 456471f1f42f1b6eefc25b9377063ecb82ee4600 | /aylson-dao/src/main/java/com/aylson/dc/ytt/po/YttInitConfig.java | 4a8db5039c55450b32553b1aed22e7e502d09c3b | [] | no_license | zhaohaibo123/aylson-parent | 287de98ca4977f2f7c9572f1fd61720c4283c7ef | a042563345d1754f1cfada3e214ee396787a9a34 | refs/heads/master | 2021-07-02T10:35:05.504971 | 2017-09-22T02:34:36 | 2017-09-22T02:34:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,209 | java | package com.aylson.dc.ytt.po;
import java.io.Serializable;
public class YttInitConfig implements Serializable{
private static final long serialVersionUID = -4066660374449732089L;
private String id; //主键
private String faqUrl; //常见问题页面url
private String inviteUrl; //邀请规则说明页面url
private String registerInfoUrl; //注册用户协议页面url
private String duration; //阅读文章控制时长
private Integer frequency; //阅读文章拖动次数
private String appInviteUrl; //APP生成的分享邀请链接
private String createDate; //创建时间
private String createdBy; //创建人
private String updateDate; //更新时间
private String updatedBy; //更新人
public String getAppInviteUrl() {
return appInviteUrl;
}
public void setAppInviteUrl(String appInviteUrl) {
this.appInviteUrl = appInviteUrl;
}
public String getDuration() {
return duration;
}
public void setDuration(String duration) {
this.duration = duration;
}
public Integer getFrequency() {
return frequency;
}
public void setFrequency(Integer frequency) {
this.frequency = frequency;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCreateDate() {
return createDate;
}
public void setCreateDate(String createDate) {
this.createDate = createDate;
}
public String getUpdateDate() {
return updateDate;
}
public void setUpdateDate(String updateDate) {
this.updateDate = updateDate;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public String getUpdatedBy() {
return updatedBy;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
public String getFaqUrl() {
return faqUrl;
}
public void setFaqUrl(String faqUrl) {
this.faqUrl = faqUrl;
}
public String getInviteUrl() {
return inviteUrl;
}
public void setInviteUrl(String inviteUrl) {
this.inviteUrl = inviteUrl;
}
public String getRegisterInfoUrl() {
return registerInfoUrl;
}
public void setRegisterInfoUrl(String registerInfoUrl) {
this.registerInfoUrl = registerInfoUrl;
}
}
| [
"hemin_it@163.com"
] | hemin_it@163.com |
593c4c2455a546b577b0f036d03dc9e73b312f00 | 360a4e3f8af5bf19a53fcefb7a2f4736b389d30d | /module/mongodb/src/main/java/in/clouthink/daas/fss/mongodb/model/FileObjectSearchRequest.java | 68089923f0218a093e27a26c333eb6f9b7feaeae | [
"Apache-2.0"
] | permissive | vanish1984/spring-file-storage-service | f84194577b50f2d15a26681778da8042fcbeeabc | a1e1cfa4be38b6eb6541555293e5d79c83edca95 | refs/heads/master | 2021-04-23T17:26:15.083590 | 2020-12-04T08:44:47 | 2020-12-04T08:44:47 | 249,946,518 | 0 | 0 | Apache-2.0 | 2020-03-25T10:17:03 | 2020-03-25T10:17:02 | null | UTF-8 | Java | false | false | 240 | java | package in.clouthink.daas.fss.mongodb.model;
public interface FileObjectSearchRequest extends in.clouthink.daas.fss.domain.request.FileObjectSearchRequest {
String getAttachedId();
String getCategory();
String getCode();
}
| [
"melthaw@gmail.com"
] | melthaw@gmail.com |
1e539b619e281aad7dde6015b0a55fdc3ea9a4f3 | 56f6ce0eae24fa29ff2e018c68f84f715f3cdbc4 | /worktest/src/main/java/com/mw/java/test/utils/CommonUtil.java | 79e4bac9883b2473ee10f02d5b420a18402bc487 | [] | no_license | Git2191866109/MyWorkTest | 57852f5244342a235b06a67d88bd959ddce61f24 | 2a8281a3f88760b0a6dbe431fa0fd2a5ba96749e | refs/heads/master | 2020-05-21T20:18:24.906806 | 2016-08-04T02:11:26 | 2016-08-04T02:11:26 | 62,592,440 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,222 | java |
package com.mw.java.test.utils;
import com.mw.java.test.Constant;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.StringUtils;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.*;
public class CommonUtil {
private static final String EMPTY = "";
public static void testSplit() {
String s = "\t\t";
String[] split = s.split("\t", -1);
System.out.println(split.length);
for (String str : split) {
System.out.println("->" + str);
}
}
public static String getMd5BigInt(String str) {
if (StringUtils.isBlank(str)) {
return null;
}
return new BigInteger(md5_16(str), 16).toString();
}
public static String md5_32(String str) {
if (StringUtils.isBlank(str)) {
return null;
}
return DigestUtils.md5Hex(str);
}
public static String md5_16(String str) {
if (StringUtils.isBlank(str)) {
return null;
}
return md5_32(str).substring(8, 24);
}
public static byte[] intToByteArray(int num) {
byte[] result = new byte[4];
result[0] = (byte) (num >>> 24);// 取最高8位放到0下标
result[1] = (byte) (num >>> 16);// 取次高8为放到1下标
result[2] = (byte) (num >>> 8); // 取次低8位放到2下标
result[3] = (byte) (num); // 取最低8位放到3下标
return result;
}
public static boolean isPrettyText(String text) {
return text.matches("[0-9a-zA-Z\\.,]*");
}
public static String rettyText(String text, String split) {
String[] split2 = text.split(split, 0 - 1);
List<String> list = new ArrayList<String>();
for (String str : split2) {
if (StringUtils.isNotBlank(str)) {
list.add(str);
}
}
return StringUtils.join(list, split);
}
public static String list2String(List<String> list, String split, boolean sortReverse) {
if (sortReverse) {
Collections.reverse(list);
}
return StringUtils.join(list, split);
}
public static void main(String[] args) throws IOException {
// System.out.println(readFileInJar("/template/autoMall"));
System.out.println(formatePriceString("0.0000001"));
}
public static String joinString(String split, String... args) {
List<String> list = new ArrayList<String>();
for (String str : args) {
if (StringUtils.isNotEmpty(str)) {
list.add(str);
}
}
return StringUtils.join(list, split);
}
public static String null2empty(String s) {
return StringUtils.isEmpty(s) ? EMPTY : s;
}
public static String checkNull(String s) {
return StringUtils.isEmpty(s) ? EMPTY : Constant.SEMICOLON;
}
public static List<String> distinctList(List<String> list) {
List<String> newList = new ArrayList<String>();
Set<String> flagSet = new HashSet<String>();
for (String s : list) {
if (!flagSet.contains(s)) {
newList.add(s);
}
flagSet.add(s);
}
return newList;
}
public static String readFileInJar(String filePath) throws IOException {
InputStream input = CommonUtil.class.getResourceAsStream(filePath);
BufferedReader br = new BufferedReader(new InputStreamReader(input));
String line = null;
StringBuffer sb = new StringBuffer();
while ((line = br.readLine()) != null) {
sb.append(line);
}
return sb.toString();
}
public static String returnZeroIfEmpty(String str) {
return StringUtils.isBlank(str) ? Constant.ZERO : str;
}
public static String formatePriceString(String price) {
if (StringUtils.isBlank(price)) {
return Constant.EMPTY;
}
if (price.matches(".*\\.0+")) {
return price.replaceAll("\\.0+", Constant.EMPTY);
}
return price;
}
}
| [
"2191866109@qq.com"
] | 2191866109@qq.com |
07b96faacee382daa773ff79f6a41fb23f33dc40 | ca030864a3a1c24be6b9d1802c2353da4ca0d441 | /classes4.dex_source_from_JADX/com/facebook/messaging/tincan/messenger/AttachmentUploadRetryColStartTrigger.java | 7fb4ccfe561820480e58f7848567e78e16a7b0b9 | [] | no_license | pxson001/facebook-app | 87aa51e29195eeaae69adeb30219547f83a5b7b1 | 640630f078980f9818049625ebc42569c67c69f7 | refs/heads/master | 2020-04-07T20:36:45.758523 | 2018-03-07T09:04:57 | 2018-03-07T09:04:57 | 124,208,458 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,256 | java | package com.facebook.messaging.tincan.messenger;
import com.facebook.auth.datastore.impl.LoggedInUserSessionManager;
import com.facebook.base.broadcast.BaseFbBroadcastManager.SelfRegistrableReceiverImpl;
import com.facebook.common.executors.ListeningExecutorService_BackgroundExecutorServiceMethodAutoProvider;
import com.facebook.common.init.INeedInit;
import com.facebook.common.network.NetworkMonitor;
import com.facebook.common.network.NetworkMonitor.State;
import com.facebook.inject.InjectorLike;
import com.facebook.tools.dextr.runtime.detour.ExecutorDetour;
import java.util.concurrent.ExecutorService;
import javax.annotation.Nullable;
import javax.inject.Inject;
/* compiled from: mNotificationsCounts */
public class AttachmentUploadRetryColStartTrigger implements INeedInit {
public final NetworkMonitor f8596a;
private final ExecutorService f8597b;
public final EncryptedAttachmentUploadRetryHandler f8598c;
private final LoggedInUserSessionManager f8599d;
@Nullable
public SelfRegistrableReceiverImpl f8600e = null;
/* compiled from: mNotificationsCounts */
class C05332 implements Runnable {
final /* synthetic */ AttachmentUploadRetryColStartTrigger f11145a;
C05332(AttachmentUploadRetryColStartTrigger attachmentUploadRetryColStartTrigger) {
this.f11145a = attachmentUploadRetryColStartTrigger;
}
public void run() {
this.f11145a.f8598c.m8854a();
}
}
public static AttachmentUploadRetryColStartTrigger m8848b(InjectorLike injectorLike) {
return new AttachmentUploadRetryColStartTrigger(NetworkMonitor.a(injectorLike), (ExecutorService) ListeningExecutorService_BackgroundExecutorServiceMethodAutoProvider.a(injectorLike), EncryptedAttachmentUploadRetryHandler.m8851a(injectorLike), LoggedInUserSessionManager.a(injectorLike));
}
@Inject
public AttachmentUploadRetryColStartTrigger(NetworkMonitor networkMonitor, ExecutorService executorService, EncryptedAttachmentUploadRetryHandler encryptedAttachmentUploadRetryHandler, LoggedInUserSessionManager loggedInUserSessionManager) {
this.f8596a = networkMonitor;
this.f8597b = executorService;
this.f8598c = encryptedAttachmentUploadRetryHandler;
this.f8599d = loggedInUserSessionManager;
}
public void init() {
if (this.f8596a.a()) {
m8849b(this);
} else {
this.f8600e = this.f8596a.a(State.CONNECTED, new 1(this));
}
}
public static void m8849b(AttachmentUploadRetryColStartTrigger attachmentUploadRetryColStartTrigger) {
if (attachmentUploadRetryColStartTrigger.f8599d.b()) {
m8850c(attachmentUploadRetryColStartTrigger);
}
}
public static void m8850c(AttachmentUploadRetryColStartTrigger attachmentUploadRetryColStartTrigger) {
if (attachmentUploadRetryColStartTrigger.f8600e != null && attachmentUploadRetryColStartTrigger.f8600e.a()) {
attachmentUploadRetryColStartTrigger.f8600e.c();
attachmentUploadRetryColStartTrigger.f8600e = null;
}
ExecutorDetour.a(attachmentUploadRetryColStartTrigger.f8597b, new C05332(attachmentUploadRetryColStartTrigger), -1557327118);
}
}
| [
"son.pham@jmango360.com"
] | son.pham@jmango360.com |
4c41e1a28dfb73a181206713796569619fd1188c | 3d76d94ffef936809399500f441e80933635ae1e | /src/main/java/com/apps/omnipotent/manager/dept/controller/DeptController.java | 57c2dfd57ff661b2d3824165c89fcc575c87bff8 | [] | no_license | githublibiao6/simplyspringboot | 8f5aa0905b3a70df1a5c97556a05a8784bcf4cdb | efaa5481fd942fb03361b9ec225fb1ebc97f17bd | refs/heads/master | 2022-06-26T11:17:51.810703 | 2020-05-29T16:38:37 | 2020-05-29T16:38:37 | 195,837,245 | 0 | 0 | null | 2021-04-26T20:07:04 | 2019-07-08T15:12:00 | Java | UTF-8 | Java | false | false | 555 | java | package com.apps.omnipotent.manager.dept.controller;
import com.apps.omnipotent.manager.dept.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
/**
* 部门 controller
* @author lb
*
*/
@RequestMapping("dept")
@Controller
public class DeptController {
@Autowired
DeptService service;
@RequestMapping("main")
public String test(){
return "dept/index";
}
}
| [
"1446977718@qq.com"
] | 1446977718@qq.com |
0c91b84d9c46cc03c3b6224693e832904dd53920 | 377e5e05fb9c6c8ed90ad9980565c00605f2542b | /bin/ext-integration/sap/asynchronousOM/saporderexchange/testsrc/de/hybris/platform/sap/orderexchange/mocks/MockUserService.java | 9171ea6235bc468f0f80dd7826409232c433d320 | [] | no_license | automaticinfotech/HybrisProject | c22b13db7863e1e80ccc29774f43e5c32e41e519 | fc12e2890c569e45b97974d2f20a8cbe92b6d97f | refs/heads/master | 2021-07-20T18:41:04.727081 | 2017-10-30T13:24:11 | 2017-10-30T13:24:11 | 108,957,448 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,763 | java | /*
* [y] hybris Platform
*
* Copyright (c) 2000-2016 SAP SE or an SAP affiliate company.
* All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.sap.orderexchange.mocks;
import de.hybris.platform.core.model.user.AbstractUserAuditModel;
import de.hybris.platform.core.model.user.CustomerModel;
import de.hybris.platform.core.model.user.EmployeeModel;
import de.hybris.platform.core.model.user.TitleModel;
import de.hybris.platform.core.model.user.UserGroupModel;
import de.hybris.platform.core.model.user.UserModel;
import de.hybris.platform.core.model.user.UserPasswordChangeAuditModel;
import de.hybris.platform.servicelayer.user.UserService;
import de.hybris.platform.servicelayer.user.exceptions.CannotDecodePasswordException;
import de.hybris.platform.servicelayer.user.exceptions.PasswordEncoderNotFoundException;
import java.util.Collection;
import java.util.List;
import java.util.Set;
/**
* Mock to be used for spring tests
*/
public class MockUserService implements UserService
{
@Override
public EmployeeModel getAdminUser()
{
return null;
}
@Override
public UserGroupModel getAdminUserGroup()
{
return null;
}
@Override
public Set<UserGroupModel> getAllGroups(final UserModel arg0)
{
return null;
}
@Override
public Collection<TitleModel> getAllTitles()
{
return null;
}
@Override
public Set<UserGroupModel> getAllUserGroupsForUser(final UserModel arg0)
{
return null;
}
@Override
public <T extends UserGroupModel> Set<T> getAllUserGroupsForUser(final UserModel arg0, final Class<T> arg1)
{
return null;
}
@Override
public CustomerModel getAnonymousUser()
{
return null;
}
@Override
public UserModel getCurrentUser()
{
return null;
}
@Override
public String getPassword(final String arg0) throws CannotDecodePasswordException, PasswordEncoderNotFoundException
{
return null;
}
@Override
public String getPassword(final UserModel arg0) throws CannotDecodePasswordException, PasswordEncoderNotFoundException
{
return null;
}
@Override
public TitleModel getTitleForCode(final String arg0)
{
return null;
}
@Override
public UserModel getUser(final String arg0)
{
return null;
}
@Override
public UserModel getUserForUID(final String arg0)
{
return null;
}
@Override
public <T extends UserModel> T getUserForUID(final String arg0, final Class<T> arg1)
{
return null;
}
@Override
public UserGroupModel getUserGroup(final String arg0)
{
return null;
}
@Override
public UserGroupModel getUserGroupForUID(final String arg0)
{
return null;
}
@Override
public <T extends UserGroupModel> T getUserGroupForUID(final String arg0, final Class<T> arg1)
{
return null;
}
@Override
public boolean isAdmin(final UserModel arg0)
{
return false;
}
@Override
public boolean isAnonymousUser(final UserModel arg0)
{
return false;
}
@Override
public boolean isMemberOfGroup(final UserModel arg0, final UserGroupModel arg1)
{
return false;
}
@Override
public boolean isMemberOfGroup(final UserGroupModel arg0, final UserGroupModel arg1)
{
return false;
}
@Override
public boolean isUserExisting(final String arg0)
{
return false;
}
@Override
public void setCurrentUser(final UserModel arg0)
{
}
@Override
public void setPassword(final String arg0, final String arg1) throws PasswordEncoderNotFoundException
{
}
@Override
public void setPassword(final String arg0, final String arg1, final String arg2) throws PasswordEncoderNotFoundException
{
}
@Override
public void setPassword(final UserModel arg0, final String arg1, final String arg2) throws PasswordEncoderNotFoundException
{
}
@Override
public void setPassword(final UserModel arg0, final String arg1) throws PasswordEncoderNotFoundException
{
}
@Override
public void setPasswordWithDefaultEncoding(final UserModel arg0, final String arg1) throws PasswordEncoderNotFoundException
{
}
@Override
public boolean isAdminEmployee(final UserModel arg0)
{
return false;
}
@Override
public void setEncodedPassword(final UserModel arg0, final String arg1)
{
}
@Override
public void setEncodedPassword(final UserModel arg0, final String arg1, final String arg2)
{
}
@Override
public List<AbstractUserAuditModel> getUserAudits(final UserModel arg0)
{
return null;
}
@Override
public boolean isPasswordIdenticalToAudited(final UserModel arg0, final String arg1, final UserPasswordChangeAuditModel arg2)
{
return false;
}
}
| [
"santosh.kshirsagar@automaticinfotech.com"
] | santosh.kshirsagar@automaticinfotech.com |
d7d4b840c6ae27e5348a583e8a1f74b0852960ba | 8de0190ba91403621d09cdb0855612d00d8179b2 | /leetcode-sql/src/main/java/johnny/leetcode/sql/Solution615.java | f4fa2d376627348fce4b782f105ced58a0999838 | [] | no_license | 156420591/algorithm-problems-java | e2494831becba9d48ab0af98b99fca138aaa1ca8 | 1aec8a6e128763b1c1378a957d270f2a7952b81a | refs/heads/master | 2023-03-04T12:36:06.143086 | 2021-02-05T05:38:15 | 2021-02-05T05:38:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,782 | java | package johnny.leetcode.sql;
/**
* 615. Average Salary: Departments VS Company
* Given two tables as below, write a query to display the comparison result (higher/lower/same) of the average salary of employees in a department to the company's average salary.
Table: salary
| id | employee_id | amount | pay_date |
|----|-------------|--------|------------|
| 1 | 1 | 9000 | 2017-03-31 |
| 2 | 2 | 6000 | 2017-03-31 |
| 3 | 3 | 10000 | 2017-03-31 |
| 4 | 1 | 7000 | 2017-02-28 |
| 5 | 2 | 6000 | 2017-02-28 |
| 6 | 3 | 8000 | 2017-02-28 |
The employee_id column refers to the employee_id in the following table employee.
| employee_id | department_id |
|-------------|---------------|
| 1 | 1 |
| 2 | 2 |
| 3 | 2 |
So for the sample data above, the result is:
| pay_month | department_id | comparison |
|-----------|---------------|-------------|
| 2017-03 | 1 | higher |
| 2017-03 | 2 | lower |
| 2017-02 | 1 | same |
| 2017-02 | 2 | same |
Explanation
In March, the company's average salary is (9000+6000+10000)/3 = 8333.33...
The average salary for department '1' is 9000, which is the salary of employee_id '1' since there is only one employee in this department. So the comparison result is 'higher' since {@code 9000 > 8333.33} obviously.
The average salary of department '2' is (6000 + 10000)/2 = 8000, which is the average of employee_id '2' and '3'. So the comparison result is 'lower' since {@code 8000 < 8333.33}.
With he same formula for the average salary comparison in February, the result is 'same' since both the department '1' and '2' have the same average salary with the company, which is 7000.
* @author Johnny
*/
public class Solution615 {
public int query() {
return 0;
}
//# Write your MySQL query statement below
/*
Create table If Not Exists salary (id int, employee_id int, amount int, pay_date date);
Create table If Not Exists employee (employee_id int, department_id int);
Truncate table salary;
insert into salary (id, employee_id, amount, pay_date) values ('1', '1', '9000', '2017/03/31');
insert into salary (id, employee_id, amount, pay_date) values ('2', '2', '6000', '2017/03/31');
insert into salary (id, employee_id, amount, pay_date) values ('3', '3', '10000', '2017/03/31');
insert into salary (id, employee_id, amount, pay_date) values ('4', '1', '7000', '2017/02/28');
insert into salary (id, employee_id, amount, pay_date) values ('5', '2', '6000', '2017/02/28');
insert into salary (id, employee_id, amount, pay_date) values ('6', '3', '8000', '2017/02/28');
Truncate table employee;
insert into employee (employee_id, department_id) values ('1', '1');
insert into employee (employee_id, department_id) values ('2', '2');
insert into employee (employee_id, department_id) values ('3', '2');
*/
/*
select department_salary.pay_month, department_id,
case
when department_avg>company_avg then 'higher'
when department_avg<company_avg then 'lower'
else 'same'
end as comparison
from
(
select department_id, avg(amount) as department_avg, date_format(pay_date, '%Y-%m') as pay_month
from salary join employee on salary.employee_id = employee.employee_id
group by department_id, pay_month
) as department_salary
join
(
select avg(amount) as company_avg, date_format(pay_date, '%Y-%m') as pay_month from salary group by date_format(pay_date, '%Y-%m')
) as company_salary
on department_salary.pay_month = company_salary.pay_month
*/
}
| [
"jojozhuang@gmail.com"
] | jojozhuang@gmail.com |
8e53da4c70afbe50dbc1992dcb283ba209da96a9 | 47ea20bb0510319596f418f3274ad14132eb8f31 | /java/dagger/internal/codegen/SetFactoryCreationExpression.java | 94975680fc48f9f4a52e294991fcb805abf07c79 | [
"Apache-2.0"
] | permissive | edenman/dagger | 4edfd7f8ff70eed938c0757b75af4760bce18a44 | 58ec35b68e4b68aeca8a72d5f327b5f51e4bf9b9 | refs/heads/master | 2020-03-23T10:52:11.222876 | 2018-08-13T18:53:44 | 2018-08-13T18:53:44 | 141,466,751 | 0 | 0 | Apache-2.0 | 2018-08-13T18:51:23 | 2018-07-18T17:17:29 | Java | UTF-8 | Java | false | false | 3,819 | java | /*
* Copyright (C) 2015 The Dagger Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dagger.internal.codegen;
import static com.google.common.base.Preconditions.checkNotNull;
import static dagger.internal.codegen.SourceFiles.setFactoryClassName;
import com.squareup.javapoet.CodeBlock;
import dagger.internal.codegen.FrameworkFieldInitializer.FrameworkInstanceCreationExpression;
import dagger.producers.Produced;
/** A factory creation expression for a multibound set. */
// TODO(dpb): Resolve with MapFactoryCreationExpression.
final class SetFactoryCreationExpression implements FrameworkInstanceCreationExpression {
private final GeneratedComponentModel generatedComponentModel;
private final ComponentBindingExpressions componentBindingExpressions;
private final BindingGraph graph;
private final ContributionBinding binding;
SetFactoryCreationExpression(
ContributionBinding binding,
GeneratedComponentModel generatedComponentModel,
ComponentBindingExpressions componentBindingExpressions,
BindingGraph graph) {
this.binding = checkNotNull(binding);
this.generatedComponentModel = checkNotNull(generatedComponentModel);
this.componentBindingExpressions = checkNotNull(componentBindingExpressions);
this.graph = checkNotNull(graph);
}
@Override
public CodeBlock creationExpression() {
CodeBlock.Builder builder = CodeBlock.builder().add("$T.", setFactoryClassName(binding));
boolean useRawType = !generatedComponentModel.isTypeAccessible(binding.key().type());
if (!useRawType) {
SetType setType = SetType.from(binding.key());
builder.add(
"<$T>",
setType.elementsAreTypeOf(Produced.class)
? setType.unwrappedElementType(Produced.class)
: setType.elementType());
}
int individualProviders = 0;
int setProviders = 0;
CodeBlock.Builder builderMethodCalls = CodeBlock.builder();
for (FrameworkDependency frameworkDependency : binding.frameworkDependencies()) {
ContributionType contributionType =
graph.contributionBindings().get(frameworkDependency.key()).contributionType();
String methodName;
String methodNameSuffix = frameworkDependency.frameworkClass().getSimpleName();
switch (contributionType) {
case SET:
individualProviders++;
methodName = "add" + methodNameSuffix;
break;
case SET_VALUES:
setProviders++;
methodName = "addCollection" + methodNameSuffix;
break;
default:
throw new AssertionError(frameworkDependency + " is not a set multibinding");
}
CodeBlock argument =
componentBindingExpressions
.getDependencyExpression(frameworkDependency, generatedComponentModel.name())
.codeBlock();
builderMethodCalls.add(
".$L($L)",
methodName,
useRawType ? CodeBlocks.cast(argument, frameworkDependency.frameworkClass()) : argument);
}
builder.add("builder($L, $L)", individualProviders, setProviders);
builder.add(builderMethodCalls.build());
return builder.add(".build()").build();
}
@Override
public boolean useInnerSwitchingProvider() {
return !binding.dependencies().isEmpty();
}
}
| [
"shapiro.rd@gmail.com"
] | shapiro.rd@gmail.com |
8408344ca53ec0064145c75f599227acf8f337da | e73ef64805f5f64b58483462f1bb78e3b5746b9e | /Q8/JavaTimeTuesdayCounter.java | 1cdc4e5e5a2f40233f028352db73b2f0eb7cdc26 | [] | no_license | RichardInnocent/problem-questions-in-java-and-c | 80db5992700b9913bf3c032a74b98817dfae4863 | b5f116ef92afd89871b969f0c7ec3f511fe1e23c | refs/heads/main | 2023-05-08T05:30:18.000748 | 2021-06-03T08:35:16 | 2021-06-03T08:35:16 | 373,430,424 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 845 | java | import java.time.DayOfWeek;
import java.time.LocalDate;
/**
* The more standardised approach to solving the coursework. This uses Java's in-built java.time
* package.
*/
public class JavaTimeTuesdayCounter implements TuesdayCounter {
@Override
public int countTuesdays() {
// Start at the start date specified in the brief
LocalDate date = LocalDate.of(1901, 1, 1);
int tuesdays = 0;
// Continually increment the month until we reach the 21st Century.
while (date.getYear() < 2001) {
// Is the day a Tuesday?
if (DayOfWeek.TUESDAY.equals(date.getDayOfWeek())) {
tuesdays++; // Yes, so increment the number of Tuesdays
}
// Increment the month (LocalDate is immutable, hence the reassignment)
date = date.plusMonths(1);
}
// Return the count
return tuesdays;
}
}
| [
"richardinnocent@sky.com"
] | richardinnocent@sky.com |
103f4a944faebac64ffc633bb8302edb16101c15 | 19c43b75dba813c8f280f4f71f0efa66080ee9fe | /src/cn/pub/action/ResetAction.java | 44b40e104420f671585a8b61f36bbb23468b5ce3 | [] | no_license | yxxcrtd/www.0471zk.com | b7ede403b848c511cbcac30951ab16dd48c98680 | 54c1d1aeeac3ffd5b2084957c25df98173d779b6 | refs/heads/master | 2020-05-31T15:10:55.096890 | 2019-06-05T07:47:07 | 2019-06-05T07:47:07 | 190,349,561 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,166 | java | package cn.pub.action;
import cn.pub.action.base.BaseUserAction;
/**
* Reset Password
*
* @author Yang XinXin
* @version 1.0.0, 2012-09-17 19:06:28
*/
public class ResetAction extends BaseUserAction {
/**
* serialVersionUID
*/
private static final long serialVersionUID = -2983110441879892386L;
/* (non-Javadoc)
*
* @see cn.pub.action.base.BaseAbstractAction#execute(java.lang.String)
*/
@Override
protected String execute(String cmd) throws Exception {
// 用户在页面中输入的密码
String password = user.getPassword();
String email = user.getEmail();
// 1,根据用户名得到用户对象
if (null == this.getUserByUsername(user.getUsername().trim())) {
return INPUT;
}
// 2,验证用户的E-Mail,防止用户从地址栏直接输入用户名来修改密码
if (!equalEmail(user.getEmail(), email)) {
return INPUT;
}
// 3,重置用户密码
resetPassword(user, password);
// 4,重置密码成功
user = null;
this.addActionError(this.getText("system.password.reset.success"));
// 5,返回
return SUCCESS;
}
}
| [
"yxxcrtd@gmail.com"
] | yxxcrtd@gmail.com |
3d5900c83340640948a49c7c21023882c3c3f36a | 977af59a7e00524563176de990d92588f60d858c | /src/main/java/com/aol/cyclops/internal/Utils.java | 0b0b647aef9786a4771a53056987151b610b5459 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | richardy2012/cyclops-react | 173285f1a7be45b7b3c38888d53611b8929d3d62 | 0c2a98272211ef642ebaf3889d49f40a5acfeaeb | refs/heads/master | 2020-06-16T22:19:53.009821 | 2016-11-28T23:18:33 | 2016-11-28T23:18:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 302 | java | package com.aol.cyclops.internal;
import java.util.List;
import lombok.experimental.UtilityClass;
@UtilityClass
public class Utils {
public static <T> T firstOrNull(final List<T> list) {
if (list == null || list.size() == 0)
return null;
return list.get(0);
}
}
| [
"john.mcclean@teamaol.com"
] | john.mcclean@teamaol.com |
09c0b746cf55f4d0310c19d1a3787f6b7a7426f4 | cb4674e647afdb82fd4bc955ff07d95c7fdd3822 | /opencloud-app/opencloud-admin-provider/src/main/java/com/github/lyd/admin/provider/configuration/ResourceServerConfiguration.java | 6ad7cd7aa5ddfabc269274776bae98ed70a8c8c8 | [
"MIT"
] | permissive | james1106/open-cloud | 9607b9252432876c2102251c6850869380761d42 | 95a4a3ef3d2040b02d7570be911c29c2ee073dff | refs/heads/master | 2020-04-30T13:12:50.292590 | 2019-03-20T17:54:10 | 2019-03-20T17:54:10 | 176,849,866 | 0 | 1 | MIT | 2019-03-21T01:59:02 | 2019-03-21T01:59:02 | null | UTF-8 | Java | false | false | 2,561 | java | package com.github.lyd.admin.provider.configuration;
import com.github.lyd.common.constants.CommonConstants;
import com.github.lyd.common.exception.OpenAccessDeniedHandler;
import com.github.lyd.common.exception.OpenAuthenticationEntryPoint;
import com.github.lyd.common.security.OpenHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest;
import org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter;
import org.springframework.security.oauth2.config.annotation.web.configurers.ResourceServerSecurityConfigurer;
/**
* oauth2资源服务器配置
* 如过新建一个资源服务器,直接复制该类到项目中.
*
* @author: liuyadu
* @date: 2018/10/23 10:31
* @description:
*/
@Configuration
@EnableResourceServer
public class ResourceServerConfiguration extends ResourceServerConfigurerAdapter {
@Autowired
private ResourceServerProperties properties;
@Override
public void configure(ResourceServerSecurityConfigurer resources) throws Exception {
// 构建远程获取token,这里是为了支持自定义用户信息转换器
resources.tokenServices(OpenHelper.buildRemoteTokenServices(properties));
}
@Override
public void configure(HttpSecurity http) throws Exception {
http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.IF_REQUIRED)
.and()
.authorizeRequests()
.antMatchers("/login/token","/sign").permitAll()
// 只有拥有actuator权限可执行远程端点
.requestMatchers(EndpointRequest.toAnyEndpoint()).hasAnyAuthority(CommonConstants.AUTHORITY_ACTUATOR)
.anyRequest().authenticated()
.and()
//认证鉴权错误处理
.exceptionHandling()
.accessDeniedHandler(new OpenAccessDeniedHandler())
.authenticationEntryPoint(new OpenAuthenticationEntryPoint())
.and()
.csrf().disable();
}
}
| [
"515608851@qq.com"
] | 515608851@qq.com |
dffa44355a3654f811d6aa9103488f6d86d1e495 | 70103ef5ed97bad60ee86c566c0bdd14b0050778 | /src/test/java/com/credex/fs/digital/repository/timezone/DateTimeWrapperRepository.java | 137d0878c07e02d1402997f8d1ab3c9b573c9bde | [] | no_license | alexjilavu/Smarthack-2021 | 7a127166cef52bfc9ee08ef1840c0fde2d2b79aa | 564abdc14df4981cdcad984a661f105327758559 | refs/heads/master | 2023-08-29T18:34:44.280519 | 2021-11-07T10:42:00 | 2021-11-07T10:42:00 | 423,957,218 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 346 | java | package com.credex.fs.digital.repository.timezone;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
/**
* Spring Data JPA repository for the {@link DateTimeWrapper} entity.
*/
@Repository
public interface DateTimeWrapperRepository extends JpaRepository<DateTimeWrapper, Long> {}
| [
"alexjilavu17@gmail.com"
] | alexjilavu17@gmail.com |
11f09521b2acad8d22ec1f8d7458481b39b71b1d | 4ae8c9258496610529a50b071c703027105f0ffc | /aliyun-java-sdk-ons/src/main/java/com/aliyuncs/ons/model/v20170918/OnsMessagePageQueryByTopicRequest.java | c328b1d19757fb1b2e793627d9fce9ac9bc8c2d0 | [
"Apache-2.0"
] | permissive | haoqicherish/aliyun-openapi-java-sdk | 78185684bff9faaa09e39719757987466c30b820 | 3ff5e4551ce0dd534c21b42a96402c44f3c75599 | refs/heads/master | 2020-03-09T16:43:36.806041 | 2018-04-10T06:59:45 | 2018-04-10T06:59:45 | 128,892,355 | 1 | 0 | null | 2018-04-10T07:31:42 | 2018-04-10T07:31:41 | null | UTF-8 | Java | false | false | 3,619 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.aliyuncs.ons.model.v20170918;
import com.aliyuncs.RpcAcsRequest;
/**
* @author auto create
* @version
*/
public class OnsMessagePageQueryByTopicRequest extends RpcAcsRequest<OnsMessagePageQueryByTopicResponse> {
public OnsMessagePageQueryByTopicRequest() {
super("Ons", "2017-09-18", "OnsMessagePageQueryByTopic");
}
private Long preventCache;
private String onsRegionId;
private String onsPlatform;
private Integer pageSize;
private String topic;
private Long endTime;
private Long beginTime;
private Integer currentPage;
private String taskId;
public Long getPreventCache() {
return this.preventCache;
}
public void setPreventCache(Long preventCache) {
this.preventCache = preventCache;
if(preventCache != null){
putQueryParameter("PreventCache", preventCache.toString());
}
}
public String getOnsRegionId() {
return this.onsRegionId;
}
public void setOnsRegionId(String onsRegionId) {
this.onsRegionId = onsRegionId;
if(onsRegionId != null){
putQueryParameter("OnsRegionId", onsRegionId);
}
}
public String getOnsPlatform() {
return this.onsPlatform;
}
public void setOnsPlatform(String onsPlatform) {
this.onsPlatform = onsPlatform;
if(onsPlatform != null){
putQueryParameter("OnsPlatform", onsPlatform);
}
}
public Integer getPageSize() {
return this.pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
if(pageSize != null){
putQueryParameter("PageSize", pageSize.toString());
}
}
public String getTopic() {
return this.topic;
}
public void setTopic(String topic) {
this.topic = topic;
if(topic != null){
putQueryParameter("Topic", topic);
}
}
public Long getEndTime() {
return this.endTime;
}
public void setEndTime(Long endTime) {
this.endTime = endTime;
if(endTime != null){
putQueryParameter("EndTime", endTime.toString());
}
}
public Long getBeginTime() {
return this.beginTime;
}
public void setBeginTime(Long beginTime) {
this.beginTime = beginTime;
if(beginTime != null){
putQueryParameter("BeginTime", beginTime.toString());
}
}
public Integer getCurrentPage() {
return this.currentPage;
}
public void setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
if(currentPage != null){
putQueryParameter("CurrentPage", currentPage.toString());
}
}
public String getTaskId() {
return this.taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
if(taskId != null){
putQueryParameter("TaskId", taskId);
}
}
@Override
public Class<OnsMessagePageQueryByTopicResponse> getResponseClass() {
return OnsMessagePageQueryByTopicResponse.class;
}
}
| [
"haowei.yao@alibaba-inc.com"
] | haowei.yao@alibaba-inc.com |
f3f50781bfa5c5963cdc46c6f35aeb20aff8810d | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/LANG-13b-4-18-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/apache/commons/lang3/SerializationUtils$ClassLoaderAwareObjectInputStream_ESTest_scaffolding.java | 6c42a11c99e9fe69447c14071c2fb6ea5e8a701f | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 481 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Tue Jan 21 20:41:05 UTC 2020
*/
package org.apache.commons.lang3;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class SerializationUtils$ClassLoaderAwareObjectInputStream_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
a241c00723d44fe8358d3232d77599ebc41948d0 | 5fec439b082b5e4e471949824a4270e706f9b792 | /src/exp/iTrust/all_changes/iTrust_VSM_JSEP_All_Changes.java | 839c164e2d73da1ac5efe5bbdd7b2d0dd3d1730f | [] | no_license | Blickwinkel1107/ReqRenew | 311311531a47bf0b71d2d3658e8a0ddd661a778f | 755ff48ee85894a2f05e7756b2e4f11cd9fbc9da | refs/heads/master | 2020-03-08T05:10:17.329490 | 2018-04-03T17:11:38 | 2018-04-03T17:11:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,500 | java | package exp.iTrust.all_changes;
import core.algo.JSS2015_CSTI;
import core.dataset.TextDataset;
import core.ir.IR;
import core.ir.IRModelConst;
import core.metrics.Result;
import exp.Aqualush.all_changes.MergeResult;
import exp.iTrust.ITrustSetting;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
/**
* Created by niejia on 15/12/14.
*/
public class iTrust_VSM_JSEP_All_Changes {
private static Set<String> changesVersion;
private static Map<String, Result> changesResult;
private static Map<String, TextDataset> changesTextDataset;
public static void main(String[] args) {
getResult();
}
public static Result getResult() {
changesVersion = new HashSet<>();
changesResult = new LinkedHashMap<>();
changesTextDataset = new LinkedHashMap<>();
jsep(ITrustSetting.iTrust_Change1_GroupedByJSEP,
ITrustSetting.iTrust_CleanedRequirement, ITrustSetting.iTrustOracleChange1, "Change1");
//
jsep(ITrustSetting.iTrust_Change2_GroupedByJSEP,
ITrustSetting.iTrust_CleanedRequirement, ITrustSetting.iTrustOracleChange2, "Change2");
// jsep(ITrustSetting.iTrust_Change3_GroupedByJSEP,
// ITrustSetting.iTrust_CleanedRequirement, ITrustSetting.iTrustOracleChange3, "Change3");
//
// jsep(ITrustSetting.iTrust_Change4_GroupedByJSEP,
// ITrustSetting.iTrust_CleanedRequirement, ITrustSetting.iTrustOracleChange4, "Change4");
//
// jsep(ITrustSetting.iTrust_Change5_GroupedByJSEP,
// ITrustSetting.iTrust_CleanedRequirement, ITrustSetting.iTrustOracleChange5, "Change5");
////
// jsep(ITrustSetting.iTrust_Change6_GroupedByJSEP,
// ITrustSetting.iTrust_CleanedRequirement, ITrustSetting.iTrustOracleChange6, "Change6");
jsep(ITrustSetting.iTrust_Change7_GroupedByJSEP,
ITrustSetting.iTrust_CleanedRequirement, ITrustSetting.iTrustOracleChange7, "Change7");
// jsep(ITrustSetting.iTrust_Change8_GroupedByJSEP,
// ITrustSetting.iTrust_CleanedRequirement, ITrustSetting.iTrustOracleChange8, "Change8");
jsep(ITrustSetting.iTrust_Change9_GroupedByJSEP,
ITrustSetting.iTrust_CleanedRequirement, ITrustSetting.iTrustOracleChange9, "Change9");
// jsep(ITrustSetting.iTrust_Change10_GroupedByJSEP,
// ITrustSetting.iTrust_CleanedRequirement, ITrustSetting.iTrustOracleChange10, "Change10");
// jsep(ITrustSetting.iTrust_ChangeV11_GroupedByJSEP, ITrustSetting.iTrust_CleanedRequirement, ITrustSetting.iTrustOracleChangeV11, "iTrust");
MergeResult mergeResult = new MergeResult(changesVersion, changesResult,changesTextDataset);
Result result_jsep_merged = mergeResult.getMergedResult();
return result_jsep_merged;
}
public static void jsep(String code, String req, String oracle, String change) {
System.out.println("----------" + change + "----------");
TextDataset textDataset = new TextDataset(code,
req, oracle);
Result result_ir = IR.compute(textDataset, IRModelConst.VSM_ALL, new JSS2015_CSTI(), change);
result_ir.showMatrix();
result_ir.showAveragePrecisionByRanklist();
changesVersion.add(change);
changesResult.put(change, result_ir);
changesTextDataset.put(change, textDataset);
System.out.println("--------------------");
}
}
| [
"qynnine@gmail.com"
] | qynnine@gmail.com |
30d9eddc3bc8ee9db4dc53bd9c9b586969604a02 | 1788afb3076bb5803bc1aef846172b4c23df2536 | /src/main/java/com/adms/kpireport/service/impl/KpiRetentionServiceImpl.java | ff9341543be39938792dd7f0e4a686e83acaab2a | [
"Apache-2.0"
] | permissive | AEGONTH/kpi-report-service | 3572324c19a8c4a3168496f7ab47e45344d3817d | a28b3590ad2a713c708a3f1e1c479d044b994e5a | refs/heads/master | 2021-01-19T13:33:17.309475 | 2015-08-21T02:42:09 | 2015-08-21T02:42:09 | 38,294,401 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 894 | java | package com.adms.kpireport.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.adms.entity.bean.KpiRetention;
import com.adms.kpireport.dao.KpiRetentionDao;
import com.adms.kpireport.service.KpiRetentionService;
@Service("kpiRetentionService")
@Transactional
public class KpiRetentionServiceImpl implements KpiRetentionService {
@Autowired
private KpiRetentionDao kpiRetentionDao;
public KpiRetentionServiceImpl() {
}
public void setKpiRetentionDao(KpiRetentionDao kpiRetentionDao) {
this.kpiRetentionDao = kpiRetentionDao;
}
@Override
public List<KpiRetention> findByNamedQuery(String namedQuery, Object... vals) throws Exception {
return kpiRetentionDao.findByNamedQuery(namedQuery, vals);
}
}
| [
"moth.pc@gmail.com"
] | moth.pc@gmail.com |
27b14f4ebc9c8f8a17f77da01819d0950db195d4 | f3e4a11ed6d7578d57e93b008a87b2955ac61238 | /src/main/java/slimeknights/tconstruct/smeltery/client/SingleItemScreenFactory.java | a5d75acc615022c126d9f451421e4b4bb83d7182 | [
"MIT"
] | permissive | MuTBu/TinkersConstruct | ff258b82703fc4523bddd0efab2d8262a294cb00 | 3800876e06ed2d3365cd4bb44fedcabeaa18793e | refs/heads/1.16 | 2023-06-12T07:16:41.339299 | 2021-06-28T06:37:01 | 2021-06-28T06:37:01 | 380,930,813 | 0 | 0 | null | 2021-06-28T06:37:13 | 2021-06-28T06:37:12 | null | UTF-8 | Java | false | false | 1,610 | java | package slimeknights.tconstruct.smeltery.client;
import net.minecraft.client.gui.ScreenManager.IScreenFactory;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import slimeknights.mantle.client.screen.BackgroundContainerScreen;
import slimeknights.tconstruct.library.Util;
import slimeknights.tconstruct.smeltery.inventory.SingleItemContainer;
import javax.annotation.Nullable;
/**
* Screen factory for the single item container, one container for multiple backgrounds
*/
public class SingleItemScreenFactory implements IScreenFactory<SingleItemContainer,BackgroundContainerScreen<SingleItemContainer>> {
private static final int HEIGHT = 133;
private static final ResourceLocation DEFAULT = Util.getResource("textures/gui/blank.png");
/**
* Gets the background path for the given tile
* @param tile Tile
* @return Background path
*/
private static ResourceLocation getBackground(@Nullable TileEntity tile) {
if (tile != null) {
ResourceLocation id = tile.getType().getRegistryName();
if (id != null) {
return new ResourceLocation(id.getNamespace(), String.format("textures/gui/%s.png", id.getPath()));
}
}
return DEFAULT;
}
@Override
public BackgroundContainerScreen<SingleItemContainer> create(SingleItemContainer container, PlayerInventory inventory, ITextComponent name) {
return new BackgroundContainerScreen<>(container, inventory, name, HEIGHT, getBackground(container.getTile()));
}
}
| [
"knightminer4@gmail.com"
] | knightminer4@gmail.com |
bc8f8d20d452ad323b421d413529a36ff6d8653e | 0308ca5b152a082c1a206a1a136fd45e79b48143 | /usvao/prototype/operations/projects/externalmonitor/trunk/src/java/Utils.java | 50c3b03a35bbf2420c0585a32cebae7007909bb8 | [] | no_license | Schwarzam/usvirtualobservatory | b609bf21a09c187b70e311a4c857516284049c31 | 53fe6c14cc9312d048326acfa25377e3eac59858 | refs/heads/master | 2022-03-28T23:38:58.847018 | 2019-11-27T16:05:47 | 2019-11-27T16:05:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,592 | java | import java.io.*;
import java.sql.*;
import java.net.*;
import java.util.*;
import java.util.regex.*;
import java.text.*;
public class Utils
{
public static ResultSet getData(Connection con)
{
ResultSet result = null;
try
{
Statement stmt = con.createStatement();
String query = "(select s.serviceId, s.name, t.testid,testname from Tests t, Services s ";
query += " where t.serviceId = s.serviceId and t.deleted is null group by t.testid)";
result = stmt.executeQuery(query);
}
catch (Exception e)
{
System.out.println(e);
}
return result;
}
public static ResultSet getServiceData(Connection con)
{
ResultSet result = null;
String servicename = FlagHolder.getspecialid();
try
{
Statement stmt = con.createStatement();
String query = "(select s.serviceId, s.name, t.testid,testname from Tests t, Services s ";
query += " where t.serviceId = s.serviceId and s.name = '";
query += servicename + "' and t.deleted is null group by t.testid) ";
result = stmt.executeQuery(query);
}
catch (Exception e)
{
System.out.println(e);
}
return result;
}
public static ResultSet getServiceData(Connection con, Calendar now)
{
int h = now.get(Calendar.HOUR_OF_DAY);
System.out.println("hour " + h);
ResultSet result = null;
String servicename = FlagHolder.getspecialid();
try
{
Statement stmt = con.createStatement();
String query = "(select s.serviceId, s.name, t.testid,testname from Tests t, Services s ";
query += " where t.serviceId = s.serviceId and s.name = '";
query += servicename + "' and t.deleted is null group by t.testid) ";
result = stmt.executeQuery(query);
}
catch (Exception e)
{
System.out.println(e);
}
return result;
}
public static ResultSet getData(Connection con, Calendar now)
{
int h = now.get(Calendar.HOUR_OF_DAY);
System.out.println("hour " + h);
ResultSet result = null;
try
{
Statement stmt = con.createStatement();
String query = "(select s.serviceId, s.name, t.testid,testname from Tests t, Services s ";
query += " where t.serviceId = s.serviceId ";
query += " and t.deleted is null and mod (" + h + ", s.cadence) =0";
query += " group by t.testid)";
result = stmt.executeQuery(query);
System.out.println(query);
}
catch (Exception e)
{
System.out.println(e);
}
return result;
}
public static void processOptions(String[] args)
{
MySqlConnection mycon = new MySqlConnection();
Connection con = mycon.getConnection();
FlagHolder.storeflag("default",null); //no options used
if (args.length == 1)
{
FlagHolder.storeflag("service",args[0]);
}
else if (args.length == 2)
{
if (args[1].matches("\\w"))
{
FlagHolder.storeflag("service",args[0],"T");
System.out.println("the cat in thehat");
}
}
}
public static HashMap buildURLs(ResultSet result)
{
HashMap hash = new HashMap();
try
{
while (result.next())
{
String serviceId = result.getString("serviceId");
String name = result.getString("name");
String testid = result.getString("testid");
String testname = result.getString("testname");
String value = serviceId + ":" + name + ":" + testid + ":" + testname;
String http = "http://";
String url = "heasarcdev.gsfc.nasa.gov/vo/external_monitor/test.pl?name=";
try
{
//url = URLEncoder.encode(url, "UTF-8");
name = URLEncoder.encode(name, "UTF-8");
testid = URLEncoder.encode(testid,"UTF-8");
}
catch(UnsupportedEncodingException e)
{
System.out.println(e);
}
url = http + url + name + "&testid=" + testid + "&testresult=yes";
hash.put(url,value);
System.out.println(url);
}
}
catch (Exception e)
{
System.out.println("GetServices.java: " + e);
}
return hash;
}
public static int getHighestRunidPlusOne(Statement stmt)
{
int largestrunid = 1;
try
{
String testtablequery = "select runid from Testhistory order by runid desc limit 1";
ResultSet rs = stmt.executeQuery(testtablequery);
boolean found;
found = rs.next();
if (found)
{
largestrunid = rs.getInt("runid");
largestrunid += 1;
}
}
catch (Exception e)
{
System.out.println(e);
}
return largestrunid;
}
public static HashMap getErrorCodes(Connection con)
{
HashMap errorcodes = new HashMap();
ReadTable TR = new ReadTable(con,"ErrorCodes",0);
ResultSet result = TR.readTable();
try
{
while (result.next())
{
String id = result.getString("monitorResCode");
String message = result.getString("description");
errorcodes.put(message,id);
}
}
catch (Exception e)
{
System.out.println(e);
}
return errorcodes;
}
public static void printErrorCodes(HashMap errorcodes)
{
Iterator it = errorcodes.entrySet().iterator();
while(it.hasNext())
{
Map.Entry entry = (Map.Entry)it.next();
String a = (String)entry.getKey();
String b = (String)entry.getValue();
}
}
}
| [
"usvirtualobservatory@5a1e9bf7-f4d4-f7d4-5b89-e7d39643c4b5"
] | usvirtualobservatory@5a1e9bf7-f4d4-f7d4-5b89-e7d39643c4b5 |
4a02252195af1df9a987ca36ae0395a0035af037 | 21da478fcabe0a979bfb3857896dfee6863c5c6a | /module3/demo/case_study_furama_jsp_servlet/src/main/java/bo/contract/IContractBO.java | 109440902e204decf53ab43adea2fd4e18974c2f | [] | no_license | chauluong1995/C0620G1-LuongPhuChau | e1de1ef3207a950ba18d284a29b7d9325ec925df | a558b5b6c8a70920af29f88e63f830d7e04eea86 | refs/heads/master | 2023-06-24T03:25:33.621127 | 2021-05-26T07:49:06 | 2021-05-26T07:49:06 | 275,071,138 | 1 | 5 | null | 2021-07-22T21:00:34 | 2020-06-26T04:13:09 | HTML | UTF-8 | Java | false | false | 197 | java | package bo.contract;
import model.contract.Contract;
import java.util.List;
public interface IContractBO {
List<Contract> findAllContract();
String addNewContract(Contract contract);
}
| [
"supea52795@gmail.com"
] | supea52795@gmail.com |
64d36ad7dac0df5e05da54af687a408c5e6ca0ef | 86fc030462b34185e0b1e956b70ece610ad6c77a | /src/main/java/com/alipay/api/domain/EquipmentAuthRemoveQueryBypageDTO.java | a576b3147968278ce704f9a45630b461cc9024e1 | [] | no_license | xiang2shen/magic-box-alipay | 53cba5c93eb1094f069777c402662330b458e868 | 58573e0f61334748cbb9e580c51bd15b4003f8c8 | refs/heads/master | 2021-05-08T21:50:15.993077 | 2018-11-12T07:49:35 | 2018-11-12T07:49:35 | 119,653,252 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 863 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 机具解绑按照条件分页查询返回对象
*
* @author auto create
* @since 1.0, 2016-10-26 17:43:38
*/
public class EquipmentAuthRemoveQueryBypageDTO extends AlipayObject {
private static final long serialVersionUID = 8757828996192644373L;
/**
* 机具编号
*/
@ApiField("device_id")
private String deviceId;
/**
* 解绑时间
*/
@ApiField("unbind_time")
private String unbindTime;
public String getDeviceId() {
return this.deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public String getUnbindTime() {
return this.unbindTime;
}
public void setUnbindTime(String unbindTime) {
this.unbindTime = unbindTime;
}
}
| [
"xiangshuo@10.17.6.161"
] | xiangshuo@10.17.6.161 |
2751276c06e10fcc5b7e5dfbfbd0f508fbe2e206 | 0735d7bb62b6cfb538985a278b77917685de3526 | /io/reactivex/internal/operators/observable/ObservableLastMaybe.java | 5f699c20131ae767976574a0189ea015f3e0de69 | [] | no_license | Denoah/personaltrackerround | e18ceaad910f1393f2dd9f21e9055148cda57837 | b38493ccc7efff32c3de8fe61704e767e5ac62b7 | refs/heads/master | 2021-05-20T03:34:17.333532 | 2020-04-02T14:47:31 | 2020-04-02T14:51:01 | 252,166,069 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,117 | java | package io.reactivex.internal.operators.observable;
import io.reactivex.Maybe;
import io.reactivex.MaybeObserver;
import io.reactivex.ObservableSource;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;
import io.reactivex.internal.disposables.DisposableHelper;
public final class ObservableLastMaybe<T>
extends Maybe<T>
{
final ObservableSource<T> source;
public ObservableLastMaybe(ObservableSource<T> paramObservableSource)
{
this.source = paramObservableSource;
}
protected void subscribeActual(MaybeObserver<? super T> paramMaybeObserver)
{
this.source.subscribe(new LastObserver(paramMaybeObserver));
}
static final class LastObserver<T>
implements Observer<T>, Disposable
{
final MaybeObserver<? super T> downstream;
T item;
Disposable upstream;
LastObserver(MaybeObserver<? super T> paramMaybeObserver)
{
this.downstream = paramMaybeObserver;
}
public void dispose()
{
this.upstream.dispose();
this.upstream = DisposableHelper.DISPOSED;
}
public boolean isDisposed()
{
boolean bool;
if (this.upstream == DisposableHelper.DISPOSED) {
bool = true;
} else {
bool = false;
}
return bool;
}
public void onComplete()
{
this.upstream = DisposableHelper.DISPOSED;
Object localObject = this.item;
if (localObject != null)
{
this.item = null;
this.downstream.onSuccess(localObject);
}
else
{
this.downstream.onComplete();
}
}
public void onError(Throwable paramThrowable)
{
this.upstream = DisposableHelper.DISPOSED;
this.item = null;
this.downstream.onError(paramThrowable);
}
public void onNext(T paramT)
{
this.item = paramT;
}
public void onSubscribe(Disposable paramDisposable)
{
if (DisposableHelper.validate(this.upstream, paramDisposable))
{
this.upstream = paramDisposable;
this.downstream.onSubscribe(this);
}
}
}
}
| [
"ivanov.a@i-teco.ru"
] | ivanov.a@i-teco.ru |
6d92830d12839b5dd29d059523dd44e2cfa9fb7d | 3c68b69c4737561e3a6e4bff239aa88c43502594 | /src/main/java/esf/entity/ApInvoiceLine.java | 1ef5388040760558d01bcddfaad6ce5cee4a5fcc | [] | no_license | eugenenew80/esf | 4531e9ec2d37df4f66ec1a9f5b01cf9bdf968c46 | 828fae5fef4625ddff61d1e6572c745ce70aaeaa | refs/heads/master | 2021-01-21T11:47:13.511826 | 2017-09-06T12:54:07 | 2017-09-06T12:54:07 | 102,023,473 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 515 | java | package esf.entity;
import javax.persistence.Entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Entity
@Data
@EqualsAndHashCode(of= {"id"})
public class ApInvoiceLine {
private Long id;
private String description;
private Double ndsAmount;
private Double ndsRate;
private Double priceWithTax;
private Double priceWithoutTax;
private Double quantity;
private Double turnoverSize;
private String unitNomenclature;
private Double unitPrice;
private ApInvoice invoice;
}
| [
"eugenenew80@gmail.com"
] | eugenenew80@gmail.com |
ad4387b750cb192e4b1e4689126664818826eb60 | 5fa40394963baf973cfd5a3770c1850be51efaae | /src/NHSensor/NHSensorSim/tools/AllParam.java | bfc4ee1cdcfc4ab71187e6c828b37b1575772b59 | [] | no_license | yejuns/wsn_java | 5c4d97cb6bc41b91ed16eafca5d14128ed45ed44 | f071cc72411ecc2866bff3dfc356f38b0c817411 | refs/heads/master | 2020-05-14T13:54:14.690176 | 2018-01-28T02:51:44 | 2018-01-28T02:51:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,374 | java | package NHSensor.NHSensorSim.tools;
import NHSensor.NHSensorSim.experiment.ExperimentParam;
import NHSensor.NHSensorSim.util.ReflectUtil;
public class AllParam extends ExperimentParam {
int networkID;
int nodeNum;
double queryRegionRate;
double gridWidthRate;
double radioRange;
int queryMessageSize;
int senseDataSize;
double networkWidth = 100;
double networkHeight = 100;
double initialEnergy;
public AllParam() {
}
public void setNetworkID(int networkID) {
this.networkID = networkID;
}
public int getNetworkID() {
return networkID;
}
public void setNodeNum(int nodeNum) {
this.nodeNum = nodeNum;
}
public int getNodeNum() {
return nodeNum;
}
public void setQueryRegionRate(double queryRegionRate) {
this.queryRegionRate = queryRegionRate;
}
public double getQueryRegionRate() {
return queryRegionRate;
}
public void setGridWidthRate(double gridWidthRate) {
this.gridWidthRate = gridWidthRate;
}
public double getGridWidthRate() {
return gridWidthRate;
}
public void setRadioRange(double radioRange) {
this.radioRange = radioRange;
}
public double getRadioRange() {
return radioRange;
}
public void setQueryMessageSize(int queryMessageSize) {
this.queryMessageSize = queryMessageSize;
}
public int getQueryMessageSize() {
return queryMessageSize;
}
public void setSenseDataSize(int senseDataSize) {
this.senseDataSize = senseDataSize;
}
public int getSenseDataSize() {
return senseDataSize;
}
public void setNetworkWidth(double networkWidth) {
this.networkWidth = networkWidth;
}
public double getNetworkWidth() {
return networkWidth;
}
public void setNetworkHeight(double networkHeight) {
this.networkHeight = networkHeight;
}
public double getNetworkHeight() {
return networkHeight;
}
public void setInitialEnergy(double initialEnergy) {
this.initialEnergy = initialEnergy;
}
public double getInitialEnergy() {
return initialEnergy;
}
public String toString() {
try {
return ReflectUtil.objectToString(this);
} catch (Exception e) {
e.printStackTrace();
return e.toString();
}
}
public static AllParam fromString(String str) throws Exception {
return (AllParam) ReflectUtil.stringToObject(str, AllParam.class);
}
}
| [
"lixinlu2000@163.com"
] | lixinlu2000@163.com |
a7a2a72a0db20272c376be0c566b2db8a9e01a64 | 4d66ae645bcb9159a4b6d0fdb2f24e029da00847 | /frame-root/frame-util/src/main/java/com/huatek/frame/util/CommonConstants.java | 23eba6a3ede7f8f97652b375bd89826e6276943e | [] | no_license | GitWangH/JiFen | 1e3722d49502e8ac7de2cfa4e97e99cf47e404df | 0cec185c83c0f76a97b4d00fc8f1cfb230415a8e | refs/heads/master | 2022-12-20T13:28:57.456912 | 2019-05-24T06:00:16 | 2019-05-24T06:00:16 | 131,266,103 | 0 | 2 | null | 2022-12-10T01:13:11 | 2018-04-27T08:07:02 | JavaScript | UTF-8 | Java | false | false | 1,703 | java | package com.huatek.frame.util;
/**
* 定义公共常量信息
*
* @author Kevin
*
* 2014年12月4日
*/
public class CommonConstants {
// 空格
public static final String BLANK = " ".intern();
// 点
public static final String DOT = ".".intern();
// 逗号
public static final String COMMA = ",".intern();
// 逗号
public static final String COLON = ":".intern();
// 空字符串
public static final String EMPTY_STRING = "".intern();
// 双引号
public static final String DOUBLE_QUOTATION_MARK = "\"";
// 单引号
public static final String SINGLE_QUOTATION_MARK = "'";
// 斜线
public static final String SLASH = "/";
// 反斜线
public static final String BACK_LASH = "\\";
// 换行符
public static final String NEW_LINE = "\n";
// 正则表达式--点
public static final String REGULAR_EXPRESSION_DOT = "\\.";
// 下划线
public static final String UNDER_LINE = "_";
// MD5编码解码
public static final String ENCODE_DECODE_MD5 = "MD5".intern();
// HmacMD5编码解码
public static final String ENCODE_DECODE_HMACMD5 = "HmacMD5".intern();
// 字母及数字串
public static final String CHARS_AND_NUMBERS = "abcdefghijklmnopqrstuvwxyz0123456789".intern();
// UTF-8字符编码
public static final String CHAR_ENCODING_UTF8 = "UTF-8".intern();
// ISO8859-1字符编码
public static final String CHAR_ENCODING_ISO8859 = "ISO8859-1".intern();
// 国家-语言_ZH
public static final String I18N_ZH = "zh-CN".intern();
// 时间戳格式--带时分秒
public static final String TIMESTAMP_FORMAT_H_M_S = "yyyy-MM-dd HH:mm:ss".intern();
//CHAR_0
public static final String CHAR_NUM_0 = "0".intern();
}
| [
"15771883191@163.com"
] | 15771883191@163.com |
6f6cd9f703bba0be8381897c1fe0241dc9a080d4 | 631fbbb8b7654fc3097beae36598ac625f488624 | /hadoop-2.0.0/src/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/TestRecordFactory.java | 19c50ce1cf5952ab39ec40475ba071900e65ac46 | [] | no_license | edquist/hadoop-osg | 462a0dda97fb89ad3cd8000b8d614ed467d2becd | 923c7fbe69e21fe44e175b55917b744e6984e113 | refs/heads/master | 2021-05-06T13:16:36.922758 | 2016-02-17T01:18:59 | 2016-02-17T03:33:17 | 113,215,423 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,080 | java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn;
import junit.framework.Assert;
import org.apache.hadoop.yarn.factories.RecordFactory;
import org.apache.hadoop.yarn.factories.impl.pb.RecordFactoryPBImpl;
import org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest;
import org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse;
import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.AllocateRequestPBImpl;
import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.AllocateResponsePBImpl;
import org.junit.Test;
public class TestRecordFactory {
@Test
public void testPbRecordFactory() {
RecordFactory pbRecordFactory = RecordFactoryPBImpl.get();
try {
AllocateResponse response =
pbRecordFactory.newRecordInstance(AllocateResponse.class);
Assert.assertEquals(AllocateResponsePBImpl.class, response.getClass());
} catch (YarnException e) {
e.printStackTrace();
Assert.fail("Failed to crete record");
}
try {
AllocateRequest response =
pbRecordFactory.newRecordInstance(AllocateRequest.class);
Assert.assertEquals(AllocateRequestPBImpl.class, response.getClass());
} catch (YarnException e) {
e.printStackTrace();
Assert.fail("Failed to crete record");
}
}
}
| [
"edquist@cs.wisc.edu"
] | edquist@cs.wisc.edu |
e51ea30c3072622d2c593b3f014a7664c43adb69 | dc5864c49333ac1b63cb8c82d7135009c846a2ab | /android/support/v7/app/AppCompatDelegateImplV11.java | e09072f120accb388e0cf756e63bef3e15eba068 | [] | no_license | AndroidSDKSources/android-sdk-sources-for-api-level-MNC | c78523c6251e1aefcc423d0166015fd550f3712d | 277d2349e5762fdfaffb8b346994a5e4d7f367e1 | refs/heads/master | 2021-01-22T00:10:20.275475 | 2015-07-03T12:37:41 | 2015-07-03T12:37:41 | 38,491,940 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,703 | java | /*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.support.v7.app;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
class AppCompatDelegateImplV11 extends AppCompatDelegateImplV7 {
AppCompatDelegateImplV11(Context context, Window window, AppCompatCallback callback) {
super(context, window, callback);
}
View callActivityOnCreateView(View parent, String name, Context context, AttributeSet attrs) {
// First let super have a try, this allows FragmentActivity to inflate any support
// fragments
final View view = super.callActivityOnCreateView(parent, name, context, attrs);
if (view != null) {
return view;
}
// Now, let the Activity's LayoutInflater.Factory2 method try...
if (mOriginalWindowCallback instanceof LayoutInflater.Factory2) {
return ((LayoutInflater.Factory2) mOriginalWindowCallback)
.onCreateView(parent, name, context, attrs);
}
return null;
}
}
| [
"root@ifeegoo.com"
] | root@ifeegoo.com |
a04e5c03357d306cd93e07575335af5cb46d76ce | 477496d43be8b24a60ac1ccee12b3c887062cebd | /shirochapter16/src/main/java/com/haien/chapter16/web/controller/OrganizationController.java | f0ee0bc6afe7de44de88e3550b56c0731f9a2e75 | [] | no_license | Eliyser/my-shiro-example | e860ba7f5b2bb77a87b2b9ec77c46207a260b985 | 75dba475dc50530820d105da87ff8b031701e564 | refs/heads/master | 2020-05-20T23:45:31.231923 | 2019-05-09T14:06:04 | 2019-05-09T14:06:04 | 185,808,582 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,482 | java | package com.haien.chapter16.web.controller;
import com.haien.chapter16.entity.Organization;
import com.haien.chapter16.service.OrganizationService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
@Controller
@RequestMapping("/organization")
public class OrganizationController {
@Autowired
private OrganizationService organizationService;
@RequiresPermissions("organization:view")
@RequestMapping(method = RequestMethod.GET)
public String index(Model model) {
return "organization/index";
}
@RequiresPermissions("organization:view")
@RequestMapping(value = "/tree", method = RequestMethod.GET)
public String showTree(Model model) {
model.addAttribute("organizationList", organizationService.findAll());
return "organization/tree";
}
@RequiresPermissions("organization:create")
@RequestMapping(value = "/{parentId}/appendChild", method = RequestMethod.GET)
public String showAppendChildForm(@PathVariable("parentId") Long parentId, Model model) {
Organization parent = organizationService.findOne(parentId);
model.addAttribute("parent", parent);
Organization child = new Organization();
child.setParentId(parentId);
child.setParentIds(parent.makeSelfAsParentIds());
model.addAttribute("child", child);
model.addAttribute("op", "新增");
return "organization/appendChild";
}
@RequiresPermissions("organization:create")
@RequestMapping(value = "/{parentId}/appendChild", method = RequestMethod.POST)
public String create(Organization organization) {
organizationService.createOrganization(organization);
return "redirect:/organization/success";
}
@RequiresPermissions("organization:update")
@RequestMapping(value = "/{id}/maintain", method = RequestMethod.GET)
public String showMaintainForm(@PathVariable("id") Long id, Model model) {
model.addAttribute("organization", organizationService.findOne(id));
return "organization/maintain";
}
@RequiresPermissions("organization:update")
@RequestMapping(value = "/{id}/update", method = RequestMethod.POST)
public String update(Organization organization, RedirectAttributes redirectAttributes) {
organizationService.updateOrganization(organization);
redirectAttributes.addFlashAttribute("msg", "修改成功");
return "redirect:/organization/success";
}
@RequiresPermissions("organization:delete")
@RequestMapping(value = "/{id}/delete", method = RequestMethod.POST)
public String delete(@PathVariable("id") Long id, RedirectAttributes redirectAttributes) {
organizationService.deleteOrganization(id);
redirectAttributes.addFlashAttribute("msg", "删除成功");
return "redirect:/organization/success";
}
@RequiresPermissions("organization:update")
@RequestMapping(value = "/{sourceId}/move", method = RequestMethod.GET)
public String showMoveForm(@PathVariable("sourceId") Long sourceId, Model model) {
Organization source = organizationService.findOne(sourceId);
model.addAttribute("source", source);
model.addAttribute("targetList", organizationService.findAllWithExclude(source));
return "organization/move";
}
@RequiresPermissions("organization:update")
@RequestMapping(value = "/{sourceId}/move", method = RequestMethod.POST)
public String move(
@PathVariable("sourceId") Long sourceId,
@RequestParam("targetId") Long targetId) {
Organization source = organizationService.findOne(sourceId);
Organization target = organizationService.findOne(targetId);
organizationService.move(source, target);
return "redirect:/organization/success";
}
@RequiresPermissions("organization:view")
@RequestMapping(value = "/success", method = RequestMethod.GET)
public String success() {
return "organization/success";
}
}
| [
"1410343862@qq.com"
] | 1410343862@qq.com |
183a115d62d1534317b00fa5fa80370fba849fe6 | 6f5d1fb17cccbd34157ae2386a7e27dfc341bf38 | /src/main/java/com/alipay/api/domain/AOIinfo.java | a369b317419907ba2fbc1702528e250594da51a9 | [
"Apache-2.0"
] | permissive | CloudPai/alipay-sdk-java-all | 3fe8c71843b98124a522db2c32ec44d76fc6676a | 60fe7af9107a953e1e54748a19d6f1c9119585bb | refs/heads/master | 2023-04-05T17:40:14.510143 | 2021-04-22T03:45:58 | 2021-04-22T03:45:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,607 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* AOI信息
*
* @author auto create
* @since 1.0, 2018-12-14 17:32:06
*/
public class AOIinfo extends AlipayObject {
private static final long serialVersionUID = 2474759241586796812L;
/**
* 所属AOI所在区域编码
*/
@ApiField("adcode")
private String adcode;
/**
* 所属AOI点面积,单位是平方米
*/
@ApiField("area")
private String area;
/**
* 输入经纬度是否在aoi面之中,取值为0时表示在AOI内,其他值表示距离AOI的距离
*/
@ApiField("distance")
private String distance;
/**
* 所属AOI的id
*/
@ApiField("id")
private String id;
/**
* 所属AOI的中心点坐标
*/
@ApiField("location")
private String location;
/**
* 所属AOI名称
*/
@ApiField("name")
private String name;
public String getAdcode() {
return this.adcode;
}
public void setAdcode(String adcode) {
this.adcode = adcode;
}
public String getArea() {
return this.area;
}
public void setArea(String area) {
this.area = area;
}
public String getDistance() {
return this.distance;
}
public void setDistance(String distance) {
this.distance = distance;
}
public String getId() {
return this.id;
}
public void setId(String id) {
this.id = id;
}
public String getLocation() {
return this.location;
}
public void setLocation(String location) {
this.location = location;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
}
| [
"junying.wjy@alipay.com"
] | junying.wjy@alipay.com |
0c3fc93202bddf9428f155a7d07cb3777da3b194 | b0d4810cfcf2b74197884f85fd5f223626e1ac57 | /banking-core/src/main/java/aplikasi/banking/domain/NomerRekeningInvalidException.java | 69ab6575674ce89a882ba8e3cfbe365e9edbf972 | [] | no_license | endymuhardin/training-ws-2012-01 | 275ce1f19a7d08c5725086848fc9d10e376fa1e6 | f3bac48d443d0ef60fd8590ebf48d7236a84c43b | refs/heads/master | 2016-08-04T14:25:22.748406 | 2012-06-13T04:45:53 | 2012-06-13T04:45:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 583 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package aplikasi.banking.domain;
/**
*
* @author endy
*/
public class NomerRekeningInvalidException extends RuntimeException {
public NomerRekeningInvalidException(Throwable cause) {
super(cause);
}
public NomerRekeningInvalidException(String message, Throwable cause) {
super(message, cause);
}
public NomerRekeningInvalidException(String message) {
super(message);
}
public NomerRekeningInvalidException() {
}
}
| [
"endy.muhardin@gmail.com"
] | endy.muhardin@gmail.com |
c431e85ca0512cbfc834f2e6f9033df435afbc12 | 8a98577c5995449677ede2cbe1cc408c324efacc | /Big_Clone_Bench_files_used/bcb_reduced/3/selected/2025333.java | 88300d627aca99af2651c7690038cc0ee0756d6b | [
"MIT"
] | permissive | pombredanne/lsh-for-source-code | 9363cc0c9a8ddf16550ae4764859fa60186351dd | fac9adfbd98a4d73122a8fc1a0e0cc4f45e9dcd4 | refs/heads/master | 2020-08-05T02:28:55.370949 | 2017-10-18T23:57:08 | 2017-10-18T23:57:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,433 | java | package br.com.algdam.hashutil;
import br.com.algdam.gui.Dialog;
import com.sun.org.apache.xerces.internal.impl.dv.util.HexBin;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/**
* Esta classe utiliza biblioteca proprietária da sun
* com.sun.org.apache.xerces.internal.impl.dv.util.HexBin, porém os alertas
* estão suprimidos pela annotation
* @SuppressWarnings(value="RetentionPolicy.SOURCE")
* @author Tulio
*/
public class HashMD5 {
/**
* Gera código MD5 baseado em uma chave fornecida, o retorno do método é
* um array de bytes (bytes[])
* @param chave (String) chave que será convertida para MD5
* @return (byte[]) array de bytes com o MD5
*/
@SuppressWarnings(value = "RetentionPolicy.SOURCE")
public static byte[] getHashMD5(String chave) {
byte[] hashMd5 = null;
try {
MessageDigest md = MessageDigest.getInstance("MD5");
md.update(chave.getBytes());
hashMd5 = md.digest();
} catch (NoSuchAlgorithmException ex) {
ex.printStackTrace();
Dialog.erro(ex.getMessage(), null);
}
return (hashMd5);
}
/**
* Gera código MD5 baseado em uma chave fornecida, o retorno do método é
* em Hexadecimal retornado como Strig
* @param chave (String) chave que será convertida para MD5
* @return (String) string com o código em Hexadecimal
*/
public static String getHexaHashMD5(String chave) {
return (HexBin.encode(getHashMD5(chave)));
}
/**
* Compara se dois arrays de byte (byte[]) MD5 são iguais
* @param valor1 (byte[])
* @param valor2 (byte[])
* @return (boolean) true/false
*/
public static boolean comparaMD5(byte[] valor1, byte[] valor2) {
return (MessageDigest.isEqual(valor1, valor2));
}
/**
* Compara se duas string Hexadecimal MD5 são iguais
* @param hexa1 (String)
* @param hexa2 (String)
* @return (boolean) true/false
*/
public static boolean comparaHexaMD5(String hexa1, String hexa2) {
return (MessageDigest.isEqual(HexBin.decode(hexa1), HexBin.decode(hexa2)));
}
public static String converteMD5ByteToHexString(byte[] md5) {
return (HexBin.encode(md5));
}
public static byte[] converteMD5HexStringToByte(String md5) {
return (HexBin.decode(md5));
}
}
| [
"nishima@mymail.vcu.edu"
] | nishima@mymail.vcu.edu |
740c73b5d22c09205741537f3fb38c25466cbba3 | c501583b9b998984eb52229b9d3c38cd8f93d86e | /src/main/java/com/tencentcloudapi/ds/v20180523/models/SignKeyword.java | ae11d2afbe4779e0c2d072bb79c75d26c1652f79 | [
"Apache-2.0"
] | permissive | CoolLittle/tencentcloud-sdk-java | 20cf19d0648edda1a92d90e55b023a7c9774ffd4 | 9ed1f3da70a1e01df441ec23ca56973dc8c7f634 | refs/heads/master | 2020-03-25T20:36:42.081853 | 2018-08-06T03:11:32 | 2018-08-06T03:11:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,103 | java | package com.tencentcloudapi.ds.v20180523.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class SignKeyword extends AbstractModel{
/**
* 关键字
*/
@SerializedName("Keyword")
@Expose
private String Keyword;
/**
* X轴偏移坐标
*/
@SerializedName("OffsetCoordX")
@Expose
private String OffsetCoordX;
/**
* Y轴偏移坐标
*/
@SerializedName("OffsetCoordY")
@Expose
private String OffsetCoordY;
/**
* 签章突破宽度
*/
@SerializedName("ImageWidth")
@Expose
private String ImageWidth;
/**
* 签章图片高度
*/
@SerializedName("ImageHeight")
@Expose
private String ImageHeight;
/**
* 获取关键字
* @return Keyword 关键字
*/
public String getKeyword() {
return this.Keyword;
}
/**
* 设置关键字
* @param Keyword 关键字
*/
public void setKeyword(String Keyword) {
this.Keyword = Keyword;
}
/**
* 获取X轴偏移坐标
* @return OffsetCoordX X轴偏移坐标
*/
public String getOffsetCoordX() {
return this.OffsetCoordX;
}
/**
* 设置X轴偏移坐标
* @param OffsetCoordX X轴偏移坐标
*/
public void setOffsetCoordX(String OffsetCoordX) {
this.OffsetCoordX = OffsetCoordX;
}
/**
* 获取Y轴偏移坐标
* @return OffsetCoordY Y轴偏移坐标
*/
public String getOffsetCoordY() {
return this.OffsetCoordY;
}
/**
* 设置Y轴偏移坐标
* @param OffsetCoordY Y轴偏移坐标
*/
public void setOffsetCoordY(String OffsetCoordY) {
this.OffsetCoordY = OffsetCoordY;
}
/**
* 获取签章突破宽度
* @return ImageWidth 签章突破宽度
*/
public String getImageWidth() {
return this.ImageWidth;
}
/**
* 设置签章突破宽度
* @param ImageWidth 签章突破宽度
*/
public void setImageWidth(String ImageWidth) {
this.ImageWidth = ImageWidth;
}
/**
* 获取签章图片高度
* @return ImageHeight 签章图片高度
*/
public String getImageHeight() {
return this.ImageHeight;
}
/**
* 设置签章图片高度
* @param ImageHeight 签章图片高度
*/
public void setImageHeight(String ImageHeight) {
this.ImageHeight = ImageHeight;
}
/**
* 内部实现,用户禁止调用
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "Keyword", this.Keyword);
this.setParamSimple(map, prefix + "OffsetCoordX", this.OffsetCoordX);
this.setParamSimple(map, prefix + "OffsetCoordY", this.OffsetCoordY);
this.setParamSimple(map, prefix + "ImageWidth", this.ImageWidth);
this.setParamSimple(map, prefix + "ImageHeight", this.ImageHeight);
}
}
| [
"tencentcloudapi@tencent.com"
] | tencentcloudapi@tencent.com |
4662fce087005dc412b427f4b0de5346cb2ffc34 | 5c9b95c234fe708a35a4477df285df34d7151e77 | /app/src/main/java/com/cmbb/smartkids/fragment/active/ActiveCountModel.java | 30586e4fe7aaea93ffecc565276a19eb8c1cd6df | [] | no_license | N1990/MBProject | 894fce4b255639816d508d4caf8699feae176dba | 5d1b0b347dd61821755b6f7b8f8b3ac81851b2c7 | refs/heads/master | 2021-01-01T19:55:29.799719 | 2015-10-29T07:58:25 | 2015-10-29T07:58:25 | 39,807,744 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 896 | java | package com.cmbb.smartkids.fragment.active;
import java.util.ArrayList;
import java.util.List;
/**
* Created by N.Sun
*/
public class ActiveCountModel {
private List<ActiveModelOne> expertList = new ArrayList<ActiveModelOne>();
private List<ActiveModelOne> serveList = new ArrayList<ActiveModelOne>();
/**
* @return The attention
*/
public List<ActiveModelOne> getExpertList() {
return expertList;
}
/**
* @param attention The attention
*/
public void setExpertList(List<ActiveModelOne> attention) {
this.expertList = attention;
}
/**
* @return The babyCount
*/
public List<ActiveModelOne> getServeList() {
return serveList;
}
/**
* @param babyCount The babyCount
*/
public void setServeList(List<ActiveModelOne> babyCount) {
this.serveList = babyCount;
}
}
| [
"niesen918@gmail.com"
] | niesen918@gmail.com |
28c1cfbceffe215a645909419bf1746115f18ecd | 806f76edfe3b16b437be3eb81639d1a7b1ced0de | /src/com/google/zxing/client/android/C3819p.java | 779ee598365b7ae64e4cc3d218705dcf206b8192 | [] | no_license | magic-coder/huawei-wear-re | 1bbcabc807e21b2fe8fe9aa9d6402431dfe3fb01 | 935ad32f5348c3d8c8d294ed55a5a2830987da73 | refs/heads/master | 2021-04-15T18:30:54.036851 | 2018-03-22T07:16:50 | 2018-03-22T07:16:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 455 | java | package com.google.zxing.client.android;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;
/* compiled from: PictureFetcher */
class C3819p implements ThreadFactory {
private final AtomicInteger f14830a = new AtomicInteger(1);
C3819p() {
}
public Thread newThread(Runnable runnable) {
return new Thread(runnable, "PictureFecher AsyncTask #" + this.f14830a.getAndIncrement());
}
}
| [
"lebedev1537@gmail.com"
] | lebedev1537@gmail.com |
f9624736a04771c8fbfb8176793624e9466c7493 | 52190de20d961e54ef659914c5cc69f254994bf4 | /src/main/java/com/github/liaochong/myexcel/core/HtmlToExcelStreamFactory.java | d1077c07d0c3dc70e21aae2e43cf2e746cb530b4 | [
"Apache-2.0"
] | permissive | jeesun/myexcel | 3e20b1a80e304110cb0d0ff33a4706c26fff06c2 | 64cbd7e372a485f5087fce102fe931790e01452e | refs/heads/master | 2020-05-31T23:52:43.165696 | 2019-06-14T08:11:42 | 2019-06-14T08:11:42 | 190,546,436 | 0 | 0 | Apache-2.0 | 2019-06-14T08:13:05 | 2019-06-06T08:40:03 | Java | UTF-8 | Java | false | false | 7,020 | java | /*
* Copyright 2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.liaochong.myexcel.core;
import com.github.liaochong.myexcel.core.parser.Table;
import com.github.liaochong.myexcel.core.parser.Tr;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
/**
* HtmlToExcelStreamFactory 流工厂
*
* @author liaochong
* @version 1.0
*/
@Slf4j
class HtmlToExcelStreamFactory extends AbstractExcelFactory {
private static final int XLSX_MAX_ROW_COUNT = 1048576;
private static final int XLS_MAX_ROW_COUNT = 65536;
static final int DEFAULT_WAIT_SIZE = Runtime.getRuntime().availableProcessors();
private static final List<Tr> STOP_FLAG_LIST = new ArrayList<>();
private int maxRowCountOfSheet = XLSX_MAX_ROW_COUNT;
private Sheet sheet;
private BlockingQueue<List<Tr>> trWaitQueue;
private boolean stop;
private boolean exception;
private long startTime;
private String sheetName = "Sheet";
private Map<Integer, Integer> colWidthMap;
private int rowNum;
private int sheetNum;
/**
* 线程池
*/
private ExecutorService executorService;
public HtmlToExcelStreamFactory(int waitSize, ExecutorService executorService) {
this.trWaitQueue = new ArrayBlockingQueue<>(waitSize);
this.executorService = executorService;
}
public void start(Table table, Workbook workbook) {
log.info("Start streaming building excel");
if (Objects.nonNull(workbook)) {
this.workbook = workbook;
}
startTime = System.currentTimeMillis();
if (Objects.isNull(this.workbook)) {
workbookType(WorkbookType.SXLSX);
}
if (workbook instanceof HSSFWorkbook) {
maxRowCountOfSheet = XLS_MAX_ROW_COUNT;
}
initCellStyle(workbook);
if (Objects.nonNull(table)) {
sheetName = Objects.isNull(table.getCaption()) || table.getCaption().length() < 1 ? sheetName : table.getCaption();
}
this.sheet = this.workbook.createSheet(sheetName);
if (Objects.isNull(executorService)) {
Thread thread = new Thread(this::receive);
thread.setName("Excel-builder-1");
thread.start();
} else {
CompletableFuture.runAsync(this::receive, executorService);
}
}
public void append(List<Tr> trList) {
if (exception) {
log.error("Received a termination command,an exception occurred while processing");
throw new UnsupportedOperationException("Received a termination command");
}
if (stop) {
log.error("Received a termination command,the build method has been called");
throw new UnsupportedOperationException("Received a termination command");
}
if (Objects.isNull(trList) || trList.isEmpty()) {
log.warn("This list is empty and will be discarded");
return;
}
try {
trWaitQueue.put(trList);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
private void receive() {
List<Tr> trList = this.getTrListFromQueue();
int appendSize = 0;
try {
while (trList != STOP_FLAG_LIST) {
log.info("Received data size:{},current waiting queue size:{}", trList.size(), trWaitQueue.size());
for (Tr tr : trList) {
if (rowNum == maxRowCountOfSheet) {
sheetNum++;
this.setColWidth(colWidthMap, sheet);
colWidthMap = null;
sheet = workbook.createSheet(sheetName + " " + sheetNum);
rowNum = 0;
}
tr.setIndex(rowNum);
tr.getTdList().forEach(td -> {
td.setRow(rowNum);
td.setRowBound(rowNum);
});
rowNum++;
this.createRow(tr, sheet);
}
appendSize++;
Map<Integer, Integer> colWidthMap = this.getColMaxWidthMap(trList);
if (Objects.isNull(this.colWidthMap)) {
this.colWidthMap = new HashMap<>(colWidthMap.size());
}
colWidthMap.forEach((k, v) -> {
Integer val = this.colWidthMap.get(k);
if (Objects.isNull(val) || v > val) {
this.colWidthMap.put(k, v);
}
});
trList = this.getTrListFromQueue();
}
log.info("End of reception,append size:{}", appendSize);
} catch (Exception e) {
log.error("An exception occurred while processing", e);
exception = true;
try {
workbook.close();
} catch (IOException e1) {
e1.printStackTrace();
}
trWaitQueue.clear();
trWaitQueue = null;
}
}
private List<Tr> getTrListFromQueue() {
try {
return trWaitQueue.take();
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
@Override
public Workbook build() {
if (exception) {
throw new IllegalStateException("An exception occurred while processing");
}
this.stop = true;
while (!trWaitQueue.isEmpty()) {
// wait all tr received
}
try {
trWaitQueue.put(STOP_FLAG_LIST);
} catch (InterruptedException e) {
e.printStackTrace();
}
while (!trWaitQueue.isEmpty()) {
// wait all tr received
}
this.setColWidth(colWidthMap, sheet);
this.freezePane(0, sheet);
log.info("Build Excel success,takes {} ms", System.currentTimeMillis() - startTime);
return workbook;
}
}
| [
"liaochong@guahao.com"
] | liaochong@guahao.com |
5f9e4bf84e4b5b65c8c75265c617815dee700a34 | 28ade4a94f3aacf98882f9274fb68f04a8e63d9c | /src/main/java/org/jocl/utils/Mems.java | 4597caf12fbcfdce97f5bb237f2a9878d159be64 | [] | no_license | oschrenk/jocl-utils | 2e26fce235c9e9124577b36082523d10fdada3d4 | 9b8d732af46d2329ee8062a9f32e8052c320b711 | refs/heads/master | 2016-09-05T15:30:53.226646 | 2012-07-23T04:28:30 | 2012-07-23T04:28:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,789 | java | /*
* JOCL Utilities
*
* Copyright (c) 2011-2012 Marco Hutter - http://www.jocl.org
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
package org.jocl.utils;
import static org.jocl.CL.*;
import java.util.Arrays;
import org.jocl.*;
/**
* Utility methods related to memory objects.
*/
public class Mems
{
/**
* Create a memory object with the given size.
*
* @param context The context for which the memory object will be created
* @param size The size of the memory object, in bytes
* @return The memory object
*/
public static cl_mem create(cl_context context, int size)
{
cl_mem mem = clCreateBuffer(
context, CL_MEM_READ_WRITE,
size, null, null);
return mem;
}
/**
* Create a memory object that contains the data from the given array
*
* @param context The context for which the memory object will be created
* @param array The array
* @return The memory object
*/
public static cl_mem create(
cl_context context, byte array[])
{
return create(
context, array.length * Sizeof.cl_char, Pointer.to(array));
}
/**
* Create a memory object that contains the data from the given array
*
* @param context The context for which the memory object will be created
* @param array The array
* @return The memory object
*/
public static cl_mem create(
cl_context context, short array[])
{
return create(
context, array.length * Sizeof.cl_short, Pointer.to(array));
}
/**
* Create a memory object that contains the data from the given array
*
* @param context The context for which the memory object will be created
* @param array The array
* @return The memory object
*/
public static cl_mem create(
cl_context context, int array[])
{
return create(
context, array.length * Sizeof.cl_int, Pointer.to(array));
}
/**
* Create a memory object that contains the data from the given array
*
* @param context The context for which the memory object will be created
* @param array The array
* @return The memory object
*/
public static cl_mem create(
cl_context context, long array[])
{
return create(
context, array.length * Sizeof.cl_long, Pointer.to(array));
}
/**
* Create a memory object that contains the data from the given array
*
* @param context The context for which the memory object will be created
* @param array The array
* @return The memory object
*/
public static cl_mem create(
cl_context context, float array[])
{
return create(
context, array.length * Sizeof.cl_float, Pointer.to(array));
}
/**
* Create a memory object that contains the data from the given array
*
* @param context The context for which the memory object will be created
* @param array The array
* @return The memory object
*/
public static cl_mem create(
cl_context context, double array[])
{
return create(
context, array.length * Sizeof.cl_double, Pointer.to(array));
}
/**
* Creates a memory object with the given size that contains the
* data from the given source pointer.
*
* @param context The context for which the memory object will be created
* @param size The size of the memory object, in bytes
* @param source The pointer to the source data
* @return The memory object
*/
private static cl_mem create(
cl_context context, long size, Pointer source)
{
cl_mem mem = clCreateBuffer(
context, CL_MEM_READ_WRITE | CL_MEM_COPY_HOST_PTR,
size, source, null);
return mem;
}
/**
* Release each of the given memory objects if it is not <code>null</code>.
*
* @param mems The memory objects to release
*/
public static void release(cl_mem ... mems)
{
if (mems != null)
{
release(Arrays.asList(mems));
}
}
/**
* Release each of the given memory objects if it is not <code>null</code>.
*
* @param mems The memory objects to release
*/
public static void release(Iterable<cl_mem> mems)
{
if (mems != null)
{
for (cl_mem mem : mems)
{
if (mem != null)
{
clReleaseMemObject(mem);
}
}
}
}
/**
* Private constructor to prevent instantiation
*/
private Mems()
{
}
}
| [
"oliver.schrenk@gmail.com"
] | oliver.schrenk@gmail.com |
957d23af8610e6e5cfdb9dee4b89be2f7f0ba19f | 9fbb1247f4ea1fefcd40e35990ed074b57726ab5 | /src/com/egov/fuber/controllers/ViewCarsController.java | 200c79add98ff95f5e23ecad59a4e9f943d26fd6 | [] | no_license | Manojpkulakarni/Fuber | dae2728246f0b681957f591958ff1cd39334a8a3 | 15baa2e0dfcb850fb223b3a8051d82969ff9b863 | refs/heads/master | 2021-01-19T05:58:17.360538 | 2016-08-08T08:06:20 | 2016-08-08T08:06:20 | 65,013,597 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,246 | java | /**
*
*/
package com.egov.fuber.controllers;
import java.util.List;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.egov.fuber.entity.Car;
import com.egov.fuber.exceptions.ServiceException;
import com.egov.fuber.service.CarService;
import com.egov.fuber.service.CustomerService;
/**
* @author Manoj Kulkarni
*
*/
@Controller
public class ViewCarsController {
@Autowired
private CarService carService;
@Autowired
private CustomerService customerService;
@Autowired
private MessageSource messageSource;
private static final Logger LOGGER = Logger.getLogger(ViewCarsController.class);
/**
* @param model
* @return
* @throws ServiceException
*/
@RequestMapping(value = "viewCars.view", method = RequestMethod.GET)
public String getBookCarFormPage(Model model) throws ServiceException {
List<Car> cars = carService.getAllCars();
model.addAttribute("cars", cars);
return "viewCarsForm";
}
}
| [
"venki@egovernments.org"
] | venki@egovernments.org |
a041a3ce2b89e4e735bd7bac0fc4fc51bde5a897 | 8f456ce6e5903a4c399d94289a8384b50b3a2db7 | /org/w3c/css/properties/css3/CssScrollSnapMarginBlockStart.java | 370c75e17e5f3e27a21628a67b66ea99fa42ea8f | [
"W3C-20150513",
"W3C"
] | permissive | harunpehlivan/css-validator | e5c41ca37ff04ce5393423650a71b727ac36bd21 | 445f7d9845b9a6c096548153c89e4abc9adb581d | refs/heads/master | 2021-07-10T02:12:31.104127 | 2018-12-10T08:35:56 | 2018-12-10T08:35:56 | 165,254,609 | 0 | 0 | NOASSERTION | 2020-07-27T20:38:21 | 2019-01-11T14:14:15 | Java | UTF-8 | Java | false | false | 2,113 | java | //
// Author: Yves Lafon <ylafon@w3.org>
//
// (c) COPYRIGHT MIT, ERCIM, Keio, Beihang, 2017.
// Please first read the full copyright statement in file COPYRIGHT.html
package org.w3c.css.properties.css3;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssTypes;
import org.w3c.css.values.CssValue;
/**
* @spec https://www.w3.org/TR/2017/CR-css-scroll-snap-1-20170824/#propdef-scroll-snap-margin-block-start
*/
public class CssScrollSnapMarginBlockStart extends org.w3c.css.properties.css.CssScrollSnapMarginBlockStart {
/**
* Create a new CssScrollSnapMarginBlockStart
*/
public CssScrollSnapMarginBlockStart() {
value = initial;
}
/**
* Creates a new CssScrollSnapMarginBlockStart
*
* @param expression The expression for this property
* @throws org.w3c.css.util.InvalidParamException
* Expressions are incorrect
*/
public CssScrollSnapMarginBlockStart(ApplContext ac, CssExpression expression, boolean check)
throws InvalidParamException {
setByUser();
CssValue val = expression.getValue();
if (check && expression.getCount() > 1) {
throw new InvalidParamException("unrecognize", ac);
}
switch (val.getType()) {
case CssTypes.CSS_NUMBER:
val.getCheckableValue().checkEqualsZero(ac, this);
case CssTypes.CSS_LENGTH:
value = val;
break;
case CssTypes.CSS_IDENT:
if (inherit.equals(val)) {
value = inherit;
break;
}
default:
throw new InvalidParamException("value",
expression.getValue(),
getPropertyName(), ac);
}
expression.next();
}
public CssScrollSnapMarginBlockStart(ApplContext ac, CssExpression expression)
throws InvalidParamException {
this(ac, expression, false);
}
}
| [
"ylafon@w3.org"
] | ylafon@w3.org |
0799f5f410f9cd9cad1d7e8ab65bcd4022026d7a | d223db75fc58daa583d180973611834eccc53190 | /src/main/java/com/skilrock/lms/coreEngine/scratchService/gameMgmt/common/CalculateUnclaimedHelper.java | a0c038494a30b2e28a15c9983ef0824d0ef46f9a | [] | no_license | gouravSkilrock/NumbersGame | c1d6665afccee9218f1b53c1eee6fbcc95841bd0 | bbc8af08e436fd51c5dbb01b5b488d80235a0442 | refs/heads/master | 2021-01-20T15:04:59.198617 | 2017-05-09T07:00:29 | 2017-05-09T07:00:29 | 90,712,376 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 6,116 | java | package com.skilrock.lms.coreEngine.scratchService.gameMgmt.common;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.NumberFormat;
import com.skilrock.lms.common.db.DBConnect;
import com.skilrock.lms.common.db.QueryManager;
import com.skilrock.lms.common.exception.LMSException;
/**
* This helper class provides methods to calculate unclaimed pwt , Govt
* Commission for the terminated game
*
* @author Skilrock Technologies
*
*/
public class CalculateUnclaimedHelper {
/**
* This method calculate unclaimed pwt , Govt Commission for the terminated
* game
*
* @param gameid
* is Id of game for which calculation is done
* @throws LMSException
*/
public void calculateUnclaimed(int gameid) throws LMSException {
Connection con = null;
try {
Statement stmt1 = null;
Statement stmt2 = null;
Statement stmt3 = null;
Statement stmt4 = null;
// Statement stmt5 = null;
// Statement stmt6 = null;
// Statement stmt7 = null;
Statement stmt8 = null;
con = DBConnect.getConnection();
con.setAutoCommit(false);
stmt1 = con.createStatement();
stmt2 = con.createStatement();
stmt3 = con.createStatement();
stmt4 = con.createStatement();
// stmt5 = con.createStatement();
// stmt6 = con.createStatement();
// stmt7 = con.createStatement();
stmt8 = con.createStatement();
int gameId = gameid;
NumberFormat nf = NumberFormat.getInstance();
nf.setMaximumFractionDigits(2);
nf.setMinimumFractionDigits(2);
// This code is blocked because concept of unclaimed calculation is
// removed from the project
/*
* String getMrpPWt = QueryManager.getST3PwtMrp() + " where
* game_id='" + gameId + "' and status='UNCLM_PWT' ";
*
* rs = stmt1.executeQuery(getMrpPWt);
*
* //rs=stmt1.executeQuery(" select SUM(pwt_amt) from st_pwt_inv
* where game_id='"+y+"' and status='UNCLM_PWT'");
*
* while (rs.next()) {
*
* amount = rs.getDouble(1); logger.debug("amount calculated " +
* amount); } // create task for unclaimed prize
*
* String createTask = QueryManager.createST3Task() + " values(" +
* amount + "," + gameId + ",'UNCLM_PWT','APPROVED',CURRENT_DATE) ";
* stmt2.executeUpdate(createTask);
*
*/
// stmt2.executeUpdate("insert into
// st_lms_bo_tasks(amount,game_id,transaction_type,status)
// values("+x+","+y+",'UNCLM_PWT','APPROVED')");
// stmt3.executeQuery("select govt_comm_rate from st_se_game_master
// where game_id='"+y+"'");
// get govt comm rate,comm type,fixed amount from game_master
// this code is commented because fovt comm is calculated separatly
// by Arun on approve govt commission click
/*
* String query = QueryManager.getST3GovtCommRate() + " where
* game_id = " + gameId + " "; rs1 = stmt3.executeQuery(query);
*
* while (rs1.next()) {
*
* govtRate = rs1.getDouble(TableConstants.GOVT_COMM_RATE);
* govtCommType = rs1.getString(TableConstants.GOVT_COMM_TYPE);
* minAssuredProfit = rs1.getDouble(TableConstants.FIXED_AMT);
* //govtRate=rs1.getDouble(TableConstants.GOVT_COMM_RATE);
* logger.debug("govt rate is " + govtRate); logger.debug("govt comm
* type is " + govtCommType); logger.debug("fixed amount is " +
* minAssuredProfit); }
*
*
* String query1 = QueryManager.getST3MrpForGovtComm() + " where
* game_id = " + gameId + " and transaction_type='SALE' "; String
* query2 = QueryManager.getST3MrpForGovtComm() + " where game_id = " +
* gameId + " and transaction_type='SALE_RET' "; rs2 =
* stmt4.executeQuery(query1); rs3 = stmt8.executeQuery(query2);
* while (rs2.next()) { mrpAmtSale = rs2.getDouble(1);
* logger.debug("mrp from bo_agent is " + mrpAmtSale); } while
* (rs3.next()) { mrpAmtSaleRet = rs3.getDouble(1);
* logger.debug("mrp from bo_agent is " + mrpAmtSaleRet); } mrpAmt =
* mrpAmtSale - mrpAmtSaleRet; logger.debug("net mrp is " + mrpAmt);
* govtShare = (Math.round(((mrpAmt * govtRate) / 100) * 100)) /
* 100.0;
*
* if (govtCommType.equals("FIXED_PER") && govtCommType != null) {
* logger.debug("inside fixed percentage of sale");
* //govtShare=(Math.round(((mrpAmt*govtRate)/100)*100))/100.0;
* //govtShare=Double.parseDouble(nf.format(
* (mrpAmt*govtRate)/100)); logger.debug("govt share is " +
* govtShare); } else if (govtCommType.equals("MIN_PROFIT") &&
* govtCommType != null) { logger.debug("inside minimun assured
* profit"); if (minAssuredProfit > govtShare) govtShare =
* minAssuredProfit; } else if (govtCommType.equals("MAP_FP") &&
* govtCommType != null) { logger.debug("inside map + fp ");
* govtShare = minAssuredProfit + govtShare; } else govtShare = 0.0;
* //Get MRP rate From ageent_transaction
*
* String createTaskforgov = QueryManager.createST3Task() + "
* values(" + govtShare + "," + gameId +
* ",'GOVT_COMM','APPROVED',CURRENT_DATE) ";
*
* stmt2.executeUpdate(createTaskforgov);
*
*/
// stmt5.executeUpdate("insert into
// st_lms_bo_tasks(amount,game_id,transaction_type,status)
// values("+govtShare+","+y+",'GOVT_COMM','APPROVED')");
// update unclaimed to submitted to govt..
/*
* String updatePwtinv = QueryManager.updateST3PwtInv() + " where
* game_id=" + gameId + " and status='UNCLM_PWT'";
* stmt2.executeUpdate(updatePwtinv);
*/
// stmt6.executeUpdate("update st_pwt_inv set status='SUB_GOV' where
// game_id="+y+"");
String updateQueryManager = QueryManager.updateST3QueryManager()
+ " where game_id=" + gameId + " ";
stmt2.executeUpdate(updateQueryManager);
// stmt7.executeUpdate("update st_se_game_master set
// game_status='TERMINATE' where game_id="+y+"");
con.commit();
con.close();
} catch (SQLException e) {
e.printStackTrace();
try {
con.rollback();
} catch (SQLException se) {
// TODO Auto-generated catch block
se.printStackTrace();
throw new LMSException(e);
}
}
}
}
| [
"anuj.sharma@skilrock.com"
] | anuj.sharma@skilrock.com |
2331e5ff2fbbecb3b22cc7737b78d8c594d5a043 | 32b72e1dc8b6ee1be2e80bb70a03a021c83db550 | /ast_results/lightbox_QuickSnap/Camera/src/com/lightbox/android/camera/ui/CameraHeadUpDisplay.java | 821d0c520f2f39743b169edc157331652d1b8d9d | [] | no_license | cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning | d90c41a17e88fcd99d543124eeb6e93f9133cb4a | 0564143d92f8024ff5fa6b659c2baebf827582b1 | refs/heads/master | 2020-07-13T13:53:40.297493 | 2019-01-11T11:51:18 | 2019-01-11T11:51:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,825 | java | // isComment
package com.lightbox.android.camera.ui;
import android.content.Context;
import com.lightbox.android.camera.CameraSettings;
import com.lightbox.android.camera.ListPreference;
import com.lightbox.android.camera.PreferenceGroup;
public class isClassOrIsInterface extends HeadUpDisplay {
@SuppressWarnings("isStringConstant")
private static final String isVariable = "isStringConstant";
private OtherSettingsIndicator isVariable;
private ZoomIndicator isVariable;
private Context isVariable;
private float[] isVariable;
private int isVariable;
public isConstructor(Context isParameter) {
super(isNameExpr);
isNameExpr = isNameExpr;
}
public void isMethod(Context isParameter, PreferenceGroup isParameter, float[] isParameter, int isParameter) {
isNameExpr = isNameExpr;
isNameExpr = isNameExpr;
super.isMethod(isNameExpr, isNameExpr);
}
@Override
protected void isMethod(Context isParameter, PreferenceGroup isParameter) {
super.isMethod(isNameExpr, isNameExpr);
ListPreference[] isVariable = isMethod(isNameExpr, isNameExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr);
isNameExpr = new OtherSettingsIndicator(isNameExpr, isNameExpr);
isNameExpr.isMethod(new Runnable() {
public void isMethod() {
if (isNameExpr != null) {
isNameExpr.isMethod();
}
}
});
isNameExpr.isMethod(isNameExpr);
if (isNameExpr != null) {
isNameExpr = new ZoomIndicator(isNameExpr);
isNameExpr.isMethod(isNameExpr);
isNameExpr.isMethod(isNameExpr);
} else {
isNameExpr = null;
}
isNameExpr.isMethod(isNameExpr);
}
public void isMethod(ZoomControllerListener isParameter) {
// isComment
// isComment
isNameExpr.isMethod(isNameExpr);
}
public void isMethod(int isParameter) {
if (isNameExpr != null) {
GLRootView isVariable = isMethod();
if (isNameExpr != null) {
synchronized (isNameExpr) {
isNameExpr.isMethod(isNameExpr);
}
} else {
isNameExpr.isMethod(isNameExpr);
}
}
}
/**
* isComment
*/
public void isMethod(float[] isParameter) {
GLRootView isVariable = isMethod();
if (isNameExpr != null) {
synchronized (isNameExpr) {
isMethod(isNameExpr);
}
} else {
isMethod(isNameExpr);
}
}
private void isMethod(float[] isParameter) {
isNameExpr.isMethod(isNameExpr);
}
}
| [
"matheus@melsolucoes.net"
] | matheus@melsolucoes.net |
637c22fbf0b050361bdca6963e4e3809e29d374d | 53d677a55e4ece8883526738f1c9d00fa6560ff7 | /com/tencent/mm/plugin/appbrand/t/e/d.java | 62c5ce7b8147cb65f2ece3acd239f3825b0d5079 | [] | no_license | 0jinxing/wechat-apk-source | 544c2d79bfc10261eb36389c1edfdf553d8f312a | f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d | refs/heads/master | 2020-06-07T20:06:03.580028 | 2019-06-21T09:17:26 | 2019-06-21T09:17:26 | 193,069,132 | 9 | 4 | null | null | null | null | UTF-8 | Java | false | false | 879 | java | package com.tencent.mm.plugin.appbrand.t.e;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.sdk.platformtools.ab;
public final class d extends g
implements b
{
private String iSM = "*";
public final void Eo(String paramString)
{
AppMethodBeat.i(73266);
if (paramString == null)
{
ab.i("MicroMsg.AppBrandNetWork.HandshakeImpl1Client", "http resource descriptor must not be null");
AppMethodBeat.o(73266);
}
while (true)
{
return;
this.iSM = paramString;
AppMethodBeat.o(73266);
}
}
public final String aOu()
{
return this.iSM;
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes7-dex2jar.jar
* Qualified Name: com.tencent.mm.plugin.appbrand.t.e.d
* JD-Core Version: 0.6.2
*/ | [
"172601673@qq.com"
] | 172601673@qq.com |
b44ed9e2a64100ad1c388e1ba6e1f387de95ea5d | 8da9064e76abc28fa35ca6abf6080b054b27cab0 | /core/src/main/java/com/cv4j/netdiscovery/core/cookies/Cookie.java | 7e35e84f18236b48b273d367fb87530c37f722fe | [
"Apache-2.0"
] | permissive | freezaee/NetDiscovery | 5c92652d1f7bcd5ba7368fff535097d9b50e8f4d | 910f1ca67210dbe1a90c3870874c7788e4fd29ca | refs/heads/master | 2020-03-22T13:00:28.979615 | 2018-07-07T11:21:50 | 2018-07-07T11:21:50 | 140,076,504 | 1 | 0 | Apache-2.0 | 2018-07-07T10:57:53 | 2018-07-07T10:57:52 | null | UTF-8 | Java | false | false | 262 | java | package com.cv4j.netdiscovery.core.cookies;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 一个键值对
* Created by tony on 2018/3/20.
*/
@AllArgsConstructor
@Data
public class Cookie {
private String name;
private String value;
}
| [
"fengzhizi715@126.com"
] | fengzhizi715@126.com |
9feb4c970307bfbaae39717bc614cc067c75b6d8 | 1ea7f40acf61ca8af1b22b3ebc5391b8efff7a01 | /src/test/java/com/remondis/remap/basic/FlatCollectionMappingTest.java | f285b8aa35205ae4e09bc33237b0a656e9a21528 | [
"Apache-2.0"
] | permissive | remondis-it/remap | 849ac42bfe46e5dbae05690b9d308561fd1a7e49 | 0c7a88e23b4c833c2404538f39b38d8a10cf5eb3 | refs/heads/develop | 2023-05-11T19:57:28.225033 | 2023-04-26T07:23:26 | 2023-04-26T07:23:26 | 102,847,567 | 122 | 22 | Apache-2.0 | 2023-04-30T20:38:03 | 2017-09-08T10:02:42 | Java | UTF-8 | Java | false | false | 4,886 | java | package com.remondis.remap.basic;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import java.util.Arrays;
import java.util.List;
import java.util.function.Function;
import org.junit.Test;
import com.remondis.remap.AssertMapping;
import com.remondis.remap.Mapper;
import com.remondis.remap.Mapping;
import com.remondis.remap.flatCollectionMapping.Destination;
import com.remondis.remap.flatCollectionMapping.Id;
import com.remondis.remap.flatCollectionMapping.Source;
public class FlatCollectionMappingTest {
@Test
public void shouldMapCollectionByFunction() {
Mapper<Source, Destination> mapper = Mapping.from(Source.class)
.to(Destination.class)
.replaceCollection(Source::getIds, Destination::getIds)
.with(idBuilder())
.mapper();
Source source = new Source(Arrays.asList(1L, 2L, 3L));
Destination map = mapper.map(source);
List<Id> expected = Arrays.asList(idBuilder().apply(1L), idBuilder().apply(2L), idBuilder().apply(3L));
List<Id> actual = map.getIds();
assertEquals(expected, actual);
// Assert the mapping
AssertMapping.of(mapper)
.expectReplaceCollection(Source::getIds, Destination::getIds)
.andTest(idBuilder())
.ensure();
}
@Test
public void shouldDetectIllegalArguments() {
assertThatThrownBy(() -> {
Mapping.from(Source.class)
.to(Destination.class)
.replaceCollection(null, Destination::getIds);
}).isInstanceOf(IllegalArgumentException.class)
.hasNoCause();
assertThatThrownBy(() -> {
Mapping.from(Source.class)
.to(Destination.class)
.replaceCollection(Source::getIds, null);
}).isInstanceOf(IllegalArgumentException.class)
.hasNoCause();
assertThatThrownBy(() -> {
Mapping.from(Source.class)
.to(Destination.class)
.replaceCollection(Source::getIds, Destination::getIds)
.with(null);
}).isInstanceOf(IllegalArgumentException.class)
.hasNoCause();
}
@Test
public void shouldNotSkipNullItems() {
Mapper<Source, Destination> mapper = Mapping.from(Source.class)
.to(Destination.class)
.replaceCollection(Source::getIds, Destination::getIds)
.with(idBuilder())
.mapper();
Source source = new Source(Arrays.asList(1L, null, 2L, null, 3L));
Destination map = mapper.map(source);
List<Id> expected = Arrays.asList(idBuilder().apply(1L), idBuilder().apply(null), idBuilder().apply(2L),
idBuilder().apply(null), idBuilder().apply(3L));
List<Id> actual = map.getIds();
assertThat(actual, is(expected));
// Assert the mapping
AssertMapping.of(mapper)
.expectReplaceCollection(Source::getIds, Destination::getIds)
.andTest(idBuilder())
.ensure();
}
@Test
public void shouldSkipNullItems() {
Mapper<Source, Destination> mapper = Mapping.from(Source.class)
.to(Destination.class)
.replaceCollection(Source::getIds, Destination::getIds)
.withSkipWhenNull(idBuilder())
.mapper();
Source source = new Source(Arrays.asList(1L, null, 2L, null, 3L));
Destination map = mapper.map(source);
List<Id> expected = Arrays.asList(idBuilder().apply(1L), idBuilder().apply(2L), idBuilder().apply(3L));
List<Id> actual = map.getIds();
assertEquals(expected, actual);
// Assert the mapping
AssertMapping.of(mapper)
.expectReplaceCollection(Source::getIds, Destination::getIds)
.andSkipWhenNull()
.ensure();
}
@Test
public void nullCollection() {
Mapper<Source, Destination> mapper = Mapping.from(Source.class)
.to(Destination.class)
.replaceCollection(Source::getIds, Destination::getIds)
.with(idBuilder())
.mapper();
Source source = new Source(null);
Destination map = mapper.map(source);
assertNull(map.getIds());
}
@Test
public void shouldDetectDifferentNullStrategy() {
Mapper<Source, Destination> mapper = Mapping.from(Source.class)
.to(Destination.class)
.replaceCollection(Source::getIds, Destination::getIds)
.with(idBuilder())
.mapper();
assertThatThrownBy(() -> {
AssertMapping.of(mapper)
.expectReplaceCollection(Source::getIds, Destination::getIds)
.andSkipWhenNull()
.ensure();
}).isInstanceOf(AssertionError.class)
.hasMessageContaining(
"The replace transformation specified by the mapper has a different null value strategy than the expected transformation:")
.hasNoCause();
}
public static Function<Long, Id> idBuilder() {
return id -> new Id(id);
}
}
| [
"christopher.schuette@remondis.de"
] | christopher.schuette@remondis.de |
ff5be069a48b1844b700dfbdd27a8bfc84bdcafe | 431d8362e87e61ee568d79c57e13c4a0b0e02d2e | /lara/sep-4th batch/java/36.Exception handling/part-2/src/C1.java | 13b569f5a114fdc3b5029d8fef227f28dc41ec31 | [] | no_license | svsaikumar/lara | 09b3fa9fb2fcee70840d02bdce56148f3a3bf259 | ed0bfbdfa0a0e668c6ffdd720d80551e03bb93db | refs/heads/master | 2020-03-27T08:53:34.246569 | 2018-08-27T13:56:22 | 2018-08-27T13:56:22 | 146,295,997 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 172 | java |
class C1
{
int test()
{
try
{
//several statements
return 10;
}
catch (ArithmeticException ex)
{
}
finally
{
}
return 30;
}
}
| [
"saikumarsv77@gmail.com"
] | saikumarsv77@gmail.com |
b63d582a8ed399da5450e00a14b0dfa1b0e9804d | 73267be654cd1fd76cf2cb9ea3a75630d9f58a41 | /services/gaussdb/src/main/java/com/huaweicloud/sdk/gaussdb/v3/model/Resource.java | 3f54992f8cd4fb9503ffcea20b287625cc89a9f9 | [
"Apache-2.0"
] | permissive | huaweicloud/huaweicloud-sdk-java-v3 | 51b32a451fac321a0affe2176663fed8a9cd8042 | 2f8543d0d037b35c2664298ba39a89cc9d8ed9a3 | refs/heads/master | 2023-08-29T06:50:15.642693 | 2023-08-24T08:34:48 | 2023-08-24T08:34:48 | 262,207,545 | 91 | 57 | NOASSERTION | 2023-09-08T12:24:55 | 2020-05-08T02:27:00 | Java | UTF-8 | Java | false | false | 4,753 | java | package com.huaweicloud.sdk.gaussdb.v3.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
/**
* Resource
*/
public class Resource {
/**
* 指定类型的配额。 - instance: 表示实例的配额
*/
public static final class TypeEnum {
/**
* Enum INSTANCE for value: "instance"
*/
public static final TypeEnum INSTANCE = new TypeEnum("instance");
private static final Map<String, TypeEnum> STATIC_FIELDS = createStaticFields();
private static Map<String, TypeEnum> createStaticFields() {
Map<String, TypeEnum> map = new HashMap<>();
map.put("instance", INSTANCE);
return Collections.unmodifiableMap(map);
}
private String value;
TypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static TypeEnum fromValue(String value) {
if (value == null) {
return null;
}
return java.util.Optional.ofNullable(STATIC_FIELDS.get(value)).orElse(new TypeEnum(value));
}
public static TypeEnum valueOf(String value) {
if (value == null) {
return null;
}
return java.util.Optional.ofNullable(STATIC_FIELDS.get(value))
.orElseThrow(() -> new IllegalArgumentException("Unexpected value '" + value + "'"));
}
@Override
public boolean equals(Object obj) {
if (obj instanceof TypeEnum) {
return this.value.equals(((TypeEnum) obj).value);
}
return false;
}
@Override
public int hashCode() {
return this.value.hashCode();
}
}
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "type")
private TypeEnum type;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "used")
private Integer used;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "quota")
private Integer quota;
public Resource withType(TypeEnum type) {
this.type = type;
return this;
}
/**
* 指定类型的配额。 - instance: 表示实例的配额
* @return type
*/
public TypeEnum getType() {
return type;
}
public void setType(TypeEnum type) {
this.type = type;
}
public Resource withUsed(Integer used) {
this.used = used;
return this;
}
/**
* 已创建的资源个数。
* @return used
*/
public Integer getUsed() {
return used;
}
public void setUsed(Integer used) {
this.used = used;
}
public Resource withQuota(Integer quota) {
this.quota = quota;
return this;
}
/**
* 资源最大的配额数。
* @return quota
*/
public Integer getQuota() {
return quota;
}
public void setQuota(Integer quota) {
this.quota = quota;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
Resource that = (Resource) obj;
return Objects.equals(this.type, that.type) && Objects.equals(this.used, that.used)
&& Objects.equals(this.quota, that.quota);
}
@Override
public int hashCode() {
return Objects.hash(type, used, quota);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Resource {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" used: ").append(toIndentedString(used)).append("\n");
sb.append(" quota: ").append(toIndentedString(quota)).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 ");
}
}
| [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
a44bd3c3be37bf7a7fb9784a67f9d413ed8b01c2 | 00fecc2fc82bc0e16294cb3ddc7cc96833e3f9b7 | /SpringBootSample07/src/main/java/online/qsx/model/AutoAuthor.java | 6545044d09047e448473c1aef3c2dc4a570387a4 | [] | no_license | yuanyixiong/SpringBootSample | 4b3239ab72f64a6ba2f6ab1b8a2df3f7557b0e87 | 0e7e4ea417f20727d16e90abccd45347ce1013cd | refs/heads/master | 2020-03-21T05:00:05.361174 | 2018-06-21T08:07:32 | 2018-06-21T08:07:33 | 138,138,928 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 662 | java | package online.qsx.model;
/**
* 普通的JavaBean
*/
public class AutoAuthor {
private String loginName;
private String password;
public String getLoginName() {
return loginName;
}
public void setLoginName(String loginName) {
this.loginName = loginName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Override
public String toString() {
return "AutoAuthor{" +
"loginName='" + loginName + '\'' +
", password='" + password + '\'' +
'}';
}
}
| [
"15926499574@163.com"
] | 15926499574@163.com |
3725731483741a86045a82e8288d03d935aa90ab | 7d28d457ababf1b982f32a66a8896b764efba1e8 | /platform-pojo-bl/src/main/java/ua/com/fielden/platform/entity/validation/HappyValidator.java | e55aea484dc4f7ff3cf56553baaee3dba8ee9800 | [
"MIT"
] | permissive | fieldenms/tg | f742f332343f29387e0cb7a667f6cf163d06d101 | f145a85a05582b7f26cc52d531de9835f12a5e2d | refs/heads/develop | 2023-08-31T16:10:16.475974 | 2023-08-30T08:23:18 | 2023-08-30T08:23:18 | 20,488,386 | 17 | 9 | MIT | 2023-09-14T17:07:35 | 2014-06-04T15:09:44 | JavaScript | UTF-8 | Java | false | false | 601 | java | package ua.com.fielden.platform.entity.validation;
import java.lang.annotation.Annotation;
import java.util.Set;
import ua.com.fielden.platform.entity.meta.MetaProperty;
import ua.com.fielden.platform.error.Result;
/**
* Happy validator always returns a successful validation result.
*
* @author TG Team
*
*/
public class HappyValidator implements IBeforeChangeEventHandler<Object> {
@Override
public Result handle(final MetaProperty<Object> property, final Object newValue, final Set<Annotation> mutatorAnnotations) {
return Result.successful(property.getEntity());
}
}
| [
"oles.hodych@gmail.com"
] | oles.hodych@gmail.com |
8c3ad4606305457dda1a7f8bc30a8fe410cec8c7 | ecb7e109a62f6a2a130e3320ed1fb580ba4fc2de | /aio-service/src/main/java/com/viettel/wms/business/ShipmentGoodsBusiness.java | 7064dacaf07daa49d6196a2594717fd681750bc0 | [] | no_license | nisheeth84/prjs_sample | df732bc1eb58bc4fd4da6e76e6d59a2e81f53204 | 3fb10823ca4c0eb3cd92bcd2d5d4abc8d59436d9 | refs/heads/master | 2022-12-25T22:44:14.767803 | 2020-10-07T14:55:52 | 2020-10-07T14:55:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 563 | java | package com.viettel.wms.business;
import com.viettel.wms.dto.GoodsDTO;
import com.viettel.wms.dto.ShipmentGoodsDTO;
import java.util.List;
public interface ShipmentGoodsBusiness {
long count();
List<ShipmentGoodsDTO> getGoodsInfoByCode(String code);
public List<ShipmentGoodsDTO> importQuantitative(String fileInput, Long id) throws Exception;
String exportExcelTemplate(ShipmentGoodsDTO obj) throws Exception;
String exportExcelError(GoodsDTO errorObj) throws Exception;
Long addShipmentGoodsList(List<ShipmentGoodsDTO> obj);
}
| [
"phamkhachoabk@gmail.com"
] | phamkhachoabk@gmail.com |
4d50e702ce268d2e2595bee70cb9a387484921ae | 183e4126b2fdb9c4276a504ff3ace42f4fbcdb16 | /II семестр/Об'єктно орієнтоване програмування/Лисенко/Projects/Lab5/src/Sentence.java | 4a13bdbd37b32829025fdad4833f673de316ef78 | [] | no_license | Computer-engineering-FICT/Computer-engineering-FICT | ab625e2ca421af8bcaff74f0d37ac1f7d363f203 | 80b64b43d2254e15338060aa4a6d946e8bd43424 | refs/heads/master | 2023-08-10T08:02:34.873229 | 2019-06-22T22:06:19 | 2019-06-22T22:06:19 | 193,206,403 | 3 | 0 | null | 2023-07-22T09:01:05 | 2019-06-22T07:41:22 | HTML | UTF-8 | Java | false | false | 1,430 | java | public class Sentence {
private PartOfSentence[] partsOfSentence;
public Sentence(String a) {
setSentence(a);
}
public String getSentence() {
String a = "";
for(int i=0; i<partsOfSentence.length-1; i++){
if (partsOfSentence[i].getNameOfPart().equals("Word")) {
a += partsOfSentence[i].getWord();
} else {
a += partsOfSentence[i].getPunctuation();
}
if (partsOfSentence[i+1].getNameOfPart().equals("Word")){
a+=" ";
}
}
if (partsOfSentence[partsOfSentence.length-1].getNameOfPart().equals("Word")) {
a += partsOfSentence[partsOfSentence.length-1].getWord();
} else {
a += partsOfSentence[partsOfSentence.length-1].getPunctuation();
}
return a;
}
public void setSentence(String a) {
String[] ma = a.split("(?<=([,;:\\-.!?])) ?|(?=[,;:\\-.!?])| ");
partsOfSentence = new PartOfSentence[ma.length];
for (int i=0; i<ma.length; i++){
if (ma[i].equals(",") || ma[i].equals(";") || ma[i].equals(":") || ma[i].equals("-") ||
ma[i].equals(".") || ma[i].equals("!") || ma[i].equals("?")){
partsOfSentence[i] = new PartOfSentence("Punctuation", ma[i]);
} else {
partsOfSentence[i] = new PartOfSentence("Word", ma[i]);
}
}
}
public void setPartsOfSentence(PartOfSentence[] a){
partsOfSentence = a.clone();
}
public PartOfSentence[] getPartsOfSentence (){
return partsOfSentence.clone();
}
}
| [
"mazanyan027@gmail.com"
] | mazanyan027@gmail.com |
11d0cd65a5867d7b276d37c0272c2b247b8b9cbf | 899a427a903148d0d26e903faf8021b94b126911 | /28-string/1-Basic/0008-string-to-integer-atoi/src/Solution2.java | 8fa9b41fab394de3262a4fb44d953c4486da94d0 | [
"Apache-2.0"
] | permissive | liweiwei1419/LeetCode-Solutions-in-Good-Style | 033ab69b93fa2d294ab6a08c8b9fbcff6d32a178 | acc8661338cc7c1ae067915fb16079a9e3e66847 | refs/heads/master | 2022-07-27T15:24:57.717791 | 2021-12-19T03:11:02 | 2021-12-19T03:11:02 | 161,101,415 | 2,016 | 351 | Apache-2.0 | 2022-01-07T10:38:35 | 2018-12-10T01:50:09 | Java | UTF-8 | Java | false | false | 571 | java | public class Solution2 {
public int myAtoi(String str) {
if (str == null || str.length() == 0) {
return 0;
}
str = str.trim();
int help = 0;
if (str.charAt(0) != '-' || str.charAt(0) < '1' || str.charAt(0) > '9') {
return 0;
}
for (int i = 1; i < str.length(); i++) {
if (str.charAt(i) < '1' || str.charAt(i) > '9') {
help = i;
break;
}
}
str = str.substring(0, help);
return Integer.parseInt(str);
}
} | [
"121088825@qq.com"
] | 121088825@qq.com |
efb35edce08edf34d764a890aa6657f6800a2dda | 62e334192393326476756dfa89dce9f0f08570d4 | /tk_code/schedule-service/schedule-server/src/main/java/com/huatu/tiku/schedule/biz/vo/RuleVo.java | 8b97a758e18fef91f9b6a4e2d33557b46a37517f | [] | no_license | JellyB/code_back | 4796d5816ba6ff6f3925fded9d75254536a5ddcf | f5cecf3a9efd6851724a1315813337a0741bd89d | refs/heads/master | 2022-07-16T14:19:39.770569 | 2019-11-22T09:22:12 | 2019-11-22T09:22:12 | 223,366,837 | 1 | 2 | null | 2022-06-30T20:21:38 | 2019-11-22T09:15:50 | Java | UTF-8 | Java | false | false | 785 | java | package com.huatu.tiku.schedule.biz.vo;
import com.huatu.tiku.schedule.biz.enums.*;
import lombok.Data;
import java.io.Serializable;
/**
* @author wangjian
**/
@Data
public class RuleVo implements Serializable{
private static final long serialVersionUID = 9106240148184947656L;
private Long id;
/**
* 课程分类
*/
private CourseCategory courseCategory;
/**
* 考试类型
*/
private ExamType examType;
/**
* 直播类型(授课,练习)
*/
private CourseLiveCategory liveCategory;
/**
* 计算系数
*/
private Float coefficient;
private String dateBegin;
private String dateEnd;
private String status;
private SchoolType schoolType;
private TeacherType teacherType;
}
| [
"jelly_b@126.com"
] | jelly_b@126.com |
e57356be1ac055c4d4882b0c558b54bdf74cc54d | 8c8c990785969c5ba7cbc79ab87cbebc5090ab98 | /Java_goodee/goodee/jse_20210209_1/src/com/javateam/jse/Singleton.java | b93813295987c88ff7e701441aaf78255195f454 | [] | no_license | qkralswl689/Java | f47c34fe6aa9e9348124cac5bc5e7a11201c0889 | 86478a57b92e6efb09713e58356ecf7a1558e260 | refs/heads/main | 2023-07-16T17:08:15.324772 | 2021-09-05T12:41:26 | 2021-09-05T12:41:26 | 335,169,422 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 601 | java | package com.javateam.jse;
// 싱글턴(독신자) 디자인 패턴: 생성 패턴의 일종 : GoF 디자인 패턴
final public class Singleton { // 상속 금지 클래스(보안)
private static Singleton instance = null;
// Singleton obj = new Singleton(); // 싱클턴 패턴 적용 (X)
// 생성자 => private (캡슐화)
private Singleton() {
}
// 대체 생성자 메서드 => 간접 인스턴스 생성
public static final Singleton getInstance() {
if(instance == null) {
instance = new Singleton();
}
return instance;
}
void demoMethod() {
}
}
| [
"65608960+qkralswl689@users.noreply.github.com"
] | 65608960+qkralswl689@users.noreply.github.com |
c41f4ffe29e4178555a0fdb2b62ef8b1b97861f5 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-13303-5-17-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/display/internal/DefaultDocumentDisplayer_ESTest.java | fda9f3006c3a7bb83b675680a744148327700979 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 581 | java | /*
* This file was automatically generated by EvoSuite
* Wed Apr 01 16:52:08 UTC 2020
*/
package org.xwiki.display.internal;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DefaultDocumentDisplayer_ESTest extends DefaultDocumentDisplayer_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
3a551b22a4664f9fefd550856dc047bc9bb2fcd0 | 144044f9282c50253a75bd8d5c23f619ad38fdf8 | /biao/biao-robot-unsafe/src/main/java/com/biao/rebot/dao/InsolentDBHelper.java | 75e462cdb0f8c292e27af5d1995b0e3a8a5013c2 | [] | no_license | clickear/biao | ba645de06b4e92b0539b05404c061194669f4570 | af71fd055c4ff3aa0b767a0a8b4eb74328e00f6f | refs/heads/master | 2020-05-16T15:47:33.675136 | 2019-09-25T08:20:28 | 2019-09-25T08:20:28 | 183,143,104 | 0 | 0 | null | 2019-04-24T03:46:28 | 2019-04-24T03:46:28 | null | UTF-8 | Java | false | false | 2,787 | java | package com.biao.rebot.dao;
import org.apache.empire.db.DBDatabase;
import org.apache.empire.db.DBDatabaseDriver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.Closeable;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
/**
* 数据库帮助类;
*
*
*/
public class InsolentDBHelper extends DBDatabase implements Closeable {
private static final Logger LOGGER = LoggerFactory.getLogger(InsolentDBHelper.class);
/**
* 连接;
*/
private Connection connection;
/**
* @param config config;
*/
public InsolentDBHelper(JdbcConfig config) {
try {
init(config);
} catch (RuntimeException e) {
LOGGER.error("DBHelper:init mysql database error....{}", e);
close();
throw e;
}
}
/**
* 初始化;不会调用连接池;
*
* @param config 配置信息;
* @throws RuntimeException 如果连接错误
*/
public void init(JdbcConfig config) throws RuntimeException {
try {
this.driver = (DBDatabaseDriver) Class.forName("org.apache.empire.db.mysql.DBDatabaseDriverMySQL").newInstance();
connection = getJdbcConnection("com.mysql.jdbc.Driver",
config.getUrl(),
config.getUsername(),
config.getPass());
} catch (Exception e) {
throw new RuntimeException("DBHelper:connection mysql database error:" + e);
}
}
/**
* 获取一个连接;
*
* @return 返回一个连接;
*/
public Connection getConnection() {
return connection;
}
/**
* 获取jdbc
*
* @param jdbcClass class
* @param url url
* @param user user
* @param pwd pwd
* @return 返回一个连接;
* @throws SQLException
* @throws ClassNotFoundException
*/
private static Connection getJdbcConnection(String jdbcClass, String url, String user, String pwd) throws SQLException, ClassNotFoundException {
try {
Class.forName(jdbcClass);
return DriverManager.getConnection(url, user, pwd);
} catch (Exception e) {
throw e;
}
}
/**
* 关闭连接
*/
@Override
public void close() {
if (connection != null) {
try {
super.close(connection);
connection.close();
} catch (SQLException e) {
LOGGER.error("DBHelper:close connection mysql database error:....,{}", e);
}
}
}
/**
* commit一个连接;
*/
public void commit() {
this.commit(connection);
}
}
| [
"1072163919@qq.com"
] | 1072163919@qq.com |
d15995b9abac2f4889f812ab36e546c39c3d4bb6 | 2213c380bf448f9f2b497a70790736bfa1afa961 | /yasper-simple/src/main/java/it/polimi/deib/rsp/simple/querying/SelectInstResponse.java | 10d7e50c6f1189cb602a2b44740332b913fa0e13 | [
"Apache-2.0"
] | permissive | riccardotommasini/yasper | 9adfbb196023f01b4cff9f505f27bd92549447f6 | 9d2719700a86083fb85a6bdeab1eeb235cd8b512 | refs/heads/monorepo | 2022-10-01T08:27:35.783205 | 2021-04-23T09:17:00 | 2021-04-23T09:17:00 | 64,671,163 | 5 | 5 | Apache-2.0 | 2022-09-16T23:57:41 | 2016-08-01T13:56:06 | HTML | UTF-8 | Java | false | false | 694 | java | package it.polimi.deib.rsp.simple.querying;
import it.polimi.yasper.core.querying.result.SolutionMapping;
import it.polimi.yasper.core.querying.result.SolutionMappingBase;
import org.apache.commons.rdf.api.Triple;
public class SelectInstResponse extends SolutionMappingBase<Triple> {
public SelectInstResponse(String id, long cep_timestamp, Triple triples) {
super(id, System.currentTimeMillis(), cep_timestamp, triples);
}
@Override
public SolutionMapping<Triple> difference(SolutionMapping<Triple> r) {
return null;
}
@Override
public SolutionMapping<Triple> intersection(SolutionMapping<Triple> new_response) {
return null;
}
}
| [
"riccardo.tommasini@polimi.it"
] | riccardo.tommasini@polimi.it |
b612cccaa14923ae04baad20301451960ed72fc3 | a770e95028afb71f3b161d43648c347642819740 | /sources/org/telegram/ui/Adapters/DialogsSearchAdapter$$ExternalSyntheticLambda6.java | db26fc8e9e4d5991c2bc66bd69fe40b42bbce2e2 | [] | no_license | Edicksonjga/TGDecompiledBeta | d7aa48a2b39bbaefd4752299620ff7b72b515c83 | d1db6a445d5bed43c1dc8213fb8dbefd96f6c51b | refs/heads/master | 2023-08-25T04:12:15.592281 | 2021-10-28T20:24:07 | 2021-10-28T20:24:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,410 | java | package org.telegram.ui.Adapters;
import java.util.ArrayList;
import org.telegram.tgnet.TLObject;
import org.telegram.tgnet.TLRPC$TL_error;
import org.telegram.tgnet.TLRPC$TL_messages_searchGlobal;
public final /* synthetic */ class DialogsSearchAdapter$$ExternalSyntheticLambda6 implements Runnable {
public final /* synthetic */ DialogsSearchAdapter f$0;
public final /* synthetic */ int f$1;
public final /* synthetic */ int f$2;
public final /* synthetic */ TLRPC$TL_error f$3;
public final /* synthetic */ String f$4;
public final /* synthetic */ TLObject f$5;
public final /* synthetic */ TLRPC$TL_messages_searchGlobal f$6;
public final /* synthetic */ ArrayList f$7;
public /* synthetic */ DialogsSearchAdapter$$ExternalSyntheticLambda6(DialogsSearchAdapter dialogsSearchAdapter, int i, int i2, TLRPC$TL_error tLRPC$TL_error, String str, TLObject tLObject, TLRPC$TL_messages_searchGlobal tLRPC$TL_messages_searchGlobal, ArrayList arrayList) {
this.f$0 = dialogsSearchAdapter;
this.f$1 = i;
this.f$2 = i2;
this.f$3 = tLRPC$TL_error;
this.f$4 = str;
this.f$5 = tLObject;
this.f$6 = tLRPC$TL_messages_searchGlobal;
this.f$7 = arrayList;
}
public final void run() {
this.f$0.lambda$searchMessagesInternal$0(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7);
}
}
| [
"fabian_pastor@msn.com"
] | fabian_pastor@msn.com |
40e40cb34461c127435dc5c355c3ccc5ad533ba7 | b06985abdda9b80602e292409b4ec8e98721195a | /trunk/My_Notes/Implementacao/My_Notes/src/Hello_My_Notes.java | 7e12b965d722f9bd0900be0e8a9ad7d758e3d024 | [] | no_license | BGCX067/fa7-estagio3-svn-to-git | 676043196cef4762e32d00b574d0e26b94a15c47 | 07f6365bbe97ae134aa4d8c37822fcf8705b45f4 | refs/heads/master | 2016-09-01T08:53:22.397803 | 2015-12-28T14:27:10 | 2015-12-28T14:27:10 | 48,836,318 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 222 | java | import android.app.Activity;
import android.os.Bundle;
public class Hello_My_Notes extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
} | [
"you@example.com"
] | you@example.com |
0faa940b2e8ac3058aa19726053da298895b9001 | 8df656e8539253a19a80dc4b81103ff0f70b2651 | /testManage/src/main/java/cn/pioneeruniverse/dev/dao/mybatis/TblReportMonthlySystemMapper.java | 7bc965c23c37ea9f45e8b4fb7bd95f4e22f66fb6 | [] | no_license | tanghaijian/itmp | 8713960093a66a39723a975b65a20824a2011d83 | 758bed477ec9550a1fd1cb19435c3b543524a792 | refs/heads/master | 2023-04-16T00:55:56.140767 | 2021-04-26T05:42:47 | 2021-04-26T05:42:47 | 361,607,388 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,373 | java | package cn.pioneeruniverse.dev.dao.mybatis;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import cn.pioneeruniverse.dev.entity.TblReportMonthlySystem;
public interface TblReportMonthlySystemMapper {
int deleteByPrimaryKey(Long id);
int insert(TblReportMonthlySystem record);
int insertSelective(TblReportMonthlySystem record);
TblReportMonthlySystem selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(TblReportMonthlySystem record);
int updateByPrimaryKey(TblReportMonthlySystem record);
int batchInsert(@Param("list") List<TblReportMonthlySystem> list);
int deleteByYearMonth(@Param("yearMonth")String yearMonth);
int jugeHis(@Param("yearMonth")String yearMonth);
List<Map<String, Object>> selectDefectPro(@Param("year")Integer year,@Param("month")Integer month,@Param("systemCode")String systemCode);
List<Map<String, Object>> selectReportBySystem(@Param("year")Integer year,@Param("month")Integer month);
List<Map<String, Object>> selectReportBySystemYear(@Param("year")Integer year,@Param("month")Integer month);
List<Map<String, Object>> selectWorseSystem(@Param("year")Integer year,@Param("systemCode")String systemCode);
List<TblReportMonthlySystem> selectReportSystem(@Param("yearMonth")String yearMonth);
} | [
"1049604112@qq.com"
] | 1049604112@qq.com |
b45fefeffa206274da5539ba198c66a9363e4b16 | 030cf2f11bc896930e3f16d0449c3dd583b3a7a0 | /baseLib/src/main/java/com/qflbai/lib/ui/widget/spinnerview/SpinnerView.java | 45a7366f9f362b0f3d3a4084d17efd9cee7fec88 | [] | no_license | qflbai/BaseLib | ab2afda83e296ede149a2e4ccc3a3818e8b28c57 | a5efff0347ba184b30ea6573e1c98d3af1fcee16 | refs/heads/master | 2021-07-09T00:31:22.167906 | 2020-11-02T03:39:06 | 2020-11-02T03:39:06 | 209,210,551 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,832 | java | package com.qflbai.lib.ui.widget.spinnerview;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ImageView;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.PopupWindow;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.qflbai.lib.R;
import com.qflbai.lib.utils.DensityUtil;
public class SpinnerView extends RelativeLayout implements OnClickListener {
private TextView mEtInput;
private ImageView mIvArrow;
private PopupWindow mWindow;
private ListAdapter mAdapter;
private OnItemClickListener mListener;
private ListView mContentView;
private Context mContext;
private RelativeLayout rlInput;
private OnClickListener mOnClickListener1;
public SpinnerView(Context context) {
this(context, null);
}
public SpinnerView(Context context, AttributeSet attrs) {
super(context, attrs);
mContext = context;
// xml和class 绑定
View.inflate(context, R.layout.spinner_item, this);
mEtInput = (TextView) findViewById(R.id.et_input);
rlInput = findViewById(R.id.rl_input);
rlInput.setOnClickListener(this);
mContentView = new ListView(getContext());
}
@Override
public void onClick(View v) {
if (v == rlInput) {
if(mOnClickListener1!=null){
mOnClickListener1.onClick(v);
}
if(!isHaveData()){
return;
}
haveData = true;
clickArrow();
}
}
public void setAdapter(ListAdapter adapter) {
this.mAdapter = adapter;
}
public void setOnItemClickListener(OnItemClickListener listener) {
this.mListener = listener;
}
private void clickArrow() {
// 点击箭头,需要弹出显示list数据的层
if (mAdapter == null) {
throw new RuntimeException("请调用setAapter()去设置数据");
}
if (mWindow == null) {
// contentView:显示的view
// width height:popup宽和高
//mContentView = new ListView(getContext());
// 设置数据
mContentView.setAdapter(mAdapter);// ---》adapter---》List《数据》
int width = mEtInput.getWidth();
//int height = mEtInput.getHeight();
mWindow = new PopupWindow(mContentView, width, DensityUtil.dip2px(mContext, 260));
// 设置获取焦点
mWindow.setFocusable(true);
// 设置边缘点击收起
mWindow.setOutsideTouchable(true);
mWindow.setBackgroundDrawable(new ColorDrawable(Color.WHITE));
}
// 设置item的点击事件
mContentView.setOnItemClickListener(mListener);
mWindow.showAsDropDown(mEtInput);
}
public void setText(String data) {
mEtInput.setText(data);
}
public TextView getTextView() {
return mEtInput;
}
public String getText() {
return mEtInput.getText().toString();
}
public void dismiss() {
if (mWindow != null) {
mWindow.dismiss();
}
}
public ListView getListView() {
return mContentView;
}
/**
* 设置提示词
*
* @param hintText
*/
public void setHintText(String hintText) {
if (mEtInput != null) {
mEtInput.setHint(hintText);
}
}
/**
* 设置输入框背景
*
* @param background
*/
public void setInputBackground(int background) {
if (mEtInput != null) {
mEtInput.setBackgroundResource(background);
}
}
/**
* 设置右边图片样式
*
* @param drawable
*/
public void setImageViewForeground(Drawable drawable) {
if (mIvArrow != null) {
mIvArrow.setBackground(drawable);
}
}
/**
* 设置背景
*
* @param background
*/
public void setPopupBackground(int background) {
if (mContentView != null) {
mContentView.setBackgroundResource(background);
}
}
private boolean haveData = true;
public void setHaveData(boolean flag){
haveData = flag;
}
private boolean isHaveData() {
return haveData;
}
public void setOnClickListener(OnClickListener onClickListener){
mOnClickListener1 = onClickListener;
}
public interface OnClickListener {
void onClick(View v);
}
}
| [
"qflbai@163.com"
] | qflbai@163.com |
bcc29a8fd74ba0d2feab759ea004e9be5e8111ed | 939eca99c5b48cc2c15b9699e6cbb0f13c8ce6d5 | /DatBot.Interface/src/protocol/network/types/game/presets/ItemForPreset.java | 4359e8bcf2e0388f81b948ff45ba2b25e86eb0b1 | [
"MIT"
] | permissive | ProjectBlackFalcon/DatBot | 032a2ec70725ed497556480fd2d10907347dce69 | 1dd1af94c550272417a4b230e805988698cfbf3c | refs/heads/master | 2022-07-22T11:01:58.837303 | 2022-07-12T09:10:30 | 2022-07-12T09:10:30 | 111,686,347 | 7 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,615 | java | package protocol.network.types.game.presets;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import protocol.utils.ProtocolTypeManager;
import protocol.network.util.types.BooleanByteWrapper;
import protocol.network.NetworkMessage;
import protocol.network.util.DofusDataReader;
import protocol.network.util.DofusDataWriter;
import protocol.network.Network;
import protocol.network.NetworkMessage;
@SuppressWarnings("unused")
public class ItemForPreset extends NetworkMessage {
public static final int ProtocolId = 540;
private int position;
private int objGid;
private int objUid;
public int getPosition() { return this.position; }
public void setPosition(int position) { this.position = position; };
public int getObjGid() { return this.objGid; }
public void setObjGid(int objGid) { this.objGid = objGid; };
public int getObjUid() { return this.objUid; }
public void setObjUid(int objUid) { this.objUid = objUid; };
public ItemForPreset(){
}
public ItemForPreset(int position, int objGid, int objUid){
this.position = position;
this.objGid = objGid;
this.objUid = objUid;
}
@Override
public void Serialize(DofusDataWriter writer) {
try {
writer.writeShort(this.position);
writer.writeVarShort(this.objGid);
writer.writeVarInt(this.objUid);
} catch (Exception e){
e.printStackTrace();
}
}
@Override
public void Deserialize(DofusDataReader reader) {
try {
this.position = reader.readShort();
this.objGid = reader.readVarShort();
this.objUid = reader.readVarInt();
} catch (Exception e){
e.printStackTrace();
}
}
}
| [
"baptiste.beduneau@reseau.eseo.fr"
] | baptiste.beduneau@reseau.eseo.fr |
c5a3e9e5826587c78708a39e42f9f330160970fe | 5d7eceb50fcc79fa09ca9f34d665ec8223cbbc09 | /JxSmartHome/src/com/jinxin/datan/net/command/UpdateCustomerPatternTask.java | 735a82e4eddf9f0f5e3323ee5a09e0b0a89234a1 | [] | no_license | WonderFannn/WFJxSmartHome | 253abbae09bf84d63db55ba7f6b0df41ea806286 | 7d1168741b626da9e9ca128694d622f86e725a99 | refs/heads/master | 2021-01-01T18:40:37.713436 | 2018-02-02T02:33:55 | 2018-02-02T02:33:55 | 98,402,240 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,469 | java | package com.jinxin.datan.net.command;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import android.content.Context;
import com.jinxin.datan.net.DatanAgentConnectResource;
import com.jinxin.datan.net.protocol.UpdateCustomerPattern;
import com.jinxin.datan.toolkit.internet.InternetTask;
import com.jinxin.datan.toolkit.internet.NetRequest;
import com.jinxin.jxsmarthome.constant.ControlDefine;
import com.jinxin.jxsmarthome.entity.Header;
import com.jinxin.jxsmarthome.entity.ProductPatternOperation;
import com.jinxin.jxsmarthome.util.CommUtil;
import com.jinxin.jxsmarthome.util.Logger;
import com.jinxin.jxsmarthome.util.StringUtils;
import com.jinxin.record.SharedDB;
/**
* 修改产品模式操作接口
* @author JackeyZhang
* @company 金鑫智慧
*/
public class UpdateCustomerPatternTask extends InternetTask {
/**
* 请求任务
*/
private NetRequest request = null;
private List<ProductPatternOperation> productPatternOperationList = null;
private int patternId = -1;
/**
*
* @param context
*/
public UpdateCustomerPatternTask(Context context,int patternId, List<ProductPatternOperation> productPatternOperationList) {
this.productPatternOperationList = productPatternOperationList;
this.patternId = patternId;
this.init();
super.setNetRequest(context, this.request, null);
}
private void init() {
byte[] requestBytes = null;
try {
Header header = new Header(ControlDefine.BS_USER_PATTERN_MANAGER,
ControlDefine.TRD_CHANGE_PASSWORD, ControlDefine.ACTION_REQUEST,
StringUtils.getSystemCurrentTime(), ControlDefine.TEST_TRUE);
//
requestBytes = getRequestByte(header, createServiceContent());
//
} catch (JSONException e) {
e.printStackTrace();
}
this.request = new NetRequest(DatanAgentConnectResource.HTTP_ACCESSPATH, new UpdateCustomerPattern(this,
requestBytes));
}
/**
* 创建serviceContent JSON数据体
*
* @return
* @throws JSONException
*/
private JSONObject createServiceContent() throws JSONException {
String _secretKey = SharedDB.loadStrFromDB(SharedDB.ORDINARY_CONSTANTS, ControlDefine.KEY_SECRETKEY,"");
String _account = CommUtil.getCurrentLoginAccount();
// String _updateTime = SharedDB.loadStrFromDB(SharedDB.ORDINARY_CONSTANTS, ControlDefine.KEY_CUSTOMER_PATTERN_LIST,ControlDefine.DEFAULT_UPDATE_TIME);
JSONObject serviceContent = new JSONObject();
serviceContent.put("secretKey", _secretKey);
serviceContent.put("account", _account);
serviceContent.put("patternId", patternId);
// serviceContent.put("updateTime", _updateTime);
JSONArray jsonArray = new JSONArray();
if(this.productPatternOperationList != null){
for(ProductPatternOperation productPatternOperation : this.productPatternOperationList){
if(productPatternOperation != null){
JSONObject _jo = new JSONObject();
_jo.put("funId", productPatternOperation.getFunId());
_jo.put("whId", productPatternOperation.getWhId());
_jo.put("patternId", productPatternOperation.getPatternId());
_jo.put("operation", productPatternOperation.getOperation());
_jo.put("paraDesc", productPatternOperation.getParaDesc());
jsonArray.put(_jo);
// Logger.error(null, _jo.toString());
}
}
}
serviceContent.put("patternList", jsonArray);
return serviceContent;
}
}
| [
"sail032@live.cn"
] | sail032@live.cn |
0dbed8a4964346bf4e44e8134cb42d7377718863 | f72971fbab14458776400d240216442d8a46cbe1 | /modules/common/src/main/java/wsimport/lib/amadeus/wshotelavail/SpecialReqPref.java | 90cf3654c7ea8d474f6485aed742df2861aa8dd5 | [] | no_license | hamzzy/Amadeus-Sabre-Java-Multi-GDS-SDK | cea5ee9f3be520bfbf509d5207adcc7c0f4ec4b8 | a21e706c17b85d99e1ef573f66c88efa9e2918fe | refs/heads/master | 2022-11-05T16:49:24.067050 | 2020-06-28T03:59:13 | 2020-06-28T03:59:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,204 | java |
package wsimport.lib.amadeus.wshotelavail;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
/**
* <p>Java class for SpecialReqPref complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="SpecialReqPref">
* <simpleContent>
* <extension base="<http://www.w3.org/2001/XMLSchema>string">
* <attribute name="PreferLevel" type="{http://traveltalk.com/wsHotelAvail}SpecialReqPrefPreferLevel" default="Preferred" />
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SpecialReqPref", propOrder = {
"value"
})
public class SpecialReqPref {
@XmlValue
protected String value;
@XmlAttribute(name = "PreferLevel")
protected SpecialReqPrefPreferLevel preferLevel;
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
/**
* Gets the value of the preferLevel property.
*
* @return
* possible object is
* {@link SpecialReqPrefPreferLevel }
*
*/
public SpecialReqPrefPreferLevel getPreferLevel() {
if (preferLevel == null) {
return SpecialReqPrefPreferLevel.PREFERRED;
} else {
return preferLevel;
}
}
/**
* Sets the value of the preferLevel property.
*
* @param value
* allowed object is
* {@link SpecialReqPrefPreferLevel }
*
*/
public void setPreferLevel(SpecialReqPrefPreferLevel value) {
this.preferLevel = value;
}
}
| [
"info@brakket.tech"
] | info@brakket.tech |
5272bbff2acc07e2940dc1ecc61d21d2762df613 | 14aacd43c9e52e53b762071bfb2b8b16366ed84a | /unalcol/innercore/unalcol/string/Util.java | 35f6c32fc263abcfed006317912d3cc16e6bf7ee | [] | no_license | danielrcardenas/unalcol | 26ff523a80a4b62b687e2b2286523fa2adde69c4 | b56ee54145a7c5bcc0faf187c09c69b7587f6ffe | refs/heads/master | 2021-01-15T17:15:02.732499 | 2019-04-28T05:18:09 | 2019-04-28T05:18:09 | 203,480,783 | 0 | 0 | null | 2019-08-21T01:19:47 | 2019-08-21T01:19:47 | null | UTF-8 | Java | false | false | 1,635 | java | package unalcol.string;
import unalcol.constants.InnerCore;
import unalcol.exception.ParamsException;
public class Util{
protected static Parser parser = new Parser();
public static String store( String str ){
StringBuilder sb = new StringBuilder();
sb.append('"');
for( int i=0; i<str.length(); i++ ){
char c = str.charAt(i);
switch( c ){
case '/': sb.append("\\/"); break;
case '\\': sb.append("\\\\"); break;
case '\b': sb.append("\\b"); break;
case '\f': sb.append("\\f"); break;
case '\n': sb.append("\\n"); break;
case '\r': sb.append("\\r"); break;
case '\t': sb.append("\\t"); break;
case '\'': sb.append("\'"); break;
case '"': sb.append("\\\""); break;
default:
if( c < 32 || c > 255 ){
sb.append("\\u");
sb.append(Integer.toHexString((int)c));
}else sb.append(c);
break;
}
}
sb.append('"');
return sb.toString();
}
public static char escape_char( char c ) throws Exception{
switch( c ){
case '\'': case '\\': case '/': return c;
case 'b': return '\b';
case 'f': return '\f';
case 'n': return '\n';
case 'r': return '\r';
case 't': return '\t';
default: throw new ParamsException(InnerCore.ESC_CHAR, c);
}
}
public static Object number( String txt, int pos ) throws Exception{ return parser.number(txt, pos); }
public static char character( String txt, int pos ) throws Exception{ return parser.character(txt,pos); }
public static String string( String txt, int pos ) throws Exception{ return parser.string(txt, pos); }
public static int parserConsumed(){ return parser.consumed(); }
} | [
"jgomezpe@unal.edu.co"
] | jgomezpe@unal.edu.co |
ed10be11a6859688d153df7db464f32ec083de2e | 544cfadc742536618168fc80a5bd81a35a5f2c99 | /tools/tradefederation/core/test_framework/com/android/tradefed/targetprep/multi/MergeMultiBuildTargetPreparer.java | e1a038158854e3771a6279156d1c03e885f43281 | [] | no_license | ZYHGOD-1/Aosp11 | 0400619993b559bf4380db2da0addfa9cccd698d | 78a61ca023cbf1a0cecfef8b97df2b274ac3a988 | refs/heads/main | 2023-04-21T20:13:54.629813 | 2021-05-22T05:28:21 | 2021-05-22T05:28:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,887 | java | /*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.tradefed.targetprep.multi;
import com.android.tradefed.build.IBuildInfo;
import com.android.tradefed.build.VersionedFile;
import com.android.tradefed.config.Option;
import com.android.tradefed.config.OptionClass;
import com.android.tradefed.device.DeviceNotAvailableException;
import com.android.tradefed.invoker.IInvocationContext;
import com.android.tradefed.invoker.TestInformation;
import com.android.tradefed.log.LogUtil.CLog;
import com.android.tradefed.targetprep.BuildError;
import com.android.tradefed.targetprep.TargetSetupError;
import java.util.HashSet;
import java.util.Set;
/**
* A {@link IMultiTargetPreparer} that allows to pass information from one build to another by
* naming them and the file key to copy to the other build. If the key already exists in the
* destination build, then nothing is done.
*/
@OptionClass(alias = "multi-build-merge")
public final class MergeMultiBuildTargetPreparer extends BaseMultiTargetPreparer {
@Option(
name = "src-device",
description =
"The name of the device that will provide the files. As specified in the "
+ "<device> tag of the configuration.",
mandatory = true
)
private String mProvider;
@Option(
name = "dest-device",
description =
"The name of the device that will receive the files. As specified in the "
+ "<device> tag of the configuration.",
mandatory = true
)
private String mReceiver;
@Option(name = "key-to-copy", description = "The name of the files that needs to be moved.")
private Set<String> mKeysToMove = new HashSet<>();
@Override
public void setUp(TestInformation testInfo)
throws TargetSetupError, BuildError, DeviceNotAvailableException {
IInvocationContext context = testInfo.getContext();
// First assert that the two device are found
IBuildInfo providerInfo = context.getBuildInfo(mProvider);
if (providerInfo == null) {
// Use the first device descriptor since if the build is missing we are probably not
// going to find the device.
throw new TargetSetupError(
String.format("Could not find a build associated with '%s'", mProvider),
context.getDevices().get(0).getDeviceDescriptor());
}
IBuildInfo receiverInfo = context.getBuildInfo(mReceiver);
if (receiverInfo == null) {
// Use the first device descriptor since if the build is missing we are probably not
// going to find the device.
throw new TargetSetupError(
String.format("Could not find a build associated with '%s'", mReceiver),
context.getDevices().get(0).getDeviceDescriptor());
}
// Move the requested keys.
for (String key : mKeysToMove) {
VersionedFile toBeMoved = providerInfo.getVersionedFile(key);
if (toBeMoved == null) {
CLog.w("Key '%s' did not match any files, ignoring.", key);
continue;
}
receiverInfo.setFile(key, toBeMoved.getFile(), toBeMoved.getVersion());
}
}
}
| [
"rick_tan@qq.com"
] | rick_tan@qq.com |
de8d041d272683da9c29d2202b6f2d10b88382b7 | de02b04d7e8c83d4594a0a6635a8d30dce4bc995 | /src/test/java/BasicFeaturesTests.java | 2087bf74d34716c209093e7f3cc5af35ee84d570 | [] | no_license | smartinrub/junit5-features | 65cda83fe54c821ef07d42856fa8f2364c0fffa5 | f8c0def84555df6022276148b252c3d9e7e107f6 | refs/heads/master | 2020-03-29T10:56:53.509453 | 2018-09-23T10:53:01 | 2018-09-23T10:53:01 | 149,830,593 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 646 | java | import org.junit.jupiter.api.*;
import static org.junit.jupiter.api.Assertions.assertTrue;
class BasicFeaturesTests {
@BeforeAll
static void initAll() {
System.out.println("@BeforeAll runs once before all tests");
}
@BeforeEach
void init() {
System.out.println("@BeforeEach runs before each test");
}
@AfterAll
static void tearDownAll() {
System.out.println("@AfterAll runs once after all tests");
}
@AfterEach
void tearDown() {
System.out.println("@AfterEach runs after each test");
}
@Test
void successfulTest() {
assertTrue(2 < 5);
}
}
| [
"econsergio@gmail.com"
] | econsergio@gmail.com |
3db8215812decc46f8324316d80d412186bbac5e | d6cf28d1b37216c657d23d8e512c15bdd9d3f226 | /app/src/main/java/com/foreveross/atwork/component/MatrixImageView.java | ccc1cc6fa9917b132d5b75631bd069b82d56eda6 | [
"MIT"
] | permissive | AoEiuV020/w6s_lite_android | a2ec1ca8acdc848592266b548b9ac6b9a4117cd3 | 1c4ca5bdaea6d5230d851fb008cf2578a23b2ce5 | refs/heads/master | 2023-08-22T00:46:03.054115 | 2021-10-27T06:21:32 | 2021-10-27T07:45:41 | 421,650,297 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,801 | java | package com.foreveross.atwork.component;
import android.content.Context;
import android.graphics.Matrix;
import android.graphics.PointF;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.ImageView;
/**
* Created by lingen on 15/6/11.
* Description:
*/
public class MatrixImageView extends ImageView {
private static final int DRAG = 1;//拖动
private static final int ZOOM = 2;//放大
private PointF startPoint = new PointF();
private Matrix matrix = new Matrix();
private Matrix currentMaritx = new Matrix();
private int mode = 0;//用于标记模式
private float startDis = 0;
private PointF midPoint;//中心点
/**
* 默认构造函数
*
* @param context
*/
public MatrixImageView(Context context) {
super(context);
}
/**
* 该构造方法在静态引入XML文件中是必须的
*
* @param context
* @param paramAttributeSet
*/
public MatrixImageView(Context context, AttributeSet paramAttributeSet) {
super(context, paramAttributeSet);
}
/**
* 两点之间的距离
*
* @param event
* @return
*/
private static float distance(MotionEvent event) {
//两根线的距离
float dx = event.getX(1) - event.getX(0);
float dy = event.getY(1) - event.getY(0);
return (float) Math.sqrt(dx * dx + dy * dy);
}
/**
* 计算两点之间中心点的距离
*
* @param event
* @return
*/
private static PointF mid(MotionEvent event) {
float midx = event.getX(1) + event.getX(0);
float midy = event.getY(1) - event.getY(0);
return new PointF(midx / 2, midy / 2);
}
public boolean onTouchEvent(MotionEvent event) {
switch (event.getAction() & MotionEvent.ACTION_MASK) {
case MotionEvent.ACTION_DOWN:
mode = DRAG;
currentMaritx.set(this.getImageMatrix());//记录ImageView当期的移动位置
startPoint.set(event.getX(), event.getY());//开始点
break;
case MotionEvent.ACTION_MOVE://移动事件
if (mode == DRAG) {//图片拖动事件
float dx = event.getX() - startPoint.x;//x轴移动距离
float dy = event.getY() - startPoint.y;
matrix.set(currentMaritx);//在当前的位置基础上移动
matrix.postTranslate(dx, dy);
} else if (mode == ZOOM) {//图片放大事件
float endDis = distance(event);//结束距离
if (endDis > 10f) {
float scale = endDis / startDis;//放大倍数
//Log.v("scale=", String.valueOf(scale));
matrix.set(currentMaritx);
matrix.postScale(scale, scale, midPoint.x, midPoint.y);
}
}
break;
case MotionEvent.ACTION_UP:
mode = 0;
break;
//有手指离开屏幕,但屏幕还有触点(手指)
case MotionEvent.ACTION_POINTER_UP:
mode = 0;
break;
//当屏幕上已经有触点(手指),再有一个手指压下屏幕
case MotionEvent.ACTION_POINTER_DOWN:
mode = ZOOM;
startDis = distance(event);
if (startDis > 10f) {//避免手指上有两个茧
midPoint = mid(event);
currentMaritx.set(this.getImageMatrix());//记录当前的缩放倍数
}
break;
}
this.setImageMatrix(matrix);
return true;
}
}
| [
"lingen.liu@gmail.com"
] | lingen.liu@gmail.com |
f318954063bd544977eaa4b6e4ba1d329127093c | 908b2a5659926ebfb0a6a7da506f627e36f60a81 | /src/main/java/com/jos/dem/springboot/docker/controller/DemoController.java | e9636512a1cbcf0693805e36b46a47cab2c04f9a | [] | no_license | josdem/spring-boot-docker | d4e305fc6146530478cc94b7ecbc6d542d42e1ad | 4c4bc0ebe98cdd5f394e7672348a86eca96803bd | refs/heads/master | 2020-03-19T19:18:41.540430 | 2018-06-12T00:54:31 | 2018-06-12T00:54:31 | 136,849,297 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 308 | java | package com.jos.dem.springboot.docker.controller;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
@RestController
public class DemoController {
@RequestMapping("/")
public String index(){
return "Hello Docker!";
}
}
| [
"joseluis.delacruz@gmail.com"
] | joseluis.delacruz@gmail.com |
654e9b6f40cd84b89fd053061aa027f7f8533d78 | 17e8438486cb3e3073966ca2c14956d3ba9209ea | /dso/tags/2.2.2/code/base/common/src/com/tc/logging/TCAppender.java | 01dbbfc72beefa216d2609377c3746e79887034c | [] | no_license | sirinath/Terracotta | fedfc2c4f0f06c990f94b8b6c3b9c93293334345 | 00a7662b9cf530dfdb43f2dd821fa559e998c892 | refs/heads/master | 2021-01-23T05:41:52.414211 | 2015-07-02T15:21:54 | 2015-07-02T15:21:54 | 38,613,711 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,431 | java | /*
* All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
*/
package com.tc.logging;
import org.apache.log4j.AppenderSkeleton;
import org.apache.log4j.spi.LoggingEvent;
import com.tc.exception.TCRuntimeException;
import com.tc.management.beans.logging.TCLoggingBroadcaster;
import com.tc.management.beans.logging.TCLoggingBroadcasterMBean;
import javax.management.NotCompliantMBeanException;
/**
* Special Appender that notifies JMX listeners on LoggingEvents.
*
* @see org.apache.log4j.RollingFileAppender
* @see TCLoggingBroadcasterMBean
* @author gkeim
*/
public class TCAppender extends AppenderSkeleton {
private final TCLoggingBroadcaster broadcastingBean;
public TCAppender() {
try {
broadcastingBean = new TCLoggingBroadcaster();
} catch (NotCompliantMBeanException ncmbe) {
throw new TCRuntimeException("Unable to construct the broadcasting MBean: this is a programming error in "
+ TCLoggingBroadcaster.class.getName(), ncmbe);
}
}
public final TCLoggingBroadcasterMBean getMBean() {
return broadcastingBean;
}
protected void append(final LoggingEvent event) {
broadcastingBean.broadcastLogEvent(getLayout().format(event));
}
public boolean requiresLayout() {
return false;
}
public void close() {
// Do nothing
}
}
| [
"jvoegele@7fc7bbf3-cf45-46d4-be06-341739edd864"
] | jvoegele@7fc7bbf3-cf45-46d4-be06-341739edd864 |
1369abd288bc4873e7e4d1085fe8e451f810ebf6 | 0a532b9d7ebc356ab684a094b3cf840b6b6a17cd | /java-source/src/main/com/sun/org/apache/xerces/internal/dom/LCount.java | 77545bda44ad1cb763ca50c91b9944970aeb72b5 | [
"Apache-2.0"
] | permissive | XWxiaowei/JavaCode | ac70d87cdb0dfc6b7468acf46c84565f9d198e74 | a7e7cd7a49c36db3ee479216728dd500eab9ebb2 | refs/heads/master | 2022-12-24T10:21:28.144227 | 2020-08-22T08:01:43 | 2020-08-22T08:01:43 | 98,070,624 | 10 | 4 | Apache-2.0 | 2022-12-16T04:23:38 | 2017-07-23T02:51:51 | Java | UTF-8 | Java | false | false | 1,801 | java | /*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.sun.org.apache.xerces.internal.dom;
/** Internal class LCount is used to track the number of
listeners registered for a given event name, as an entry
in a global Map. This should allow us to avoid generating,
or discarding, events for which no listeners are registered.
***** There should undoubtedly be methods here to manipulate
this table. At the moment that code's residing in NodeImpl.
Move it when we have a chance to do so. Sorry; we were
rushed.
*/
/**
* @xerces.internal
*
*/
class LCount
{
static final java.util.Map<String, LCount> lCounts=new java.util.concurrent.ConcurrentHashMap<>();
public int captures=0,bubbles=0,defaults, total=0;
static LCount lookup(String evtName)
{
LCount lc=(LCount)lCounts.get(evtName);
if(lc==null)
lCounts.put(evtName,(lc=new LCount()));
return lc;
}
} // class LCount
| [
"2809641033@qq.com"
] | 2809641033@qq.com |
5d636964095a058f924b180f5c01eea9649e8b6c | 73267be654cd1fd76cf2cb9ea3a75630d9f58a41 | /services/gsl/src/main/java/com/huaweicloud/sdk/gsl/v3/model/ListAttributesResponse.java | afc56c63ebcebb2f9848205498501ccb2ae7497a | [
"Apache-2.0"
] | permissive | huaweicloud/huaweicloud-sdk-java-v3 | 51b32a451fac321a0affe2176663fed8a9cd8042 | 2f8543d0d037b35c2664298ba39a89cc9d8ed9a3 | refs/heads/master | 2023-08-29T06:50:15.642693 | 2023-08-24T08:34:48 | 2023-08-24T08:34:48 | 262,207,545 | 91 | 57 | NOASSERTION | 2023-09-08T12:24:55 | 2020-05-08T02:27:00 | Java | UTF-8 | Java | false | false | 4,179 | java | package com.huaweicloud.sdk.gsl.v3.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.huaweicloud.sdk.core.SdkResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.function.Consumer;
/**
* Response Object
*/
public class ListAttributesResponse extends SdkResponse {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "limit")
private Long limit;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "offset")
private Long offset;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "count")
private Long count;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "attributes")
private List<CmAttributeVO> attributes = null;
public ListAttributesResponse withLimit(Long limit) {
this.limit = limit;
return this;
}
/**
* 每页记录数
* @return limit
*/
public Long getLimit() {
return limit;
}
public void setLimit(Long limit) {
this.limit = limit;
}
public ListAttributesResponse withOffset(Long offset) {
this.offset = offset;
return this;
}
/**
* 页码
* @return offset
*/
public Long getOffset() {
return offset;
}
public void setOffset(Long offset) {
this.offset = offset;
}
public ListAttributesResponse withCount(Long count) {
this.count = count;
return this;
}
/**
* 记录总数
* @return count
*/
public Long getCount() {
return count;
}
public void setCount(Long count) {
this.count = count;
}
public ListAttributesResponse withAttributes(List<CmAttributeVO> attributes) {
this.attributes = attributes;
return this;
}
public ListAttributesResponse addAttributesItem(CmAttributeVO attributesItem) {
if (this.attributes == null) {
this.attributes = new ArrayList<>();
}
this.attributes.add(attributesItem);
return this;
}
public ListAttributesResponse withAttributes(Consumer<List<CmAttributeVO>> attributesSetter) {
if (this.attributes == null) {
this.attributes = new ArrayList<>();
}
attributesSetter.accept(this.attributes);
return this;
}
/**
* 自定义属性记录
* @return attributes
*/
public List<CmAttributeVO> getAttributes() {
return attributes;
}
public void setAttributes(List<CmAttributeVO> attributes) {
this.attributes = attributes;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
ListAttributesResponse that = (ListAttributesResponse) obj;
return Objects.equals(this.limit, that.limit) && Objects.equals(this.offset, that.offset)
&& Objects.equals(this.count, that.count) && Objects.equals(this.attributes, that.attributes);
}
@Override
public int hashCode() {
return Objects.hash(limit, offset, count, attributes);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ListAttributesResponse {\n");
sb.append(" limit: ").append(toIndentedString(limit)).append("\n");
sb.append(" offset: ").append(toIndentedString(offset)).append("\n");
sb.append(" count: ").append(toIndentedString(count)).append("\n");
sb.append(" attributes: ").append(toIndentedString(attributes)).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 ");
}
}
| [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
456440424d984883c08303be214ab0b7d6d114fb | 3850f0947d9923cdee8816f96c17f036b003f4e6 | /app/src/main/java/com/jiaying/mediatablet/net/signal/command/PunctureCommand.java | 385935097bd2d6b17c9cd699875a83404008eaf0 | [] | no_license | libo2007/MediaTablet-feature_backgroud_rec_wifi_version_update | 41324ffa0d110186d9e446ff689b707236234cf5 | b8d73d6ce771a2937667f0f65396fda1bb71f0f6 | refs/heads/master | 2021-01-13T12:16:45.322230 | 2017-01-13T12:44:19 | 2017-01-13T12:44:19 | 78,317,640 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 429 | java | package com.jiaying.mediatablet.net.signal.command;
import com.jiaying.mediatablet.net.signal.receiver.Receiver;
/**
* Created by hipil on 2016/9/17.
*/
public class PunctureCommand extends Command{
private Receiver receiver;
public PunctureCommand(Receiver receiver) {
this.receiver = receiver;
}
@Override
public boolean execute() {
this.receiver.work();
return false;
}
}
| [
"353510746@qq.com"
] | 353510746@qq.com |
63bcf82e8270cc43f06efa2904c6c6617783d9d8 | 0e0dae718251c31cbe9181ccabf01d2b791bc2c2 | /SCT2/tags/M_SCT2_08/plugins/org.yakindu.sct.generator.base/src/org/yakindu/sct/builder/subscriber/SubscriberExtensions.java | 83933c700c44f972b8739d83fc1fe2732af39769 | [] | no_license | huybuidac20593/yakindu | 377fb9100d7db6f4bb33a3caa78776c4a4b03773 | 304fb02b9c166f340f521f5e4c41d970268f28e9 | refs/heads/master | 2021-05-29T14:46:43.225721 | 2015-05-28T11:54:07 | 2015-05-28T11:54:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,665 | java | /**
* Copyright (c) 2011 committers of YAKINDU and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
* Contributors:
* committers of YAKINDU - initial API and implementation
*
*/
package org.yakindu.sct.builder.subscriber;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.Platform;
/**
*
* @author andreas muelder - Initial contribution and API
*
*/
@Deprecated
public class SubscriberExtensions {
private static final String extensionPointId = "org.yakindu.sct.builder.subscriber";
public static List<IBuilderSubscriber> getSubscriber(String resourceUri) {
List<IBuilderSubscriber> providers = new ArrayList<IBuilderSubscriber>();
IConfigurationElement[] configurationElements = Platform
.getExtensionRegistry().getConfigurationElementsFor(
extensionPointId);
for (IConfigurationElement configurationElement : configurationElements) {
try {
String resourceExtension = configurationElement
.getAttribute("resourceExtension");
if (resourceUri.endsWith(resourceExtension)) {
IBuilderSubscriber provider = (IBuilderSubscriber) configurationElement
.createExecutableExtension("class");
providers.add(provider);
}
} catch (CoreException e) {
e.printStackTrace();
}
}
return providers;
}
}
| [
"terfloth@itemis.de"
] | terfloth@itemis.de |
8f64ffa6f1ac657d22490e2a228e687895f0287c | 7e7c88b4033bc4a73660b65abe4a87b48ee62c77 | /src/com/huluhaziqi/algorithms/pattern/state/SoldOutState.java | 87aa0b4b45dbc839ecb7dcb15d5bd7e73ac57493 | [] | no_license | huluhaziqi/algorithms | 17909c7c9885ba9f6661e731fbba8fbf030c0aa5 | 0adb2798486d23b38ea8139350c015ab4cbea86a | refs/heads/master | 2022-08-04T11:06:31.076641 | 2022-07-17T07:14:56 | 2022-07-17T07:14:56 | 131,382,233 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 742 | java | package com.huluhaziqi.algorithms.pattern.state;
public class SoldOutState implements State {
GumballMachine gumballMachine ;
public SoldOutState(GumballMachine gumballMachine) {
this.gumballMachine = gumballMachine;
}
@Override
public void insertQuarter() {
System.out.println("you can not insert a coin ,the machine is sold out");
}
@Override
public void ejectQuarter() {
System.out.println("you can not eject .you haven't inserted a quater yet");
}
@Override
public void turnCrank() {
System.out.println("you turned ,but there are not gumballs");
}
@Override
public void dispense() {
System.out.println("no gumball dispensed");
}
}
| [
"huluhaziqi@gmail.com"
] | huluhaziqi@gmail.com |
3d07b6eb79eabb5015fbe3510f7cd0df0124e3bf | f8bbaed1e9dc1f659fc6ec70fba1a3b7e22e5e61 | /com.io7m.jcoronado.api/src/main/java/com/io7m/jcoronado/api/VulkanPipelineRasterizationStateCreateInfoType.java | 691101ebda676703cf61af27f3199903d57fef26 | [
"ISC"
] | permissive | io7m/jcoronado | c987e734b0d1e2db360e2af6589a6e75d4084312 | 40744041e82b00702ee3e945eda789f9f59ce403 | refs/heads/develop | 2023-08-17T08:47:45.519073 | 2023-08-13T21:16:10 | 2023-08-13T21:16:10 | 136,840,281 | 3 | 1 | null | 2021-04-05T13:45:21 | 2018-06-10T19:53:49 | Java | UTF-8 | Java | false | false | 3,240 | java | /*
* Copyright © 2018 Mark Raynsford <code@io7m.com> http://io7m.com
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
package com.io7m.jcoronado.api;
import com.io7m.immutables.styles.ImmutablesStyleType;
import org.immutables.value.Value;
import java.util.EnumSet;
import java.util.Set;
/**
* @see "VkPipelineRasterizationStateCreateInfo"
*/
@VulkanAPIStructType(vulkanStruct = "VkPipelineRasterizationStateCreateInfo")
@ImmutablesStyleType
@Value.Immutable
public interface VulkanPipelineRasterizationStateCreateInfoType
{
/**
* @return State creation flags
*/
@Value.Parameter
Set<VulkanPipelineRasterizationStateCreateFlag> flags();
/**
* @return controls whether to clamp the fragment’s depth values instead of clipping primitives to
* the z planes of the frustum.
*/
@Value.Parameter
boolean depthClampEnable();
/**
* @return controls whether primitives are discarded immediately before the rasterization stage.
*/
@Value.Parameter
boolean rasterizerDiscardEnable();
/**
* @return the triangle rendering mode.
*/
@Value.Parameter
@Value.Default
default VulkanPolygonMode polygonMode()
{
return VulkanPolygonMode.VK_POLYGON_MODE_FILL;
}
/**
* @return the triangle facing direction used for primitive culling.
*/
@Value.Parameter
@Value.Default
default Set<VulkanCullModeFlag> cullMode()
{
return EnumSet.of(VulkanCullModeFlag.VK_CULL_MODE_BACK_BIT);
}
/**
* @return the front-facing triangle orientation to be used for culling.
*/
@Value.Parameter
@Value.Default
default VulkanFrontFace frontFace()
{
return VulkanFrontFace.VK_FRONT_FACE_COUNTER_CLOCKWISE;
}
/**
* @return controls whether to bias fragment depth values.
*/
@Value.Parameter
boolean depthBiasEnable();
/**
* @return a scalar factor controlling the constant depth value added to each fragment.
*/
@Value.Parameter
@Value.Default
default float depthBiasConstantFactor()
{
return 0.0f;
}
/**
* @return the maximum (or minimum) depth bias of a fragment.
*/
@Value.Parameter
@Value.Default
default float depthBiasClamp()
{
return 0.0f;
}
/**
* @return a scalar factor applied to a fragment’s slope in depth bias calculations.
*/
@Value.Parameter
@Value.Default
default float depthBiasSlopeFactor()
{
return 0.0f;
}
/**
* @return the width of rasterized line segments.
*/
@Value.Parameter
@Value.Default
default float lineWidth()
{
return 1.0f;
}
}
| [
"code@io7m.com"
] | code@io7m.com |
7216213f055ee5b714216d8e0d8087806618578e | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Time/11/org/joda/time/chrono/LimitChronology_LimitChronology_97.java | c96d7956dc02a3cc533bf44340450445a0355c26 | [] | 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,527 | java |
org joda time chrono
wrap chronolog impos limit rang instant
field chronolog support limit appli
date time field datetimefield durat field durationfield
method date time field datetimefield durat field durationfield illeg argument except illegalargumentexcept
input instant limit
attempt made move instant limit
limit chronolog limitchronolog thread safe immut
author brian neill o'neil
author stephen colebourn
limit chronolog limitchronolog assembl chronolog assembledchronolog
wrap chronolog datetim limit utc withutc
zone withzon call return limit chronolog limitchronolog instanc
limit time zone adjust
param lower limit lowerlimit inclus lower limit
param upper limit upperlimit exclus upper limit
limit chronolog limitchronolog chronolog base
date time datetim lower limit lowerlimit date time datetim upper limit upperlimit
base
set assembl
lower limit ilowerlimit lower limit lowerlimit
upper limit iupperlimit upper limit upperlimit
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
97ec024592fc4038dd1d9b1bdd3a07804a6eeaa4 | 95c49f466673952b465e19a5ee3ae6eff76bee00 | /src/main/java/org/chromium/base/JniStaticTestMocker.java | 0a2193c6846cc48b152838bdc3ac08864e0d7578 | [] | no_license | Phantoms007/zhihuAPK | 58889c399ae56b16a9160a5f48b807e02c87797e | dcdbd103436a187f9c8b4be8f71bdf7813b6d201 | refs/heads/main | 2023-01-24T01:34:18.716323 | 2020-11-25T17:14:55 | 2020-11-25T17:14:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 153 | java | package org.chromium.base;
/* renamed from: org.chromium.base.h */
/* compiled from: JniStaticTestMocker */
public interface JniStaticTestMocker<T> {
}
| [
"seasonpplp@qq.com"
] | seasonpplp@qq.com |
c64d71d65ff9b8f6869a614d7d5136e21878ba27 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/18/18_336d01234b9b74b52734e6e2117ccd32b7da4e89/InstallApplicationUsingRestClientTest/18_336d01234b9b74b52734e6e2117ccd32b7da4e89_InstallApplicationUsingRestClientTest_t.java | 2fe3634d143afc71efc19af19135c707494ca966 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 6,085 | java | package org.cloudifysource.quality.iTests.test.cli.cloudify;
import com.j_spaces.kernel.PlatformVersion;
import iTests.framework.tools.SGTestHelper;
import iTests.framework.utils.AssertUtils;
import iTests.framework.utils.LogUtils;
import org.cloudifysource.dsl.Application;
import org.cloudifysource.dsl.internal.CloudifyConstants;
import org.cloudifysource.dsl.internal.CloudifyConstants.DeploymentState;
import org.cloudifysource.dsl.internal.DSLException;
import org.cloudifysource.dsl.internal.DSLReader;
import org.cloudifysource.dsl.internal.DSLUtils;
import org.cloudifysource.dsl.internal.packaging.Packager;
import org.cloudifysource.dsl.internal.packaging.PackagingException;
import org.cloudifysource.dsl.rest.request.InstallApplicationRequest;
import org.cloudifysource.dsl.rest.response.ApplicationDescription;
import org.cloudifysource.dsl.rest.response.UploadResponse;
import org.cloudifysource.quality.iTests.test.AbstractTestSupport;
import org.cloudifysource.restclient.RestClient;
import org.cloudifysource.restclient.exceptions.RestClientException;
import org.cloudifysource.shell.commands.CLIException;
import org.cloudifysource.shell.rest.RestAdminFacade;
import org.testng.annotations.Test;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.List;
/**
* unstall application on localcloud using the rest API
*
* @author adaml
*
*/
public class InstallApplicationUsingRestClientTest extends AbstractLocalCloudTest {
private static final String APPLICATION_NAME = "simple";
private String APPLICATION_FOLDER_PATH = SGTestHelper.getSGTestRootDir() +
"/src/main/resources/apps/USM/usm/applications/simple";
private static final int INSTALL_TIMEOUT_IN_MINUTES = 15;
private static final int INSTALL_TIMEOUT_MILLIS = INSTALL_TIMEOUT_IN_MINUTES * 60 * 1000;
@Test(timeOut = DEFAULT_TEST_TIMEOUT * 2, groups = "1")
public void testApplicationInstall()
throws IOException, PackagingException,
DSLException, RestClientException, CLIException {
final String version = PlatformVersion.getVersion();
final URL url = new URL(restUrl);
final RestClient client = new RestClient(url, "", "", version);
client.connect();
final File appFolder = new File(APPLICATION_FOLDER_PATH);
final DSLReader dslReader = createDslReader(appFolder);
final Application application = dslReader.readDslEntity(Application.class);
final File packedFile = Packager.packApplication(application, appFolder);
final UploadResponse uploadResponse = client.upload(packedFile.getName(), packedFile);
final String uploadKey = uploadResponse.getUploadKey();
InstallApplicationRequest request = new InstallApplicationRequest();
request.setApplcationFileUploadKey(uploadKey);
//Test will run in unsecured mode.
request.setAuthGroups("");
//no debugging.
request.setDebugAll(false);
request.setSelfHealing(true);
request.setApplicationName(APPLICATION_NAME);
//set timeout
request.setTimeoutInMillis(INSTALL_TIMEOUT_MILLIS);
//make install service API call
client.installApplication(APPLICATION_NAME, request);
//wait for the application to reach STARTED state.
waitForApplicationInstall();
//make un-install service API call
client.uninstallApplication(APPLICATION_NAME, INSTALL_TIMEOUT_IN_MINUTES);
//wait for the application to be removed.
waitForApplicationUninstall();
}
void waitForApplicationInstall()
throws CLIException, RestClientException {
final RestAdminFacade adminFacade = new RestAdminFacade();
adminFacade.connect(null, null, restUrl.toString(), false);
LogUtils.log("Waiting for application deployment state to be " + DeploymentState.STARTED) ;
AssertUtils.repetitiveAssertTrue(APPLICATION_NAME + " application failed to deploy", new AssertUtils.RepetitiveConditionProvider() {
@Override
public boolean getCondition() {
try {
final List<ApplicationDescription> applicationDescriptionsList = adminFacade.getApplicationDescriptionsList();
for (ApplicationDescription applicationDescription : applicationDescriptionsList) {
if (applicationDescription.getApplicationName().equals(APPLICATION_NAME)) {
if (applicationDescription.getApplicationState().equals(DeploymentState.STARTED)) {
return true;
}
}
}
} catch (final CLIException e) {
LogUtils.log("Failed reading application description : " + e.getMessage());
}
return false;
}
} , AbstractTestSupport.OPERATION_TIMEOUT * 3);
}
void waitForApplicationUninstall()
throws CLIException, RestClientException {
final RestAdminFacade adminFacade = new RestAdminFacade();
adminFacade.connect(null, null, restUrl.toString(), false);
LogUtils.log("Waiting for USM_State to be " + CloudifyConstants.USMState.RUNNING);
AssertUtils.repetitiveAssertTrue("uninstall failed for application " + APPLICATION_NAME, new AssertUtils.RepetitiveConditionProvider() {
@Override
public boolean getCondition() {
try {
final List<ApplicationDescription> applicationDescriptionsList = adminFacade.getApplicationDescriptionsList();
for (ApplicationDescription applicationDescription : applicationDescriptionsList) {
if (applicationDescription.getApplicationName().equals(APPLICATION_NAME)) {
return false;
}
}
return true;
} catch (final CLIException e) {
LogUtils.log("Failed getting application list.");
}
return false;
}
} , AbstractTestSupport.OPERATION_TIMEOUT * 3);
}
private DSLReader createDslReader(final File applicationFile) {
final DSLReader dslReader = new DSLReader();
final File dslFile = DSLReader.findDefaultDSLFile(DSLUtils.APPLICATION_DSL_FILE_NAME_SUFFIX, applicationFile);
dslReader.setDslFile(dslFile);
dslReader.setCreateServiceContext(false);
dslReader.addProperty(DSLUtils.APPLICATION_DIR, dslFile.getParentFile().getAbsolutePath());
return dslReader;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
c7d06302551f03d34b50d4ce232a5a4934a771a8 | 35559cc0d6962fde2d67618aae41a8ba1e8dcd43 | /②JAVA基础/02班11月23号作业/四组/1702_李静静/Abstract/src/com/zk/qhit/statictest/Palindrome.java | 3294bd691d8b0f3b5f721a9e8e91fab008b80a93 | [] | no_license | qhit2017/GR1702_01 | bc9190243fc24db4d19e5ee0daff003f9eaeb2d8 | 8e1fc9157ef183066c522e1025c97efeabe6329a | refs/heads/master | 2021-09-03T16:27:00.789831 | 2018-01-10T11:08:27 | 2018-01-10T11:08:27 | 109,151,555 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 591 | java | package com.zk.qhit.statictest;
import java.util.Scanner;
/**
*@author 作者 E-mail:996939518@qq.com
* @date 创建时间:2017年11月21日 下午4:47:21
* @version 1.0
* @parameter
* @since
* @return
* @function
*/
public class Palindrome {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("请输入一个五位数");
int a = sc.nextInt();
if (a%10==a/10000&&a%10000/1000==a%100/10) {
System.out.println(a+"是一个回文数");
} else {
System.out.println(a+"不是一个回文数");
}
}
}
| [
"hudi@qq.com"
] | hudi@qq.com |
669cf699fea6b5f3055ff534754629c4a328ad48 | 0cde13c6d7de13149aa10f5589d32a49a499deaf | /clients/java/jersey/src/main/java/com/wordnik/client/api/InstrumentApi.java | ef4a3b3679280d3fa30ba72da4856cef5bdf52fc | [] | no_license | Hasimir/api-connectors | da938a26146c1b1d13b7f598d1e9e1636236edb1 | 6a6a6f0a6940e8206981cc332f24109d6a13748a | refs/heads/master | 2023-04-09T15:05:08.223598 | 2015-05-28T00:07:43 | 2015-05-28T00:07:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,779 | java | package com.wordnik.client.api;
import com.wordnik.client.common.ApiException;
import com.wordnik.client.common.ApiInvoker;
import com.wordnik.client.model.Instrument;
import com.sun.jersey.multipart.FormDataMultiPart;
import javax.ws.rs.core.MediaType;
import java.io.File;
import java.util.*;
public class InstrumentApi {
String basePath = "https://www.bitmex.com/api/v1";
ApiInvoker apiInvoker = ApiInvoker.getInstance();
public ApiInvoker getInvoker() {
return apiInvoker;
}
public void setBasePath(String basePath) {
this.basePath = basePath;
}
public String getBasePath() {
return basePath;
}
/*
* error info- code: 200 reason: "Request was successful" model: <none>
* error info- code: 400 reason: "Parameter Error" model: <none>
* error info- code: 401 reason: "Unauthorized" model: <none>
* error info- code: 404 reason: "Not Found" model: <none>
*/
public List<Instrument> get (Object filter) throws ApiException {
Object postBody = null;
// create path and map variables
String path = "/instrument".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
Map<String, String> formParams = new HashMap<String, String>();
if(!"null".equals(String.valueOf(filter)))
queryParams.put("filter", String.valueOf(filter));
String[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType);
if(response != null){
return (List<Instrument>) ApiInvoker.deserialize(response, "List", Instrument.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
/*
* error info- code: 200 reason: "Request was successful" model: <none>
* error info- code: 400 reason: "Parameter Error" model: <none>
* error info- code: 401 reason: "Unauthorized" model: <none>
* error info- code: 404 reason: "Not Found" model: <none>
*/
public List<Instrument> getActive () throws ApiException {
Object postBody = null;
// create path and map variables
String path = "/instrument/active".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType);
if(response != null){
return (List<Instrument>) ApiInvoker.deserialize(response, "List", Instrument.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
}
| [
"samuel.trace.reed@gmail.com"
] | samuel.trace.reed@gmail.com |
eab2dbf4117f1558ccd7844cefca70f767901c3e | 343c79e2c638fe5b4ef14de39d885bc5e1e6aca5 | /MyApplication/app/src/main/java/cmcm/com/myapplication/aao.java | cc9105067002f51031af031f40d7a6fe87fc1f83 | [] | no_license | Leonilobayang/AndroidDemos | 05a76647b8e27582fa56e2e15d4195c2ff9b9c32 | 6ac06c3752dfa9cebe81f7c796525a17df620663 | refs/heads/master | 2022-04-17T06:56:52.912639 | 2016-07-01T07:48:50 | 2016-07-01T07:48:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,875 | java | package cmcm.com.myapplication;
import android.content.Context;
import com.lazyswipe.SwipeApplication;
import java.util.List;
public abstract class aao
{
protected static final String a = "Swipe." + aao.class.getSimpleName();
protected List<yw> b;
public static final int b(Context paramContext)
{
if (ahy.d(paramContext))
return 13;
return 9;
}
public abstract String a(Context paramContext);
public yw a(int paramInt)
{
if ((this.b == null) || (paramInt < 0) || (paramInt >= this.b.size()))
return null;
return (yw)this.b.get(paramInt);
}
public abstract void a(SwipeApplication paramSwipeApplication);
public void a(SwipeApplication paramSwipeApplication, boolean paramBoolean)
{
if (paramBoolean)
g();
a(paramSwipeApplication);
}
public void a(List<yw> paramList, int paramInt1, int paramInt2, xy paramxy)
{
if (paramList == null)
return;
this.b.clear();
this.b.addAll(paramList);
}
protected void a(yw paramyw)
{
}
public boolean a(Context paramContext, yb paramyb)
{
paramyb = paramyb.getCurrentTab().b();
if (b().equals(paramyb))
return false;
vy.a(paramContext, "B08", String.valueOf(c()));
try
{
vs.g(paramContext, b());
return true;
}
catch (Exception paramContext)
{
while (true)
asq.b(paramContext, 5, a, "onEnter");
}
}
public int b(yw paramyw)
{
if (this.b != null)
return this.b.indexOf(paramyw);
return -1;
}
public abstract String b();
public boolean b_()
{
return this.b == null;
}
public int c()
{
return 0;
}
public int c(yw paramyw)
{
int i = b(paramyw);
if (i < 0)
return i;
a(paramyw);
this.b.remove(i);
return i;
}
public List<yw> c(Context paramContext)
{
paramContext = (SwipeApplication)paramContext.getApplicationContext();
if (this.b == null)
{
auu.a("Started loading icons for tab " + toString());
a(paramContext);
auu.a("Finished loading icons");
}
return this.b;
}
public boolean d()
{
return true;
}
public boolean e()
{
return true;
}
public boolean equals(Object paramObject)
{
if ((paramObject == null) || (!(paramObject instanceof aao)))
return false;
paramObject = (aao)paramObject;
return b().equals(paramObject.b());
}
public void g()
{
if (this.b != null)
{
this.b.clear();
this.b = null;
}
}
public boolean h()
{
return false;
}
public int hashCode()
{
return b().hashCode();
}
public int i()
{
if (this.b == null)
return 0;
return this.b.size();
}
public String toString()
{
return b();
}
}
/* Location: classes-dex2jar.jar
* Qualified Name: aao
* JD-Core Version: 0.6.2
*/ | [
"1004410930@qq.com"
] | 1004410930@qq.com |
ed11db524cf0bc7bc7658d6c499a6bc8d814953d | fec4c1754adce762b5c4b1cba85ad057e0e4744a | /jf-base/src/main/java/com/jf/entity/LandingPage.java | d1ba860b7654a073b1cd2c8944d024b47ee38b5f | [] | no_license | sengeiou/workspace_xg | 140b923bd301ff72ca4ae41bc83820123b2a822e | 540a44d550bb33da9980d491d5c3fd0a26e3107d | refs/heads/master | 2022-11-30T05:28:35.447286 | 2020-08-19T02:30:25 | 2020-08-19T02:30:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,978 | java | package com.jf.entity;
import java.util.Date;
public class LandingPage {
private Integer id;
private String name;
private String androidChannel;
private Integer iosActivityGroupId;
private String iosActivityName;
private String editorRecommend;
private String applicationInformation;
private Integer createBy;
private Date createDate;
private Integer updateBy;
private Date updateDate;
private String remarks;
private String delFlag;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public String getAndroidChannel() {
return androidChannel;
}
public void setAndroidChannel(String androidChannel) {
this.androidChannel = androidChannel == null ? null : androidChannel.trim();
}
public Integer getIosActivityGroupId() {
return iosActivityGroupId;
}
public void setIosActivityGroupId(Integer iosActivityGroupId) {
this.iosActivityGroupId = iosActivityGroupId;
}
public String getIosActivityName() {
return iosActivityName;
}
public void setIosActivityName(String iosActivityName) {
this.iosActivityName = iosActivityName == null ? null : iosActivityName.trim();
}
public String getEditorRecommend() {
return editorRecommend;
}
public void setEditorRecommend(String editorRecommend) {
this.editorRecommend = editorRecommend == null ? null : editorRecommend.trim();
}
public String getApplicationInformation() {
return applicationInformation;
}
public void setApplicationInformation(String applicationInformation) {
this.applicationInformation = applicationInformation == null ? null : applicationInformation.trim();
}
public Integer getCreateBy() {
return createBy;
}
public void setCreateBy(Integer createBy) {
this.createBy = createBy;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Integer getUpdateBy() {
return updateBy;
}
public void setUpdateBy(Integer updateBy) {
this.updateBy = updateBy;
}
public Date getUpdateDate() {
return updateDate;
}
public void setUpdateDate(Date updateDate) {
this.updateDate = updateDate;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks == null ? null : remarks.trim();
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag == null ? null : delFlag.trim();
}
} | [
"397716215@qq.com"
] | 397716215@qq.com |
3f89885dc70eea7ddd4a3e5c2152bd9a645f335c | abe5d4b95fede40563400d05833e773855322af3 | /src/main/java/com/vuhien/application/controller/admin/ImageController.java | ba002d327da7a88b5b23605cfd022b1b587dec36 | [] | no_license | 01662024622/shoes | 63ddd322069ef70de26345f09745729927605306 | 975b4cc60bfbddc1c4c32c530700051074887e52 | refs/heads/master | 2023-08-24T03:18:20.416787 | 2021-10-25T15:24:10 | 2021-10-25T15:24:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,233 | java | package com.vuhien.application.controller.admin;
import com.vuhien.application.entity.Image;
import com.vuhien.application.exception.BadRequestException;
import com.vuhien.application.exception.InternalServerException;
import com.vuhien.application.exception.NotFoundException;
import com.vuhien.application.security.CustomUserDetails;
import com.vuhien.application.service.ImageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.UrlResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.net.MalformedURLException;
import java.sql.Timestamp;
import java.util.UUID;
@RestController
public class ImageController {
private static String UPLOAD_DIR = System.getProperty("user.home") + "/media/upload";
@Autowired
private ImageService imageService;
@PostMapping("/api/upload/files")
public ResponseEntity<Object> uploadFile(@RequestParam("file") MultipartFile file) {
//Tạo thư mục chứa ảnh nếu không tồn tại
File uploadDir = new File(UPLOAD_DIR);
if (!uploadDir.exists()) {
uploadDir.mkdirs();
}
//Lấy tên file và đuôi mở rộng của file
String originalFilename = file.getOriginalFilename();
String extension = originalFilename.substring(originalFilename.lastIndexOf(".") + 1);
if (originalFilename.length() > 0) {
//Kiểm tra xem file có đúng định dạng không
if (!extension.equals("png") && !extension.equals("jpg") && !extension.equals("gif") && !extension.equals("svg") && !extension.equals("jpeg")) {
throw new BadRequestException("Không hỗ trợ định dạng file này!");
}
try {
Image image = new Image();
image.setId(UUID.randomUUID().toString());
image.setName(file.getName());
image.setSize(file.getSize());
image.setType(extension);
String link = "/media/static/" + image.getId() + "." + extension;
image.setLink(link);
image.setCreatedAt(new Timestamp(System.currentTimeMillis()));
image.setCreatedBy(((CustomUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getUser());
//Tạo file
File serveFile = new File(UPLOAD_DIR + "/" + image.getId() + "." + extension);
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(serveFile));
bos.write(file.getBytes());
bos.close();
imageService.saveImage(image);
return ResponseEntity.ok(link);
} catch (Exception e) {
throw new InternalServerException("Có lỗi trong quá trình upload file!");
}
}
throw new BadRequestException("File không hợp lệ!");
}
@GetMapping("/media/static/{filename:.+}")
public ResponseEntity<Object> downloadFile(@PathVariable String filename) {
File file = new File(UPLOAD_DIR + "/" + filename);
if (!file.exists()) {
throw new NotFoundException("File không tồn tại!");
}
UrlResource resource;
try {
resource = new UrlResource(file.toURI());
} catch (MalformedURLException ex) {
throw new NotFoundException("File không tồn tại!");
}
return ResponseEntity.ok()
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + file.getName() + "\"")
.body(resource);
}
@DeleteMapping("/api/delete-image/{filename:.+}")
public ResponseEntity<Object> deleteImage(@PathVariable String filename){
imageService.deleteImage(UPLOAD_DIR,filename);
return ResponseEntity.ok("Xóa file thành công!");
}
}
| [
"you@example.com"
] | you@example.com |
dc32bd1c9066ecb129e755b5449e37e6319d908b | 878dad757577ca28fe0340a45e2abf3c9a45f385 | /drift-transport-apache/src/main/java/io/airlift/drift/transport/apache/ThriftToDriftProtocolWriter.java | 96d9a2c1b145a3c9acd1091e8e975f907a2e5f0e | [
"Apache-2.0"
] | permissive | AppSecAI-TEST/drift | a67926ce0b67888b9b1c0a27845c5c8103a1b6c0 | 79f0e08b83cc68151f2c34817c0c429280aae4e7 | refs/heads/master | 2021-01-16T11:39:42.264693 | 2017-07-16T17:46:43 | 2017-08-11T06:29:06 | 100,000,948 | 0 | 0 | null | 2017-08-11T06:51:26 | 2017-08-11T06:51:26 | null | UTF-8 | Java | false | false | 7,173 | java | /*
* Copyright (C) 2012 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.airlift.drift.transport.apache;
import io.airlift.drift.TException;
import io.airlift.drift.protocol.TField;
import io.airlift.drift.protocol.TList;
import io.airlift.drift.protocol.TMap;
import io.airlift.drift.protocol.TMessage;
import io.airlift.drift.protocol.TProtocolWriter;
import io.airlift.drift.protocol.TSet;
import io.airlift.drift.protocol.TStruct;
import org.apache.thrift.protocol.TProtocol;
import java.nio.ByteBuffer;
import static java.util.Objects.requireNonNull;
public class ThriftToDriftProtocolWriter
implements TProtocolWriter
{
private final TProtocol protocol;
public ThriftToDriftProtocolWriter(TProtocol protocol)
{
this.protocol = requireNonNull(protocol, "protocol is null");
}
@Override
public void writeMessageBegin(TMessage message)
throws TException
{
try {
protocol.writeMessageBegin(new org.apache.thrift.protocol.TMessage(message.getName(), message.getType(), message.getSequenceId()));
}
catch (org.apache.thrift.TException e) {
throw new TException(e);
}
}
@Override
public void writeMessageEnd()
throws TException
{
try {
protocol.writeMessageEnd();
}
catch (org.apache.thrift.TException e) {
throw new TException(e);
}
}
@Override
public void writeStructBegin(TStruct struct)
throws TException
{
try {
protocol.writeStructBegin(new org.apache.thrift.protocol.TStruct(struct.getName()));
}
catch (org.apache.thrift.TException e) {
throw new TException(e);
}
}
@Override
public void writeStructEnd()
throws TException
{
try {
protocol.writeStructEnd();
}
catch (org.apache.thrift.TException e) {
throw new TException(e);
}
}
@Override
public void writeFieldBegin(TField field)
throws TException
{
try {
protocol.writeFieldBegin(new org.apache.thrift.protocol.TField(field.getName(), field.getType(), field.getId()));
}
catch (org.apache.thrift.TException e) {
throw new TException(e);
}
}
@Override
public void writeFieldEnd()
throws TException
{
try {
protocol.writeFieldEnd();
}
catch (org.apache.thrift.TException e) {
throw new TException(e);
}
}
@Override
public void writeFieldStop()
throws TException
{
try {
protocol.writeFieldStop();
}
catch (org.apache.thrift.TException e) {
throw new TException(e);
}
}
@Override
public void writeMapBegin(TMap map)
throws TException
{
try {
protocol.writeMapBegin(new org.apache.thrift.protocol.TMap(map.getKeyType(), map.getValueType(), map.getSize()));
}
catch (org.apache.thrift.TException e) {
throw new TException(e);
}
}
@Override
public void writeMapEnd()
throws TException
{
try {
protocol.writeMapEnd();
}
catch (org.apache.thrift.TException e) {
throw new TException(e);
}
}
@Override
public void writeListBegin(TList list)
throws TException
{
try {
protocol.writeListBegin(new org.apache.thrift.protocol.TList(list.getType(), list.getSize()));
}
catch (org.apache.thrift.TException e) {
throw new TException(e);
}
}
@Override
public void writeListEnd()
throws TException
{
try {
protocol.writeListEnd();
}
catch (org.apache.thrift.TException e) {
throw new TException(e);
}
}
@Override
public void writeSetBegin(TSet set)
throws TException
{
try {
protocol.writeSetBegin(new org.apache.thrift.protocol.TSet(set.getType(), set.getSize()));
}
catch (org.apache.thrift.TException e) {
throw new TException(e);
}
}
@Override
public void writeSetEnd()
throws TException
{
try {
protocol.writeSetEnd();
}
catch (org.apache.thrift.TException e) {
throw new TException(e);
}
}
@Override
public void writeBool(boolean value)
throws TException
{
try {
protocol.writeBool(value);
}
catch (org.apache.thrift.TException e) {
throw new TException(e);
}
}
@Override
public void writeByte(byte value)
throws TException
{
try {
protocol.writeByte(value);
}
catch (org.apache.thrift.TException e) {
throw new TException(e);
}
}
@Override
public void writeI16(short value)
throws TException
{
try {
protocol.writeI16(value);
}
catch (org.apache.thrift.TException e) {
throw new TException(e);
}
}
@Override
public void writeI32(int value)
throws TException
{
try {
protocol.writeI32(value);
}
catch (org.apache.thrift.TException e) {
throw new TException(e);
}
}
@Override
public void writeI64(long value)
throws TException
{
try {
protocol.writeI64(value);
}
catch (org.apache.thrift.TException e) {
throw new TException(e);
}
}
@Override
public void writeDouble(double value)
throws TException
{
try {
protocol.writeDouble(value);
}
catch (org.apache.thrift.TException e) {
throw new TException(e);
}
}
@Override
public void writeString(String value)
throws TException
{
try {
protocol.writeString(value);
}
catch (org.apache.thrift.TException e) {
throw new TException(e);
}
}
@Override
public void writeBinary(ByteBuffer value)
throws TException
{
try {
protocol.writeBinary(value);
}
catch (org.apache.thrift.TException e) {
throw new TException(e);
}
}
}
| [
"david@acz.org"
] | david@acz.org |
22d322d9d25e043c0dd840ce255a37e43f36e59f | b7f3edb5b7c62174bed808079c3b21fb9ea51d52 | /chrome/android/java/src/org/chromium/chrome/browser/modules/ModuleInstallUi.java | bb70ca75d57f0aff03888c4ac0d9605f0193362b | [
"BSD-3-Clause"
] | permissive | otcshare/chromium-src | 26a7372773b53b236784c51677c566dc0ad839e4 | 64bee65c921db7e78e25d08f1e98da2668b57be5 | refs/heads/webml | 2023-03-21T03:20:15.377034 | 2020-11-16T01:40:14 | 2020-11-16T01:40:14 | 209,262,645 | 18 | 21 | BSD-3-Clause | 2023-03-23T06:20:07 | 2019-09-18T08:52:07 | null | UTF-8 | Java | false | false | 4,736 | java | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.modules;
import android.content.Context;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.infobar.InfoBarIdentifier;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tab.TabUtils;
import org.chromium.chrome.browser.ui.messages.infobar.SimpleConfirmInfoBarBuilder;
import org.chromium.ui.widget.Toast;
/**
* UI informing the user about the status of installing a dynamic feature module. The UI consists of
* toast for install start and success UI and an infobar in the failure case.
*/
public class ModuleInstallUi {
private final Tab mTab;
private final int mModuleTitleStringId;
private final FailureUiListener mFailureUiListener;
private Toast mInstallStartToast;
/** Listener for when the user interacts with the install failure UI. */
public interface FailureUiListener {
/**
* Called when the user makes a decision to handle the failure, either to retry installing
* the module or to cancel installing the module by dismissing the UI.
* @param retry Whether user decides to retry installing the module.
*/
void onFailureUiResponse(boolean retry);
}
/*
* Creates new UI.
*
* @param tab Tab in whose context to show the UI.
* @param moduleTitleStringId String resource ID of the module title
* @param failureUiListener Listener for when the user interacts with the install failure UI.
*/
public ModuleInstallUi(Tab tab, int moduleTitleStringId, FailureUiListener failureUiListener) {
mTab = tab;
mModuleTitleStringId = moduleTitleStringId;
mFailureUiListener = failureUiListener;
}
/** Show UI indicating the start of a module install. */
public void showInstallStartUi() {
Context context = TabUtils.getActivity(mTab);
if (context == null) {
// Tab is detached. Don't show UI.
return;
}
mInstallStartToast = Toast.makeText(context,
context.getString(R.string.module_install_start_text,
context.getString(mModuleTitleStringId)),
Toast.LENGTH_SHORT);
mInstallStartToast.show();
}
/** Show UI indicating the success of a module install. */
public void showInstallSuccessUi() {
if (mInstallStartToast != null) {
mInstallStartToast.cancel();
mInstallStartToast = null;
}
Context context = TabUtils.getActivity(mTab);
if (context == null) {
// Tab is detached. Don't show UI.
return;
}
Toast.makeText(context, R.string.module_install_success_text, Toast.LENGTH_SHORT).show();
}
/**
* Show UI indicating the failure of a module install. Upon interaction with the UI the
* |failureUiListener| will be invoked.
*/
public void showInstallFailureUi() {
if (mInstallStartToast != null) {
mInstallStartToast.cancel();
mInstallStartToast = null;
}
Context context = TabUtils.getActivity(mTab);
if (context == null) {
// Tab is detached. Cancel.
if (mFailureUiListener != null) mFailureUiListener.onFailureUiResponse(false);
return;
}
SimpleConfirmInfoBarBuilder.Listener listener = new SimpleConfirmInfoBarBuilder.Listener() {
@Override
public void onInfoBarDismissed() {
if (mFailureUiListener != null) mFailureUiListener.onFailureUiResponse(false);
}
@Override
public boolean onInfoBarButtonClicked(boolean isPrimary) {
if (mFailureUiListener != null) {
mFailureUiListener.onFailureUiResponse(isPrimary);
}
return false;
}
@Override
public boolean onInfoBarLinkClicked() {
return false;
}
};
String text = String.format(context.getString(R.string.module_install_failure_text),
context.getResources().getString(mModuleTitleStringId));
SimpleConfirmInfoBarBuilder.create(mTab.getWebContents(), listener,
InfoBarIdentifier.MODULE_INSTALL_FAILURE_INFOBAR_ANDROID, context,
R.drawable.ic_error_outline_googblue_24dp, text,
context.getString(R.string.try_again), context.getString(R.string.cancel),
/* linkText = */ null, /* autoExpire = */ true);
}
}
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
b9ee5e8fc0f1ca6996ddd3ad45f8ad01a948d112 | 6a9d8120fde2093a1f578f5835a42612c489772c | /c/deepa2/SUREKHA/JDBC/database5.java | b37b14a47b997dfcd6d87b51d2b4abd6d1dc1591 | [] | no_license | nileshkadam222/C-AND-CPP | 53b1dc64b8c8ab7c880ad95b5be2cd8f5f92d458 | 468b18ad81aa23865b2744eb0c35e890bf96b6d8 | refs/heads/master | 2020-11-27T16:29:39.220664 | 2019-12-22T06:46:33 | 2019-12-22T06:46:33 | 229,528,475 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 690 | java | import java.sql.*;
public class database5{
public static void main(String[] args) {
System.out.println
("Example for Deleting All Rows from a database Table!");
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:mydatasource");
//"sa","psurekha11");
try{
Statement st = con.createStatement();
String sql = "DELETE FROM employee12";
int delete = st.executeUpdate(sql);
if(delete == 0){
System.out.println("All rows are completelly deleted!");
}
}
catch(SQLException s){
System.out.println("SQL statement is not executed!");
}
}
catch (Exception e){
e.printStackTrace();
}
}
}
| [
"nilesh.kadam222@gmail.com"
] | nilesh.kadam222@gmail.com |
06af96d68bdf2d3a7f15c53295bddabea8f57464 | f018e858ee3c5e9b525786586fbd1e19881e1e2b | /dart/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/code/ExtractMethodAnalyzer.java | ba929f3df57cd805d55e1b9a7a8ca73bb2fe1971 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | butlermatt/bleeding_edge | c6410523a76cd7e5ceba088bbb1833a01369b735 | e4e2f987a3c4cb8ef42fa5acb5d7f41cb2636208 | refs/heads/master | 2020-04-08T20:36:15.006703 | 2012-08-31T22:40:21 | 2012-08-31T22:53:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,154 | java | /*
* Copyright (c) 2012, the Dart project authors.
*
* Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.eclipse.org/legal/epl-v10.html
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.dart.tools.internal.corext.refactoring.code;
import com.google.dart.compiler.ast.DartBinaryExpression;
import com.google.dart.compiler.ast.DartExpression;
import com.google.dart.compiler.ast.DartForStatement;
import com.google.dart.compiler.ast.DartIdentifier;
import com.google.dart.compiler.ast.DartInitializer;
import com.google.dart.compiler.ast.DartNode;
import com.google.dart.compiler.ast.DartTypeNode;
import com.google.dart.compiler.ast.DartVariable;
import com.google.dart.compiler.resolver.ElementKind;
import com.google.dart.compiler.resolver.Elements;
import com.google.dart.tools.core.dom.PropertyDescriptorHelper;
import com.google.dart.tools.core.model.CompilationUnit;
import com.google.dart.tools.internal.corext.dom.ASTNodes;
import com.google.dart.tools.internal.corext.refactoring.RefactoringCoreMessages;
import com.google.dart.tools.internal.corext.refactoring.base.DartStatusContext;
import com.google.dart.tools.ui.internal.text.Selection;
import com.google.dart.tools.ui.internal.text.SelectionAnalyzer;
import org.eclipse.core.runtime.CoreException;
/**
* {@link SelectionAnalyzer} for "Extract Method" refactoring.
*
* @coverage dart.editor.ui.refactoring.core
*/
public class ExtractMethodAnalyzer extends StatementAnalyzer {
public ExtractMethodAnalyzer(CompilationUnit unit, Selection selection) throws CoreException {
super(unit, selection, false);
}
@Override
public Void visitBinaryExpression(DartBinaryExpression node) {
super.visitBinaryExpression(node);
DartExpression lhs = node.getArg1();
if (isFirstSelectedNode(lhs) && Elements.inSetterContext(lhs)) {
invalidSelection(
RefactoringCoreMessages.ExtractMethodAnalyzer_leftHandSideOfAssignment,
DartStatusContext.create(fCUnit, node));
}
return null;
}
@Override
public Void visitExpression(DartExpression node) {
super.visitExpression(node);
// "name" part of qualified name
if (isFirstSelectedNode(node)
&& PropertyDescriptorHelper.getLocationInParent(node) == PropertyDescriptorHelper.DART_PROPERTY_ACCESS_NAME) {
invalidSelection(
RefactoringCoreMessages.ExtractMethodAnalyzer_cannot_extract_part_of_qualified_name,
DartStatusContext.create(fCUnit, getSelection()));
}
return null;
}
@Override
public Void visitForStatement(DartForStatement node) {
super.visitForStatement(node);
if (getSelection().getEndVisitSelectionMode(node) == Selection.AFTER) {
if (node.getInit() == getFirstSelectedNode()) {
invalidSelection(
RefactoringCoreMessages.ExtractMethodAnalyzer_cannot_extract_for_initializer,
DartStatusContext.create(fCUnit, getSelection()));
} else if (node.getIncrement() == getLastSelectedNode()) {
invalidSelection(
RefactoringCoreMessages.ExtractMethodAnalyzer_cannot_extract_for_updater,
DartStatusContext.create(fCUnit, getSelection()));
}
}
return null;
}
@Override
public Void visitIdentifier(DartIdentifier node) {
super.visitIdentifier(node);
if (isFirstSelectedNode(node)) {
// name of declaration
if (ASTNodes.isNameOfDeclaration(node)) {
invalidSelection(
RefactoringCoreMessages.ExtractMethodAnalyzer_cannot_extract_name_in_declaration,
DartStatusContext.create(fCUnit, getSelection()));
}
// method reference name
if (ElementKind.of(node.getElement()) == ElementKind.METHOD) {
invalidSelection(
RefactoringCoreMessages.ExtractMethodAnalyzer_cannot_extract_method_name_reference,
DartStatusContext.create(fCUnit, getSelection()));
}
}
return null;
}
@Override
public Void visitInitializer(DartInitializer node) {
super.visitInitializer(node);
if (isFirstSelectedNode(node)) {
invalidSelection(
RefactoringCoreMessages.ExtractMethodAnalyzer_cannot_extract_initializer,
DartStatusContext.create(fCUnit, node));
}
return null;
}
@Override
public Void visitTypeNode(DartTypeNode node) {
super.visitTypeNode(node);
if (isFirstSelectedNode(node)) {
invalidSelection(
RefactoringCoreMessages.ExtractMethodAnalyzer_cannot_extract_type_reference,
DartStatusContext.create(fCUnit, getSelection()));
}
return null;
}
@Override
public Void visitVariable(DartVariable node) {
super.visitVariable(node);
if (isFirstSelectedNode(node)) {
invalidSelection(
RefactoringCoreMessages.ExtractMethodAnalyzer_cannot_extract_variable_declaration_fragment,
DartStatusContext.create(fCUnit, node));
}
return null;
}
@Override
protected void handleNextSelectedNode(DartNode node) {
super.handleNextSelectedNode(node);
checkParent(node);
}
@Override
protected boolean handleSelectionEndsIn(DartNode node) {
invalidSelection(
RefactoringCoreMessages.StatementAnalyzer_doesNotCover,
DartStatusContext.create(fCUnit, node));
return super.handleSelectionEndsIn(node);
}
private void checkParent(DartNode node) {
DartNode firstParent = getFirstSelectedNode().getParent();
do {
node = node.getParent();
if (node == firstParent) {
return;
}
} while (node != null);
invalidSelection(RefactoringCoreMessages.ExtractMethodAnalyzer_parent_mismatch);
}
private boolean isFirstSelectedNode(DartNode node) {
return getFirstSelectedNode() == node;
}
}
| [
"scheglov@google.com@260f80e4-7a28-3924-810f-c04153c831b5"
] | scheglov@google.com@260f80e4-7a28-3924-810f-c04153c831b5 |
60dec91e00bd5da6fa1f4ddc287cd3f1ad22ad48 | 002d0c1d6ae456bbd635a739b1f41bc60d8927a9 | /src/compiler/dyvil/tools/compiler/ast/type/raw/NamedType.java | 81d15666eb61d953310e3cf9f7448f9eaf528bac | [
"BSD-3-Clause"
] | permissive | hanyuone/Dyvil | ab3b90e30e449a8e6a41db7e203d417a809b7d76 | cbfe4e545967c915a8fc2b580be59aec65d1826f | refs/heads/master | 2021-06-15T05:33:32.400820 | 2017-03-19T20:57:00 | 2017-03-19T21:02:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,056 | java | package dyvil.tools.compiler.ast.type.raw;
import dyvil.tools.compiler.ast.classes.IClass;
import dyvil.tools.compiler.ast.consumer.ITypeConsumer;
import dyvil.tools.compiler.ast.context.IContext;
import dyvil.tools.compiler.ast.generic.ITypeContext;
import dyvil.tools.compiler.ast.generic.ITypeParameter;
import dyvil.tools.compiler.ast.structure.Package;
import dyvil.tools.compiler.ast.type.IType;
import dyvil.tools.compiler.ast.type.alias.ITypeAlias;
import dyvil.tools.compiler.ast.type.builtin.Types;
import dyvil.tools.compiler.ast.type.typevar.ResolvedTypeVarType;
import dyvil.tools.compiler.util.Markers;
import dyvil.tools.parsing.Name;
import dyvil.tools.parsing.marker.MarkerList;
import dyvil.tools.parsing.position.ICodePosition;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
public class NamedType implements IUnresolvedType, ITypeConsumer
{
protected IType parent;
protected ICodePosition position;
protected Name name;
public NamedType()
{
}
public NamedType(ICodePosition position, Name name)
{
this.position = position;
this.name = name;
}
public NamedType(ICodePosition position, Name name, IType parent)
{
this.position = position;
this.name = name;
this.parent = parent;
}
@Override
public int typeTag()
{
return NAMED;
}
@Override
public ICodePosition getPosition()
{
return this.position;
}
@Override
public void setPosition(ICodePosition position)
{
this.position = position;
}
@Override
public Name getName()
{
return this.name;
}
public IType getParent()
{
return this.parent;
}
public void setParent(IType parent)
{
this.parent = parent;
}
@Override
public void setType(IType type)
{
this.parent = type;
}
@Override
public IClass getTheClass()
{
return null;
}
@Override
public IType resolveType(MarkerList markers, IContext context)
{
if (this.parent == null)
{
return this.resolveTopLevel(markers, context);
}
this.parent = this.parent.resolveType(markers, context);
if (!this.parent.isResolved())
{
return this;
}
return this.resolveWithParent(markers);
}
private IType resolveWithParent(MarkerList markers)
{
final IClass theClass = this.parent.resolveClass(this.name);
if (theClass != null)
{
return new ResolvedClassType(theClass, this.position);
}
final Package thePackage = this.parent.resolvePackage(this.name);
if (thePackage != null)
{
return new PackageType(thePackage).atPosition(this.position);
}
if (markers == null)
{
// FieldAccess support
return null;
}
markers.add(Markers.semanticError(this.position, "resolve.type.package", this.name, this.parent));
return this;
}
private IType resolveTopLevel(MarkerList markers, IContext context)
{
final IType primitive = Types.resolvePrimitive(this.name);
if (primitive != null)
{
return primitive.atPosition(this.position);
}
IType type = this.resolveTopLevelWith(markers, context);
if (type != null)
{
return type;
}
type = this.resolveTopLevelWith(markers, Types.BASE_CONTEXT);
if (type != null)
{
return type;
}
if (markers == null)
{
// FieldAccess support
return null;
}
markers.add(Markers.semanticError(this.position, "resolve.type", this.name));
return this;
}
private IType resolveTopLevelWith(@SuppressWarnings("UnusedParameters") MarkerList markers, IContext context)
{
final IClass theClass = context.resolveClass(this.name);
if (theClass != null)
{
return new ResolvedClassType(theClass, this.position);
}
final ITypeParameter typeParameter = context.resolveTypeParameter(this.name);
if (typeParameter != null)
{
return new ResolvedTypeVarType(typeParameter, this.position);
}
final ITypeAlias type = context.resolveTypeAlias(this.name, 0);
if (type != null)
{
final IType aliasType = type.getType();
if (!aliasType.isResolved() && markers != null)
{
markers.add(Markers.semanticError(this.position, "type.alias.unresolved", this.name));
return aliasType.atPosition(this.position);
}
return aliasType.getConcreteType(ITypeContext.DEFAULT).atPosition(this.position);
}
final Package thePackage = context.resolvePackage(this.name);
if (thePackage != null)
{
return new PackageType(thePackage).atPosition(this.position);
}
return null;
}
@Override
public void checkType(MarkerList markers, IContext context, int position)
{
}
@Override
public void write(DataOutput out) throws IOException
{
out.writeUTF(this.name.qualified);
}
@Override
public void read(DataInput in) throws IOException
{
this.name = Name.fromRaw(in.readUTF());
}
@Override
public String toString()
{
if (this.parent != null)
{
return this.parent.toString() + '.' + this.name;
}
return this.name.toString();
}
@Override
public void toString(String prefix, StringBuilder buffer)
{
if (this.parent != null)
{
this.parent.toString(prefix, buffer);
buffer.append('.');
}
buffer.append(this.name);
}
}
| [
"clashsoft@hotmail.com"
] | clashsoft@hotmail.com |
1f03198b78d3f11b61e1db1c679165e445820bc7 | 28782b4bb020e0432261d835ac4e36597ca9502e | /flink-table/flink-table-api-java-bridge/src/main/java/org/apache/flink/table/sources/wmstrategies/BoundedOutOfOrderTimestamps.java | 725f534f9ec004d99f8d9a35984175d5faa06a9c | [
"EPL-1.0",
"Classpath-exception-2.0",
"CC0-1.0",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-jdom",
"CC-BY-3.0",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense",
"BSD-2-Clause-Views",
"MPL-2.0",
"CC-PDDC",
"CC-BY-2.5",
"LicenseRef-scancode-propriet... | permissive | lijobs/flink | f50401b1f3686e1427493617980568341a52914f | c601cfd662c2839f8ebc81b80879ecce55a8cbaf | refs/heads/master | 2020-06-23T09:18:04.598927 | 2019-07-22T05:42:40 | 2019-07-24T05:11:06 | 198,580,410 | 1 | 0 | Apache-2.0 | 2019-07-24T07:18:38 | 2019-07-24T07:18:38 | null | UTF-8 | Java | false | false | 2,528 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.table.sources.wmstrategies;
import org.apache.flink.annotation.PublicEvolving;
import org.apache.flink.streaming.api.watermark.Watermark;
import org.apache.flink.table.descriptors.Rowtime;
import java.util.HashMap;
import java.util.Map;
/**
* A watermark strategy for rowtime attributes which are out-of-order by a bounded time interval.
*
* <p>Emits watermarks which are the maximum observed timestamp minus the specified delay.
*/
@PublicEvolving
public final class BoundedOutOfOrderTimestamps extends PeriodicWatermarkAssigner {
private static final long serialVersionUID = 1L;
private final long delay;
private long maxTimestamp = Long.MIN_VALUE + 1;
/**
* @param delay The delay by which watermarks are behind the maximum observed timestamp.
*/
public BoundedOutOfOrderTimestamps(long delay) {
this.delay = delay;
}
@Override
public void nextTimestamp(long timestamp) {
if (timestamp > maxTimestamp) {
maxTimestamp = timestamp;
}
}
@Override
public Watermark getWatermark() {
return new Watermark(maxTimestamp - delay);
}
@Override
public Map<String, String> toProperties() {
Map<String, String> map = new HashMap<>();
map.put(
Rowtime.ROWTIME_WATERMARKS_TYPE,
Rowtime.ROWTIME_WATERMARKS_TYPE_VALUE_PERIODIC_BOUNDED);
map.put(Rowtime.ROWTIME_WATERMARKS_DELAY, String.valueOf(delay));
return map;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BoundedOutOfOrderTimestamps that = (BoundedOutOfOrderTimestamps) o;
return delay == that.delay;
}
@Override
public int hashCode() {
return Long.hashCode(delay);
}
}
| [
"twalthr@apache.org"
] | twalthr@apache.org |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.