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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a8ccb64151b182b6c03b52d1b99bdafe9966647e
|
8aa3af205655793a1e68046122cf081f0bc44dfe
|
/src/main/java/cn/dreampie/common/web/render/JsonErrorRenderFactory.java
|
e203ed0791387d3503b376274b37ea2f13c863c6
|
[] |
no_license
|
Dreampie/dreampie
|
17b4b4a485810584086cb3bc3661a803c1894685
|
1cf30e3d3e398edc1826faf54da0133b57cce39f
|
refs/heads/master
| 2023-03-31T15:22:55.757841
| 2014-09-18T02:44:55
| 2014-09-18T02:44:55
| 19,423,097
| 15
| 13
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 553
|
java
|
package cn.dreampie.common.web.render;
import cn.dreampie.common.web.thread.ThreadLocalUtil;
import com.jfinal.render.ErrorRender;
import com.jfinal.render.IErrorRenderFactory;
import com.jfinal.render.Render;
/**
* Created by wangrenhui on 14-4-28.
*/
public class JsonErrorRenderFactory implements IErrorRenderFactory {
public Render getRender(int errorCode, String view) {
if (ThreadLocalUtil.isJson())
return new JsonErrorRender(errorCode, view);
else
return new ErrorRender(errorCode, view);
}
}
|
[
"wangrenhui1990@gmail.com"
] |
wangrenhui1990@gmail.com
|
4e5f972180c51c3bfe905d60c302a54b1d1dcb01
|
faddd3950f7bbfcb2774fc473ddfac3eca74fbaf
|
/rife_v1_remaining/src/unittests/com/uwyn/rife/engine/testelements/continuations/CallAnswer.java
|
f02c6637bad1a247292501d171336d8c2e675b7a
|
[] |
no_license
|
wangbo15/rife
|
d4b392f6577e998f12a8b6e529886487ca9ed320
|
399468a4c6929f0f32ad2fc15906b89cfae0e1c1
|
refs/heads/master
| 2020-04-13T14:24:13.894322
| 2013-07-01T23:02:50
| 2013-07-01T23:02:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 568
|
java
|
/*
* Copyright 2001-2008 Geert Bevin <gbevin[remove] at uwyn dot com>
* Licensed under the Apache License, Version 2.0 (the "License")
* $Id: CallAnswer.java 3918 2008-04-14 17:35:35Z gbevin $
*/
package com.uwyn.rife.engine.testelements.continuations;
import com.uwyn.rife.engine.Element;
public class CallAnswer extends Element
{
public void processElement()
{
String before = "before call";
String after = "after call";
print(before+"\n"+getContinuationId()+"\n");
setOutput("somedata", "somevalue");
print(call("exit"));
print(after);
}
}
|
[
"gbevin@uwyn.com"
] |
gbevin@uwyn.com
|
be3e04814648a39e7774d4212359579c8fad7ba0
|
7e6d4f51886bcdc4de1ffc7af5909391beeab926
|
/hap-core/src/main/java/yj/core/logdtl/controllers/LogdtlController.java
|
00b3fce07433cfd9ca57153710c14dc7f9bbe87d
|
[] |
no_license
|
cqyjitb/imfgnet356
|
b68f2b81010910198a248ab8e3283fae8a13b96b
|
4c599266aa1e7020e664abb24d6d53f5ad5bdc7e
|
refs/heads/master
| 2022-12-27T18:10:51.791100
| 2019-07-06T08:02:03
| 2019-07-06T08:02:03
| 195,488,805
| 1
| 5
| null | 2022-12-16T08:52:01
| 2019-07-06T02:31:22
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,690
|
java
|
package yj.core.logdtl.controllers;
import com.hand.hap.core.IRequest;
import com.hand.hap.system.controllers.BaseController;
import com.hand.hap.system.dto.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import yj.core.logdtl.dto.Logdtl;
import yj.core.logdtl.service.ILogdtlService;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
@Controller
public class LogdtlController extends BaseController {
@Autowired
private ILogdtlService service;
@RequestMapping(value = "/wip/logdtl/query")
@ResponseBody
public ResponseData query(Logdtl dto, @RequestParam(defaultValue = DEFAULT_PAGE) int page,
@RequestParam(defaultValue = DEFAULT_PAGE_SIZE) int pageSize, HttpServletRequest request) {
IRequest requestContext = createRequestContext(request);
return new ResponseData(service.select(requestContext,dto,page,pageSize));
}
@RequestMapping(value = "/wip/logdtl/submit")
@ResponseBody
public ResponseData update(HttpServletRequest request, @RequestBody List<Logdtl> dto){
IRequest requestCtx = createRequestContext(request);
return new ResponseData(service.batchUpdate(requestCtx, dto));
}
@RequestMapping(value = "/wip/logdtl/remove")
@ResponseBody
public ResponseData delete(HttpServletRequest request, @RequestBody List<Logdtl> dto){
service.batchDelete(dto);
return new ResponseData();
}
}
|
[
"17924529@qq.com"
] |
17924529@qq.com
|
82049da647d7333eb2731ec0fad10383a9fef498
|
f4bed87085d534212c1ac44cfb9923d5839d80ab
|
/src/main/java/lt/baltictalents/p14/demo6/Main.java
|
47c82f11f32b9d7334016ef68d0c6bea3e640327
|
[] |
no_license
|
laura-ur/BTAJavaDemo
|
e13453001966445c8910d26f625e778c15ed22cc
|
a471707ca91534fe435e117b133cd024b031ce95
|
refs/heads/master
| 2023-01-22T09:25:04.830624
| 2020-12-07T09:45:58
| 2020-12-07T09:45:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 399
|
java
|
package lt.baltictalents.p14.demo6;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) {
Integer i = 100;
Number n;
//n = i; //Klaida?
List<Integer> listI = new ArrayList<>();
List<Number> listN = new ArrayList<>();
//listN = listI; //Klaida?
}
}
|
[
"valdas@e-servisas.lt"
] |
valdas@e-servisas.lt
|
45618ef9a4cb098fdd7e3a16688f0a9abf4fdd2f
|
df7966fdc0684a8d675efb555afeb055afa7a259
|
/do-exercise/leet-code_201-250/src/main/java/exe211/add/and/search/word/data/structure/design/Main.java
|
45220767f486d1e865d911f46f8b6cbb87dd09a8
|
[
"Apache-2.0"
] |
permissive
|
manfredma/exercises
|
90760db34c33d6d38d92edf1377e54e8029bef72
|
f487ece7b0cd761e8afb14ae8be0b1b668f97d8c
|
refs/heads/master
| 2023-09-06T04:15:15.960344
| 2023-08-25T06:15:46
| 2023-08-25T06:15:46
| 176,470,365
| 3
| 0
| null | 2021-04-08T07:11:50
| 2019-03-19T09:07:26
|
Java
|
UTF-8
|
Java
| false
| false
| 1,067
|
java
|
/*
Design a data structure that supports the following two operations:
void addWord(word)
bool search(word)
search(word) can search a literal word or a regular expression string containing only letters a-z or .. A . means
it can represent any one letter.
Example:
addWord("bad")
addWord("dad")
addWord("mad")
search("pad") -> false
search("bad") -> true
search(".ad") -> true
search("b..") -> true
Note:
You may assume that all words are consist of lowercase letters a-z.
*/
package exe211.add.and.search.word.data.structure.design;
/**
* @author Manfred since 2019/9/24
*/
public class Main {
public static void main(String[] args) {
WordDictionary wordDictionary = new WordDictionary();
wordDictionary.addWord("bad");
wordDictionary.addWord("dad");
wordDictionary.addWord("mad");
System.out.println(wordDictionary.search("pad"));
System.out.println(wordDictionary.search("bad"));
System.out.println(wordDictionary.search(".ad"));
System.out.println(wordDictionary.search("b.."));
}
}
|
[
"maxingfang@meituan.com"
] |
maxingfang@meituan.com
|
73e33727c11378f4b94914f70ae89ec8c3be0df7
|
a9717fc777628e1cc1d847c23f5408679abfdf5a
|
/src/sicca-ejb/ejbModule/py/com/excelsis/sicca/legajo/session/form/AdmCapacitacionesLegajos648FC.java
|
3e9796ed94149189b2c59b89e7bb75682bdccb53
|
[] |
no_license
|
marcosd94/trabajo
|
da678b69dca30d31a0c167ee76194ea1f7fb62f0
|
00a7b110b4f5f70df7fb83af967d9dcc0e488053
|
refs/heads/master
| 2021-01-19T02:40:58.253026
| 2016-07-20T18:15:44
| 2016-07-20T18:15:44
| 63,803,756
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,528
|
java
|
package py.com.excelsis.sicca.legajo.session.form;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.Query;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.core.SeamResourceBundle;
import org.jboss.seam.international.StatusMessage.Severity;
import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.security.AuthorizationException;
import py.com.excelsis.sicca.entity.EvaluacionPart;
import py.com.excelsis.sicca.entity.ListaDet;
import py.com.excelsis.sicca.seguridad.entity.Usuario;
import py.com.excelsis.sicca.session.form.AdmDocAdjuntoFormController;
@Scope(ScopeType.CONVERSATION)
@Name("admCapacitacionesLegajos648FC")
public class AdmCapacitacionesLegajos648FC {
public List<ListaDet> getlGrilla1() {
return lGrilla1;
}
public void setlGrilla1(List<ListaDet> lGrilla1) {
this.lGrilla1 = lGrilla1;
}
public List<ListaDet> getlGrilla2() {
return lGrilla2;
}
public void setlGrilla2(List<ListaDet> lGrilla2) {
this.lGrilla2 = lGrilla2;
}
public Long getIdPersona() {
return idPersona;
}
public void setIdPersona(Long idPersona) {
this.idPersona = idPersona;
}
@In(required = false)
Usuario usuarioLogueado;
@In(value = "entityManager")
EntityManager em;
@In
StatusMessages statusMessages;
private List<ListaDet> lGrilla1;
private List<ListaDet> lGrilla2;
private Long idPersona;
public void init() {
if (!precondInit())
throw new AuthorizationException(SeamResourceBundle.getBundle().getString("seam_authorization_exception"));
cargarGrilla1();
cargarGrilla2();
}
private boolean precondInit() {
if (idPersona == null) {
return false;
}
return true;
}
private void cargarGrilla1() {
Query q =
em.createQuery("select ListaDet from ListaDet ListaDet "
+ " where ListaDet.tipo ='P' and ListaDet.postulacionCap.persona.idPersona =:idPersona ");
q.setParameter("idPersona", idPersona);
lGrilla1 = q.getResultList();
}
private void cargarGrilla2() {
Query q =
em.createQuery("select ListaDet from ListaDet ListaDet "
+ " where ListaDet.tipo ='D' and ListaDet.postulacionCap.persona.idPersona =:idPersona ");
q.setParameter("idPersona", idPersona);
lGrilla2 = q.getResultList();
}
public String calcCalificacion(Long idPostulacionCap) {
try {
Query q =
em.createQuery("select EvaluacionPart from EvaluacionPart EvaluacionPart "
+ " where EvaluacionPart.postulacionCap.idPostulacion =:idPostulacion "
+ " and EvaluacionPart.activo is true ");
q.setParameter("idPostulacion", idPostulacionCap);
List<EvaluacionPart> lista = q.getResultList();
if (lista.size() > 0) {
return (lista.get(0).getCalificacion() != null
? lista.get(0).getCalificacion().toString() : null);
}
return null;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public String calcEstado(String motivo) {
if (motivo == null)
return "BLOQUEADO";
return "DESBLOQUEADO";
}
public void descargarDocumento(Long idDocumento) {
try {
AdmDocAdjuntoFormController.abrirDocumentoFromCU(idDocumento, usuarioLogueado.getIdUsuario());
} catch (Exception e) {
statusMessages.add(Severity.ERROR, "No se pudo descargar el archivo");
e.printStackTrace();
}
}
}
|
[
"mrcperalta.mp@gmail.com"
] |
mrcperalta.mp@gmail.com
|
8380d9af282b42b15942b72a836c0a950714ba23
|
31f043184e2839ad5c3acbaf46eb1a26408d4296
|
/src/main/java/com/github/highcharts4gwt/model/highcharts/option/mock/seriesarea/data/marker/states/MockSelect.java
|
363861154c60813c34e5f0ce804f462f357d39ca
|
[] |
no_license
|
highcharts4gwt/highchart-wrapper
|
52ffa84f2f441aa85de52adb3503266aec66e0ac
|
0a4278ddfa829998deb750de0a5bd635050b4430
|
refs/heads/master
| 2021-01-17T20:25:22.231745
| 2015-06-30T15:05:01
| 2015-06-30T15:05:01
| 24,794,406
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,048
|
java
|
package com.github.highcharts4gwt.model.highcharts.option.mock.seriesarea.data.marker.states;
import com.github.highcharts4gwt.model.highcharts.option.api.seriesarea.data.marker.states.Select;
/**
* The appearance of the point marker when selected. In order to allow a point to be
* selected, set the <code>series.allowPointSelect</code> option to true.
*
*/
public class MockSelect
implements Select
{
private boolean enabled;
private String fillColor;
private String lineColor;
private double lineWidth;
private double radius;
private String genericField;
private String functionAsString;
public boolean enabled() {
return enabled;
}
public MockSelect enabled(boolean enabled) {
this.enabled = enabled;
return this;
}
public String fillColor() {
return fillColor;
}
public MockSelect fillColor(String fillColor) {
this.fillColor = fillColor;
return this;
}
public String lineColor() {
return lineColor;
}
public MockSelect lineColor(String lineColor) {
this.lineColor = lineColor;
return this;
}
public double lineWidth() {
return lineWidth;
}
public MockSelect lineWidth(double lineWidth) {
this.lineWidth = lineWidth;
return this;
}
public double radius() {
return radius;
}
public MockSelect radius(double radius) {
this.radius = radius;
return this;
}
public String getFieldAsJsonObject(String fieldName) {
return genericField;
}
public MockSelect setFieldAsJsonObject(String fieldName, String fieldValueAsJsonObject) {
this.genericField = fieldValueAsJsonObject;
return this;
}
public String getFunctionAsString(String fieldName) {
return functionAsString;
}
public MockSelect setFunctionAsString(String fieldName, String functionAsString) {
this.functionAsString = functionAsString;
return this;
}
}
|
[
"ronan.quillevere@gmail.com"
] |
ronan.quillevere@gmail.com
|
f8ae7462ee76084c439ea3748dd94e7b1b6bdb84
|
b2bfac7b91b2542228931c10c668ca2f67e86b51
|
/LostNetNoRootFirewall-Decompiled code/com/google/tagmanager/protobuf/at.java
|
e43160af8e0106ff2d06a40b7dcaf9e065999db7
|
[] |
no_license
|
abozanona/fbaAndroid
|
b58be90fc94ceec5170d84133c1e8c4e2be8806f
|
f058eb0317df3e76fd283e285c4dd3dbc354aef5
|
refs/heads/master
| 2021-09-26T22:05:31.517265
| 2018-11-03T07:21:17
| 2018-11-03T07:21:17
| 108,681,428
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 352
|
java
|
package com.google.tagmanager.protobuf;
import com.google.tagmanager.protobuf.WireFormat.FieldType;
import com.google.tagmanager.protobuf.WireFormat.JavaType;
enum at extends FieldType {
at(String str, int i, JavaType javaType, int i2) {
super(str, i, javaType, i2);
}
public boolean isPackable() {
return false;
}
}
|
[
"abozanona@gmail.com"
] |
abozanona@gmail.com
|
f834322c77e68d2a77c2f39c0e765e56eb7a4160
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/results/Codec-10/org.apache.commons.codec.language.Caverphone/BBC-F0-opt-20/tests/14/org/apache/commons/codec/language/Caverphone_ESTest.java
|
318392010193c9bd14361e6ab720d13343694f5f
|
[
"CC-BY-4.0",
"MIT"
] |
permissive
|
pderakhshanfar/EMSE-BBC-experiment
|
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
|
fea1a92c2e7ba7080b8529e2052259c9b697bbda
|
refs/heads/main
| 2022-11-25T00:39:58.983828
| 2022-04-12T16:04:26
| 2022-04-12T16:04:26
| 309,335,889
| 0
| 1
| null | 2021-11-05T11:18:43
| 2020-11-02T10:30:38
| null |
UTF-8
|
Java
| false
| false
| 2,707
|
java
|
/*
* This file was automatically generated by EvoSuite
* Wed Oct 20 10:32:48 GMT 2021
*/
package org.apache.commons.codec.language;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.apache.commons.codec.language.Caverphone;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true)
public class Caverphone_ESTest extends Caverphone_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
Caverphone caverphone0 = new Caverphone();
boolean boolean0 = caverphone0.isCaverphoneEqual("~_", ")o]5SSUg^:+@5T");
assertFalse(boolean0);
}
@Test(timeout = 4000)
public void test1() throws Throwable {
Caverphone caverphone0 = new Caverphone();
String string0 = caverphone0.caverphone("");
assertEquals("1111111111", string0);
}
@Test(timeout = 4000)
public void test2() throws Throwable {
Caverphone caverphone0 = new Caverphone();
String string0 = caverphone0.caverphone(")o]5SSUg^:+@5T");
assertEquals("ASKT111111", string0);
}
@Test(timeout = 4000)
public void test3() throws Throwable {
Caverphone caverphone0 = new Caverphone();
Object object0 = new Object();
try {
caverphone0.encode(object0);
fail("Expecting exception: Exception");
} catch(Exception e) {
//
// Parameter supplied to Caverphone encode is not of type java.lang.String
//
verifyException("org.apache.commons.codec.language.Caverphone", e);
}
}
@Test(timeout = 4000)
public void test4() throws Throwable {
Caverphone caverphone0 = new Caverphone();
Object object0 = caverphone0.encode((Object) "1?oB+W,wn8YRg1,>+");
assertEquals("APNK111111", object0);
}
@Test(timeout = 4000)
public void test5() throws Throwable {
Caverphone caverphone0 = new Caverphone();
String string0 = caverphone0.caverphone((String) null);
assertEquals("1111111111", string0);
}
@Test(timeout = 4000)
public void test6() throws Throwable {
Caverphone caverphone0 = new Caverphone();
boolean boolean0 = caverphone0.isCaverphoneEqual("~_", "~_");
assertTrue(boolean0);
}
@Test(timeout = 4000)
public void test7() throws Throwable {
Caverphone caverphone0 = new Caverphone();
String string0 = caverphone0.encode("");
assertEquals("1111111111", string0);
}
}
|
[
"pderakhshanfar@serg2.ewi.tudelft.nl"
] |
pderakhshanfar@serg2.ewi.tudelft.nl
|
b4f993a9ce39eef4d541dfcde599fcb3a3a5c919
|
9bdcc60ee0276264de1203d257c88986d261e55a
|
/JSPEx3/src/com/thurein/ProfileBean.java
|
575e0beb5e3a02b71cc553f7c62bd4f84456b739
|
[] |
no_license
|
thureintun-me/ACE-OJT
|
52f28b74be656cbf7e05f2f0782a825464e39f01
|
271bf95a3771b33133743b19d88df1a3df240ef2
|
refs/heads/main
| 2023-05-03T05:08:08.653745
| 2021-05-24T08:54:11
| 2021-05-24T08:54:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,250
|
java
|
package com.thurein;
public class ProfileBean {
private String email;
private String password;
private String confirmPassword;
private String name;
private String gender;
private String course;
private String education;
private byte[] photo;
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getConfirmPassword() {
return confirmPassword;
}
public void setConfirmPassword(String confirmPassword) {
this.confirmPassword = confirmPassword;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getCourse() {
return course;
}
public void setCourse(String course) {
this.course = course;
}
public String getEducation() {
return education;
}
public void setEducation(String education) {
this.education = education;
}
public byte[] getPhoto() {
return photo;
}
public void setPhoto(byte[] photo) {
this.photo = photo;
}
}
|
[
"you@example.com"
] |
you@example.com
|
bedc8fa025bf004a8f45bb73891dafb164f25c55
|
f18e28e5cdf0d2095ef258374f0d1aa7e133fff2
|
/hiperion_ejb/src/main/java/ec/com/avila/hiperion/doc/servicio/GenerarDocEquipoElectronico.java
|
377c5dd03f9360735e11326b06d1e43db8257bdb
|
[] |
no_license
|
jipowi/Hiperion666
|
a79a4c0e0f89662094a92d8ae19d99b046454ce3
|
72c81a4242bc6d2729485334c4a09778150a4fa2
|
refs/heads/master
| 2021-01-11T18:14:15.885060
| 2018-11-16T20:57:16
| 2018-11-16T20:57:16
| 79,521,688
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 764
|
java
|
/**
*
*/
package ec.com.avila.hiperion.doc.servicio;
import javax.ejb.Local;
import ec.com.avila.hiperion.comun.HiperionException;
import ec.com.avila.hiperion.emision.entities.RamoEquipoElectronico;
/**
* <b> Interface de generación del documento PDF </b>
*
* @author Franklin Pozo
* @version 1.0,23/03/2015
* @since JDK1.6
*/
@Local
public interface GenerarDocEquipoElectronico {
/**
*
* <b> Permite generar el XML del ramo Equipo Electronico </b>
* <p>
* [Author: Franklin Pozo, Date: 23/03/2015]
* </p>
*
* @param equipoElectronico
* @return
* @throws HiperionException
*/
public String generarXmlEquipoElectronico(RamoEquipoElectronico equipoElectronico) throws HiperionException;
}
|
[
"fpdany18@hotmail.com"
] |
fpdany18@hotmail.com
|
4a811fa6fccb098973142e88464f923180c73e8a
|
7d91c34d3f1e30a77afd3221d0ab595389fbe23e
|
/java/security/NoSuchAlgorithmException.java
|
187d17c1f2c517685d1f3cdbaa97a64d00c65955
|
[] |
no_license
|
JobTracker/java-source
|
a9a6b5c1030f8ee09831922fed8c8e808b75f2f5
|
15ffe2fc855c459f0397e7f633392177e91b4859
|
refs/heads/master
| 2016-09-05T08:59:02.510617
| 2014-08-25T05:51:05
| 2014-08-25T05:51:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,360
|
java
|
/*
* Copyright 1996-2003 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package java.security;
/**
* This exception is thrown when a particular cryptographic algorithm is
* requested but is not available in the environment.
*
* @author Benjamin Renaud
*/
public class NoSuchAlgorithmException extends GeneralSecurityException {
private static final long serialVersionUID = -7443947487218346562L;
/**
* Constructs a NoSuchAlgorithmException with no detail
* message. A detail message is a String that describes this
* particular exception.
*/
public NoSuchAlgorithmException() {
super();
}
/**
* Constructs a NoSuchAlgorithmException with the specified
* detail message. A detail message is a String that describes
* this particular exception, which may, for example, specify which
* algorithm is not available.
*
* @param msg the detail message.
*/
public NoSuchAlgorithmException(String msg) {
super(msg);
}
/**
* Creates a <code>NoSuchAlgorithmException</code> with the specified
* detail message and cause.
*
* @param message the detail message (which is saved for later retrieval
* by the {@link #getMessage()} method).
* @param cause the cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A <tt>null</tt> value is permitted,
* and indicates that the cause is nonexistent or unknown.)
* @since 1.5
*/
public NoSuchAlgorithmException(String message, Throwable cause) {
super(message, cause);
}
/**
* Creates a <code>NoSuchAlgorithmException</code> with the specified cause
* and a detail message of <tt>(cause==null ? null : cause.toString())</tt>
* (which typically contains the class and detail message of
* <tt>cause</tt>).
*
* @param cause the cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A <tt>null</tt> value is permitted,
* and indicates that the cause is nonexistent or unknown.)
* @since 1.5
*/
public NoSuchAlgorithmException(Throwable cause) {
super(cause);
}
}
|
[
"1092862062@qq.com"
] |
1092862062@qq.com
|
c6a8b92b714d5b1a82d1903ecdf2e3934e066c7b
|
73458087c9a504dedc5acd84ecd63db5dfcd5ca1
|
/src/com/estrongs/a/b/j.java
|
245abc7aaddebd3f21534d8905cfaac1678d99dc
|
[] |
no_license
|
jtap60/com.estr
|
99ff2a6dd07b02b41a9cc3c1d28bb6545e68fb27
|
8b70bf2da8b24c7cef5973744e6054ef972fc745
|
refs/heads/master
| 2020-04-14T02:12:20.424436
| 2018-12-30T10:56:45
| 2018-12-30T10:56:45
| 163,578,360
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 475
|
java
|
package com.estrongs.a.b;
import com.estrongs.android.pop.zeroconf.w;
import com.estrongs.android.util.an;
final class j
implements Runnable
{
public void run()
{
synchronized ()
{
if (d.g() != null)
{
if (an.b()) {
d.g().a();
}
d.g().b();
d.a(null);
}
return;
}
}
}
/* Location:
* Qualified Name: com.estrongs.a.b.j
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
65574be42f884a3abeabe0c3c40a7376f9347bff
|
e9b0bd0dfa45d3ed3d2dc77412cab1accf637018
|
/app/src/main/java/com/moemoe/lalala/di/modules/DetailModule.java
|
b5990161bf19b32bcbcc2fad2ec14cb9c709829b
|
[
"Apache-2.0"
] |
permissive
|
Pragmatism0220/Kira
|
81a01a81ddca6978c4a1f53f4d45ede2374811c6
|
95497149e2e0a5721c91a582105c6558287f692c
|
refs/heads/master
| 2021-10-09T17:46:06.228815
| 2018-07-27T10:49:09
| 2018-07-27T10:49:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 427
|
java
|
package com.moemoe.lalala.di.modules;
import com.moemoe.lalala.presenter.DocDetailContract;
import dagger.Module;
import dagger.Provides;
/**
* Created by yi on 2016/11/29.
*/
@Module
public class DetailModule {
private DocDetailContract.View mView;
public DetailModule(DocDetailContract.View view){
this.mView = view;
}
@Provides
public DocDetailContract.View provideView(){return mView;}
}
|
[
"hyggexuanyuan@gmail.com"
] |
hyggexuanyuan@gmail.com
|
83e1b9c7c7c657e9270a70358d2f2915ada40673
|
13a63006ec4e4e6d3771653a07aaaaf9d3eb5660
|
/src/main/java/mcjty/rftools/crafting/PreservingShapedRecipe.java
|
fc567bc5dc203d05644d1767221a5b9b9869e8ca
|
[
"MIT"
] |
permissive
|
tansheron/RFTools
|
6306534db0b40ffc212c4f8964859bda4b2adbb5
|
45d6a4f75acb7c7723c6f7e59659aac10c35c688
|
refs/heads/1.10
| 2021-01-11T01:13:09.711259
| 2016-12-11T14:28:09
| 2016-12-11T14:28:09
| 71,067,870
| 0
| 0
| null | 2016-10-16T18:06:23
| 2016-10-16T18:06:22
| null |
UTF-8
|
Java
| false
| false
| 1,800
|
java
|
package mcjty.rftools.crafting;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.ShapedRecipes;
import net.minecraft.nbt.NBTTagCompound;
public class PreservingShapedRecipe extends ShapedRecipes {
private Object objectToInheritFrom;
public PreservingShapedRecipe(int width, int height, ItemStack[] items, ItemStack output, int takeNBTFromSlot) {
super(width, height, items, output);
Item item = items[takeNBTFromSlot].getItem();
objectToInheritFrom = getObjectFromStack(item);
}
private Object getObjectFromStack(Item item) {
if (item instanceof ItemBlock) {
return ((ItemBlock) item).getBlock();
} else {
return item;
}
}
private NBTTagCompound getNBTFromObject(InventoryCrafting inventoryCrafting) {
for (int i = 0 ; i < inventoryCrafting.getSizeInventory() ; i++) {
ItemStack stack = inventoryCrafting.getStackInSlot(i);
if (stack != null && stack.getItem() != null) {
Object o = getObjectFromStack(stack.getItem());
if (objectToInheritFrom.equals(o)) {
return stack.getTagCompound();
}
}
}
return null;
}
@Override
public ItemStack getCraftingResult(InventoryCrafting inventoryCrafting) {
ItemStack stack = super.getCraftingResult(inventoryCrafting);
if (stack != null) {
NBTTagCompound tagCompound = getNBTFromObject(inventoryCrafting);
if (tagCompound != null) {
stack.setTagCompound(tagCompound);
}
}
return stack;
}
}
|
[
"mcjty1@gmail.com"
] |
mcjty1@gmail.com
|
5fd9c029a5dcbd72f77538814a79f49ef1262c5a
|
9c726e47b90906f301e5e40ef4ee7379a57fe745
|
/app/src/main/java/pl/karol202/paintplus/file/ImageLoader.java
|
d6a044f52accf703010f343e8f13782e894c3e65
|
[
"Apache-2.0"
] |
permissive
|
veritas44/PaintPlusPlus
|
e4b1abf2db28edf5ca3eeaa2c94563311661d847
|
4d0029d6d355317f45f0d359ec4bf436e0ad992f
|
refs/heads/master
| 2021-04-27T09:46:05.099756
| 2017-12-03T22:17:57
| 2017-12-03T22:17:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,717
|
java
|
/*
* Copyright 2017 karol-202
*
* 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 pl.karol202.paintplus.file;
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;
import android.graphics.BitmapFactory;
import android.graphics.BitmapFactory.Options;
import android.graphics.Point;
import com.ultrasonic.android.image.bitmap.util.AndroidBmpUtil;
import com.waynejo.androidndkgif.GifEncoder;
import pl.karol202.paintplus.ErrorHandler;
import pl.karol202.paintplus.file.BitmapSaveFormat.GIFSaveFormat;
import pl.karol202.paintplus.file.BitmapSaveFormat.JPEGSaveFormat;
import pl.karol202.paintplus.file.BitmapSaveFormat.PNGSaveFormat;
import pl.karol202.paintplus.util.GraphicsHelper;
import java.io.*;
import static pl.karol202.paintplus.file.BitmapSaveFormat.BMPSaveFormat;
import static pl.karol202.paintplus.file.BitmapSaveFormat.WEBPSaveFormat;
public class ImageLoader
{
public static final String[] OPEN_FORMATS = new String[] { "jpg", "jpeg", "png", "webp", "bmp", "gif" };
public static final String[] SAVE_FORMATS = new String[] { "jpg", "jpeg", "png", "webp", "bmp", "gif" };
private static File temporaryFile;
public static void setTemporaryFileLocation(File location)
{
ImageLoader.temporaryFile = new File(location, "tmp");
}
public static Bitmap openBitmapAndScaleIfNecessary(FileDescriptor fileDescriptor)
{
Bitmap bitmap = BitmapFactory.decodeFileDescriptor(fileDescriptor);
if(bitmap == null) return null;
Point bitmapSize = new Point(bitmap.getWidth(), bitmap.getHeight());
if(isBitmapTooBig(bitmapSize))
{
bitmapSize = scaleBitmapSizeIfNecessary(bitmapSize);
return Bitmap.createScaledBitmap(bitmap, bitmapSize.x, bitmapSize.y, true);
}
else return bitmap;
}
static Bitmap openBitmapAndScale(FileDescriptor fileDescriptor, Point targetSize)
{
Bitmap bitmap = BitmapFactory.decodeFileDescriptor(fileDescriptor);
if(bitmap == null) return null;
return Bitmap.createScaledBitmap(bitmap, targetSize.x, targetSize.y, true);
}
static boolean isBitmapTooBig(Point size)
{
float maxSize = GraphicsHelper.getMaxTextureSize();
return size.x > maxSize || size.y > maxSize;
}
static Point getBitmapSize(FileDescriptor fileDescriptor)
{
Options options = new Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeFileDescriptor(fileDescriptor, null, options);
return new Point(options.outWidth,options.outHeight);
}
static Point scaleBitmapSizeIfNecessary(Point originalSize)
{
if(isBitmapTooBig(originalSize))
{
float maxSize = GraphicsHelper.getMaxTextureSize();
float widthRatio = originalSize.x / maxSize;
float heightRatio = originalSize.y / maxSize;
float higher = Math.max(widthRatio, heightRatio);
int newWidth = (int) Math.floor(originalSize.x / higher);
int newHeight = (int) Math.floor(originalSize.y / higher);
return new Point(newWidth, newHeight);
}
else return originalSize;
}
public static BitmapSaveFormat getFormat(String name)
{
String[] parts = name.split("\\.");
String extension = parts[parts.length - 1].toLowerCase();
switch(extension)
{
case "jpg":
case "jpeg": return new JPEGSaveFormat();
case "png": return new PNGSaveFormat();
case "webp": return new WEBPSaveFormat();
case "bmp": return new BMPSaveFormat();
case "gif": return new GIFSaveFormat();
default: return null;
}
}
public static BitmapSaveResult.Result saveBitmap(Bitmap bitmap, FileDescriptor fileDescriptor, BitmapSaveFormat format)
{
FileOutputStream fos = null;
try
{
fos = new FileOutputStream(fileDescriptor);
if(!compressBitmap(bitmap, fos, format)) throw new RuntimeException("Cannot compress bitmap.");
}
catch(Exception e)
{
ErrorHandler.report(e);
return BitmapSaveResult.Result.ERROR;
}
finally
{
try
{
if(fos != null) fos.close();
}
catch(IOException e)
{
ErrorHandler.report(e);
}
}
return BitmapSaveResult.Result.SUCCESSFUL;
}
private static boolean compressBitmap(Bitmap bitmap, FileOutputStream outputStream, BitmapSaveFormat format)
{
if(format instanceof JPEGSaveFormat)
return bitmap.compress(CompressFormat.JPEG, ((JPEGSaveFormat) format).getQuality(), outputStream);
else if(format instanceof PNGSaveFormat) return bitmap.compress(CompressFormat.PNG, 100, outputStream);
else if(format instanceof WEBPSaveFormat) return bitmap.compress(CompressFormat.WEBP, 100, outputStream);
else if(format instanceof BMPSaveFormat) return compressToBmp(bitmap, outputStream);
else if(format instanceof GIFSaveFormat) return tryToCompressToGif(bitmap, outputStream, (GIFSaveFormat) format);
return false;
}
private static boolean compressToBmp(Bitmap bitmap, FileOutputStream outputStream)
{
AndroidBmpUtil util = new AndroidBmpUtil();
return util.save(bitmap, outputStream);
}
private static boolean tryToCompressToGif(Bitmap bitmap, FileOutputStream outputStream, GIFSaveFormat format)
{
try
{
return compressToGif(bitmap, outputStream, format);
}
catch(IOException e)
{
ErrorHandler.report(e);
return false;
}
}
private static boolean compressToGif(Bitmap bitmap, FileOutputStream outputStream, GIFSaveFormat format) throws IOException
{
boolean result = compressToGif(bitmap, temporaryFile.getAbsolutePath(), format);
if(result)
{
FileInputStream inputStream = new FileInputStream(temporaryFile);
copyStream(inputStream, outputStream);
inputStream.close();
}
temporaryFile.delete();
return result;
}
private static boolean compressToGif(Bitmap bitmap, String path, GIFSaveFormat format) throws FileNotFoundException
{
boolean result;
GifEncoder encoder = new GifEncoder();
encoder.setDither(format.getDithering());
encoder.init(bitmap.getWidth(), bitmap.getHeight(), path, GifEncoder.EncodingType.ENCODING_TYPE_FAST);
result = encoder.encodeFrame(bitmap, 0);
encoder.close();
return result;
}
private static void copyStream(InputStream is, OutputStream os) throws IOException
{
byte[] buffer = new byte[1024];
int length;
while((length = is.read(buffer)) > 0)
os.write(buffer, 0, length);
}
}
|
[
"karoljurski1@gmail.com"
] |
karoljurski1@gmail.com
|
3fae2a5a642ed846431bb51961477f5f32f19c0d
|
b97bc0706448623a59a7f11d07e4a151173b7378
|
/src/main/java/com/tcmis/client/openCustomer/action/DefaultCustomerAction.java
|
499936243185823a70f706eaf84258179bcf878e
|
[] |
no_license
|
zafrul-ust/tcmISDev
|
576a93e2cbb35a8ffd275fdbdd73c1f9161040b5
|
71418732e5465bb52a0079c7e7e7cec423a1d3ed
|
refs/heads/master
| 2022-12-21T15:46:19.801950
| 2020-02-07T21:22:50
| 2020-02-07T21:22:50
| 241,601,201
| 0
| 0
| null | 2022-12-13T19:29:34
| 2020-02-19T11:08:43
|
Java
|
UTF-8
|
Java
| false
| false
| 2,164
|
java
|
package com.tcmis.client.openCustomer.action;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.Date;
import java.util.Vector;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.commons.beanutils.DynaBean;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import com.tcmis.common.admin.beans.PersonnelBean;
import com.tcmis.common.exceptions.BaseException;
import com.tcmis.common.framework.TcmISBaseAction;
import com.tcmis.common.util.BeanHandler;
import com.tcmis.common.util.ResourceLibrary;
import com.tcmis.client.openCustomer.process.UserProfileProcess;
/******************************************************************************
* Controller for CustomerAddressSearch
* @version 1.0
******************************************************************************/
public class DefaultCustomerAction
extends TcmISBaseAction {
public ActionForward executeAction(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws
BaseException, Exception {
// login
if (!this.isLoggedIn(request)) {
request.setAttribute("requestedPage", "defaultcustomer");
request.setAttribute("requestedURLWithParameters",
this.getRequestedURLWithParameters(request));
return (mapping.findForward("login"));
}
request.setAttribute("startSearchTime", new Date().getTime() );
PersonnelBean personnelBean = (PersonnelBean) this.getSessionObject(request, "personnelBean");
UserProfileProcess process = new UserProfileProcess(getDbUser(request), getTcmISLocaleString(request));
request.getSession().setAttribute("defaultCustomerColl", process.getDefaultCustomerColl(""+personnelBean.getPersonnelId()));
request.setAttribute("endSearchTime", new Date().getTime() );
return (mapping.findForward("success"));
}
}
|
[
"julio.rivero@wescoair.com"
] |
julio.rivero@wescoair.com
|
598e4b9ca4cc848e028b46cbf8db2ae1140a6b55
|
cb0d33ec3a4ffd81be2872ccc62539ff2d831c9d
|
/src/com/mateusborja/sc03_20/funcoesmatematicas/FuncaoMatematica01.java
|
1021bf93fdddf9bf3b90518f309eb7c1e2b9bc80
|
[] |
no_license
|
mateusborja/java-logic
|
3672ec4170624eb4ef18bfe41e55c0d120035ef7
|
bad5f15007d61e8a55ec9cfa65baf25fb99d110b
|
refs/heads/main
| 2023-02-13T04:50:29.392432
| 2021-01-05T18:10:10
| 2021-01-05T18:10:10
| 302,695,628
| 0
| 0
| null | null | null | null |
WINDOWS-1252
|
Java
| false
| false
| 914
|
java
|
//java functions
package com.mateusborja.sc03_20.funcoesmatematicas;
public class FuncaoMatematica01 {
public static void main(String[] args) {
double x = 3.0;
double y = 4;
double z = -5.0;
double A, B, C;
A = Math.sqrt(x);
B = Math.sqrt(y);
C = Math.sqrt(25);
System.out.printf("Raiz quadrada é: => %.4f%n", A);
System.out.println("Raiz quadrada é: => " + B);
System.out.println("Raiz quadrada é: => " + C + "\n");
A = Math.pow(x, y);
B = Math.pow(x, 2.0);
C = Math.pow(5.0, 2.0);
System.out.println(x + " elevado a: => " + y + " é igual a: " + A);
System.out.println(x + " elevado ao quadrado é igual a: => " + B);
System.out.println("5 elevado ao quadrado é igual a: => " + C + "\n");
A = Math.abs(x);
B = Math.abs(z); // valor positivo
System.out.println("Valor absoluto é: => " + A);
System.out.println("Valor absoluto é: => " + B);
}
}
|
[
"mateus.borja@gmail.com"
] |
mateus.borja@gmail.com
|
ae90f62fff70e215f971481d239a6ebe1ee2d64b
|
209012cd79de61515a02bb4cb0b62e31fb176453
|
/CuadrillasDTO/src/main/java/com/fyg/cuadrillas/dto/empleado/EmpleadoDocumentoDTO.java
|
ac52e1a576d0df6e324aa40dc653a033a46c1b4a
|
[] |
no_license
|
FyGIntegracionContinua/CuadrillasMX
|
63146864c35d03e266e1d768484c128da28d4285
|
da081015d28886801d733b005568816a68290f8f
|
refs/heads/master
| 2021-01-01T19:26:01.581928
| 2017-08-07T17:42:08
| 2017-08-07T17:42:08
| 98,582,627
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,167
|
java
|
package com.fyg.cuadrillas.dto.empleado;
import java.util.Date;
import com.fyg.cuadrillas.comun.ObjetoValor;
public class EmpleadoDocumentoDTO extends ObjetoValor {
/**
* Serial uid
*/
private static final long serialVersionUID = -7297474146942071070L;
/**
* id del empleado
*/
private Integer idEmpleado;
/**
* documento entregado
*/
private String codigoEmpDoc;
/**
* Descripcion del documento
*/
private String descripcionDocumento;
/**
* Fecha_alta del documento
*/
private Date fechaAlta;
/**
* Fecha ultima modificacion
*/
private Date fechaUltMod;
/**
* estatus
*/
private String estatus;
/**
* @return the idEmpleado obtiene el id empleado
*/
public Integer getIdEmpleado() {
return idEmpleado;
}
/**
* @param idEmpleado the id_empleado to set
*/
public void setIdEmpleado(Integer idEmpleado) {
this.idEmpleado = idEmpleado;
}
/**
* @return the codigoEmpDoc
*/
public String getCodigoEmpDoc() {
return codigoEmpDoc;
}
/**
* @param codigoEmpDoc the codigo del documento to set
*/
public void setCodigoEmpDoc(String codigoEmpDoc) {
this.codigoEmpDoc = codigoEmpDoc;
}
/**
* @return regresa la fecha de alta
*/
public Date getFechaAlta() {
return fechaAlta;
}
/**
* @param fechaAlta ingresa la fecha de alta
*/
public void setFechaAlta(Date fechaAlta) {
this.fechaAlta = fechaAlta;
}
/**
* @return regresa la fecha de ult mod.
*/
public Date getFechaUltMod() {
return fechaUltMod;
}
/**
* @param fechaUltMod ingresa la fecha ult. mod
*/
public void setFechaUltMod(Date fechaUltMod) {
this.fechaUltMod = fechaUltMod;
}
/**
* @return the estatus
*/
public String getEstatus() {
return estatus;
}
/**
* @param estatus the estatus to set
*/
public void setEstatus(String estatus) {
this.estatus = estatus;
}
/**
* @return the descripcionDocumento
*/
public String getDescripcionDocumento() {
return descripcionDocumento;
}
/**
* @param descripcionDocumento the descripcionDocumento to set
*/
public void setDescripcionDocumento(String descripcionDocumento) {
this.descripcionDocumento = descripcionDocumento;
}
}
|
[
"christian.lopez@fygsolutions.com"
] |
christian.lopez@fygsolutions.com
|
9e021b55b781aeed694838b803a2769bd82c5cc4
|
e5c7578a5399d648b310376e45bc83e26df04716
|
/app/src/main/java/com/seabreeze/appstore/adapter/top/CategorySubAdapter.java
|
dea98b15844fd26165d8cf016e2a5c662bc4c217
|
[] |
no_license
|
milanxiaotiejiang/AppStore
|
422abccc2975e4a834e7a83c663f2e174a398f96
|
a26f9766acd60c9944dbb9198867b4feb6958708
|
refs/heads/master
| 2021-08-16T19:09:44.907147
| 2020-03-29T06:26:09
| 2020-03-29T06:26:09
| 141,122,476
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,960
|
java
|
package com.seabreeze.appstore.adapter.top;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.seabreeze.appstore.R;
import com.seabreeze.appstore.bean.CategoryBean;
import com.zhxu.recyclerview.App;
import java.util.List;
/**
* Created by xzhang on 2017/5/13.
*/
public class CategorySubAdapter extends BaseAdapter {
private Context mContext ;
private List<CategoryBean.CategoryTopBean> topBeanList;
public CategorySubAdapter(Context context, List<CategoryBean.CategoryTopBean> titleBeanList) {
mContext = context ;
this.topBeanList = titleBeanList ;
}
@Override
public int getCount() {
return topBeanList.size();
}
@Override
public Object getItem(int position) {
return topBeanList.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
CategoryBean.CategoryTopBean topBean = topBeanList.get(position);
ViewHolder holder = null ;
if(convertView == null){
convertView = View.inflate(mContext, R.layout.appdetail_subcat_title,null);
holder = new ViewHolder() ;
convertView.setTag(holder);
}else {
holder = (ViewHolder) convertView.getTag();
}
holder.appicon = (ImageView) convertView.findViewById(R.id.appicon);
holder.ItemTitle = (TextView) convertView.findViewById(R.id.ItemTitle);
holder.ItemTitle.setText(topBean.getName());
Glide.with(App.getContext()).load(topBean.getIconUrl()).into(holder.appicon);
return convertView;
}
class ViewHolder {
ImageView appicon ;
TextView ItemTitle ;
}
}
|
[
"765151629@qq.com"
] |
765151629@qq.com
|
0651604a3221bb3bd97eeb143d16dc93d48403b8
|
95e944448000c08dd3d6915abb468767c9f29d3c
|
/sources/com/p280ss/android/ugc/aweme/shortvideo/sticker/viewmodel/C40989e.java
|
9e093ba407ee5ad5d07fd45f0b387b3ae74f4213
|
[] |
no_license
|
xrealm/tiktok-src
|
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
|
90f305b5f981d39cfb313d75ab231326c9fca597
|
refs/heads/master
| 2022-11-12T06:43:07.401661
| 2020-07-04T20:21:12
| 2020-07-04T20:21:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 677
|
java
|
package com.p280ss.android.ugc.aweme.shortvideo.sticker.viewmodel;
import android.arch.lifecycle.C0052o;
import com.p280ss.android.ugc.aweme.mvp.model.LiveDataWrapper;
import com.p280ss.android.ugc.aweme.mvp.model.LiveDataWrapper.STATUS;
import p346io.reactivex.p348d.C7326g;
/* renamed from: com.ss.android.ugc.aweme.shortvideo.sticker.viewmodel.e */
final /* synthetic */ class C40989e implements C7326g {
/* renamed from: a */
private final C0052o f106572a;
C40989e(C0052o oVar) {
this.f106572a = oVar;
}
public final void accept(Object obj) {
this.f106572a.setValue(LiveDataWrapper.m109598a(STATUS.ERROR, (Throwable) obj));
}
}
|
[
"65450641+Xyzdesk@users.noreply.github.com"
] |
65450641+Xyzdesk@users.noreply.github.com
|
59b0bfaf6e977fa56ba505013548e6bceebc55be
|
e5bb4c1c5cb3a385a1a391ca43c9094e746bb171
|
/WeiXin/trunk/zhaocaixing/src/main/java/com/hzfh/weixin/model/common/captcha/SecurityCode.java
|
aff8b88903653d750f20fd7bfb2fba9fc2b9156a
|
[] |
no_license
|
FashtimeDotCom/huazhen
|
397143967ebed9d50073bfa4909c52336a883486
|
6484bc9948a29f0611855f84e81b0a0b080e2e02
|
refs/heads/master
| 2021-01-22T14:25:04.159326
| 2016-01-11T09:52:40
| 2016-01-11T09:52:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,362
|
java
|
package com.hzfh.weixin.model.common.captcha;
import java.util.Arrays;
/**
* Created by paul on 15-3-11.
*/
public class SecurityCode {
/**
* 验证码难度级别,Simple只包含数字,Medium包含数字和小写英文,Hard包含数字和大小写英文
*/
public enum SecurityCodeLevel {
Simple, Medium, Hard
};
/**
* 产生默认验证码,4位中等难度
*
* @return String 验证码
*/
public static String getSecurityCode() {
return getSecurityCode(4, SecurityCodeLevel.Medium, false);
}
/**
* 产生长度和难度任意的验证码
*
* @param length 长度
* @param level 难度级别
* @param isCanRepeat 是否能够出现重复的字符,如果为true,则可能出现 5578这样包含两个5,如果为false,则不可能出现这种情况
* @return String 验证码
*/
public static String getSecurityCode(int length, SecurityCodeLevel level, boolean isCanRepeat) {
//随机抽取len个字符
int len = length;
//字符集合(除去易混淆的数字0、数字1、字母l、字母o、字母O)
char[] codes = {'1', '2', '3', '4', '5', '6', '7', '8', '9',
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
'j', 'k', 'm', 'n', 'p', 'q', 'r', 's', 't',
'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C',
'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
'W', 'X', 'Y', 'Z'};
//根据不同的难度截取字符数组
if (level == SecurityCodeLevel.Simple) {
codes = Arrays.copyOfRange(codes, 0, 9);
} else if (level == SecurityCodeLevel.Medium) {
codes = Arrays.copyOfRange(codes, 0, 33);
}
//字符集合长度
int n = codes.length;
//抛出运行时异常,这里的len为4
if (len > n && isCanRepeat == false) {
throw new RuntimeException(
String.format("调用SecurityCode.getSecurityCode(%1$s,%2$s,%3$s)出现异常," +
"当isCanRepeat为%3$s时,传入参数%1$s不能大于%4$s",
len, level, isCanRepeat, n));
}
//存放抽取出来的字符
char[] result = new char[len];
//判断能否出现重复的字符
if (isCanRepeat) {
for (int i = 0; i < result.length; i++) {
//索引 0 and n-1
int r = (int) (Math.random() * n);
//将result中的第i个元素设置为codes[r]存放的数值
result[i] = codes[r];
}
} else {
for (int i = 0; i < result.length; i++) {
//索引 0 and n-1
int r = (int) (Math.random() * n);
//将result中的第i个元素设置为codes[r]存放的数值
result[i] = codes[r];
//必须确保不会再次抽取到那个字符,因为所有抽取的字符必须不相同。
//因此,这里用数组中的最后一个字符改写codes[r],并将n减1
codes[r] = codes[n - 1];
n--;
}
}
return String.valueOf(result);
}
}
|
[
"ulei0343@163.com"
] |
ulei0343@163.com
|
9fbf57985a8a98ed2bb308beb03b8f53c7fd0748
|
fee80e730c0a9d2ede2721d4441970bafaaaa646
|
/src/org/ace/insurance/life/premium/persistence/interfaces/ILifePolicyPremiumDAO.java
|
a3d42108a1b52a32b68c66ee705357a9dba9caaf
|
[] |
no_license
|
LifeTeam-TAT/GGLI-Core
|
242360ba9a6dd7cb3841fa495f9124a327df8450
|
d000f3068b863a581775f5cd7b78b2bfd06b378f
|
refs/heads/master
| 2023-03-29T06:26:44.456523
| 2021-04-02T15:03:18
| 2021-04-02T15:03:18
| 354,049,682
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 899
|
java
|
package org.ace.insurance.life.premium.persistence.interfaces;
import java.util.Date;
import java.util.List;
import org.ace.insurance.life.premium.LifePolicyPremium;
import org.ace.java.component.persistence.exception.DAOException;
/**
* @author T&D Infomation System Ltd
* @since 1.0.0
* @date 2013/07/01
*/
public interface ILifePolicyPremiumDAO {
public void insert(LifePolicyPremium lifePolicyPremium) throws DAOException;
public void update(LifePolicyPremium lifePolicyPremium) throws DAOException;
public void delete(LifePolicyPremium lifePolicyPremium) throws DAOException;
public LifePolicyPremium findById(String id) throws DAOException;
public List<LifePolicyPremium> findAll() throws DAOException;
public List<LifePolicyPremium> findByLifePolicyPremium(String lifePolicyNo, String customerID, String agentID,
Date startDate,
Date endDate) throws DAOException;
}
|
[
"lifeteam.tat@gmail.com"
] |
lifeteam.tat@gmail.com
|
e6312c5c87a019a1ff48ac962bc526c5e19fe39a
|
d1028e7cf3d5d98281a1a2235a5ff50903a88e3a
|
/app/src/main/java/com/nuhkoca/udacitybakingapp/network/IBakingAPI.java
|
0e1e68e3b7627bc0e0828ae1935a44a75a0a711b
|
[
"MIT"
] |
permissive
|
nuhkoca/udacity-baking-app
|
95b0aee9be9ef2f7721d20e9c6c7f74517cdc62a
|
aed71ed23e2ec4f5db6e96525be7985331599598
|
refs/heads/master
| 2023-08-31T22:38:57.275413
| 2023-08-22T20:19:45
| 2023-08-22T20:19:45
| 125,122,008
| 7
| 4
| null | 2023-08-22T20:19:46
| 2018-03-13T22:21:31
|
Java
|
UTF-8
|
Java
| false
| false
| 361
|
java
|
package com.nuhkoca.udacitybakingapp.network;
import com.nuhkoca.udacitybakingapp.model.RecipeResponse;
import java.util.List;
import retrofit2.http.GET;
import rx.Observable;
/**
* Created by nuhkoca on 3/13/18.
*/
public interface IBakingAPI {
@GET("topher/2017/May/59121517_baking/baking.json")
Observable<List<RecipeResponse>> getRecipes();
}
|
[
"nuhkocaa@gmail.com"
] |
nuhkocaa@gmail.com
|
435727da008727cda1d51cf5cd355be49777ab2c
|
19f7e40c448029530d191a262e5215571382bf9f
|
/decompiled/instagram/sources/com/facebook/cameracore/mediapipeline/dataproviders/recognitiontracking/interfaces/RecognitionTrackingDataProviderConfiguration.java
|
4cfa1c6345c4618830fc6ef5edf82e58d01ec890
|
[] |
no_license
|
stanvanrooy/decompiled-instagram
|
c1fb553c52e98fd82784a3a8a17abab43b0f52eb
|
3091a40af7accf6c0a80b9dda608471d503c4d78
|
refs/heads/master
| 2022-12-07T22:31:43.155086
| 2020-08-26T03:42:04
| 2020-08-26T03:42:04
| 283,347,288
| 18
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,546
|
java
|
package com.facebook.cameracore.mediapipeline.dataproviders.recognitiontracking.interfaces;
import com.google.common.collect.ImmutableList;
import java.util.List;
import p000X.C30466Dcr;
public class RecognitionTrackingDataProviderConfiguration {
public List mRecognizerCreators;
public int mThreadPriority;
public List mTrackerCreators;
public ImmutableList getRecognizerCreators() {
return ImmutableList.A09(this.mRecognizerCreators);
}
public ImmutableList getTrackerCreators() {
return ImmutableList.A09(this.mTrackerCreators);
}
public void updateTargetRecognizerNetPath(String str, String str2, String str3, String str4) {
for (IRecognizerCreator iRecognizerCreator : this.mRecognizerCreators) {
if (iRecognizerCreator.getRecognizerCreatorType() == C30466Dcr.A01) {
TargetRecognizerCreator targetRecognizerCreator = (TargetRecognizerCreator) iRecognizerCreator;
targetRecognizerCreator.mExecNetPath = str;
targetRecognizerCreator.mPredictNetPath = str2;
targetRecognizerCreator.mDetectionExecNetPath = str3;
targetRecognizerCreator.mDetectionPredictNetPath = str4;
}
}
}
public RecognitionTrackingDataProviderConfiguration(List list, List list2, int i) {
this.mRecognizerCreators = list;
this.mTrackerCreators = list2;
this.mThreadPriority = i;
}
public int getThreadPriority() {
return this.mThreadPriority;
}
}
|
[
"stan@rooy.works"
] |
stan@rooy.works
|
d69a9537827c13f13261453e0ca0f72165a19264
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/12/12_05f09a924dbd0a102a795b3eded149f79256ab09/CharacterDatabaseActivity/12_05f09a924dbd0a102a795b3eded149f79256ab09_CharacterDatabaseActivity_s.java
|
976b98d05ccfc8542274fac6fe319de7bac3f52f
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,982
|
java
|
package com.example.myfirstapp;
import java.util.List;
import com.example.myfirstapp.R;
import android.app.ListActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
public class CharacterDatabaseActivity extends ListActivity{
private CharacterDataSource datasource;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
datasource = new CharacterDataSource(this);
datasource.open();
List<Character> values = datasource.getAllCharacters();
// Use the SimpleCursorAdapter to show the
// elements in a ListView
ArrayAdapter<Character> adapter = new ArrayAdapter<Character>(this,
android.R.layout.simple_list_item_1, values);
setListAdapter(adapter);
}
// Will be called via the onClick attribute
// of the buttons in main.xml
public void onClick(View view) {
@SuppressWarnings("unchecked")
ArrayAdapter<Character> adapter = (ArrayAdapter<Character>) getListAdapter();
// Character character = datasource.createCharacter("Danny McSizzle");
// adapter.add(character);
/*switch (view.getId()) {
case R.id.add:
String[] comments = new String[] { "Cool", "Very nice", "Hate it" };
int nextInt = new Random().nextInt(3);
// Save the new comment to the database
comment = datasource.createComment(comments[nextInt]);
adapter.add(comment);
break;
case R.id.delete:
if (getListAdapter().getCount() > 0) {
comment = (Comment) getListAdapter().getItem(0);
datasource.deleteComment(comment);
adapter.remove(comment);
}
break;
}*/
adapter.notifyDataSetChanged();
}
@Override
protected void onResume() {
datasource.open();
super.onResume();
}
@Override
protected void onPause() {
datasource.close();
super.onPause();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
3df180d5f3671547e22146fd77107cbdc3f0aa60
|
abe96460ebf3ab464949d6f62fcace0ad16efefd
|
/runescape-client/src/main/java/osrs/DualNode.java
|
c1974ba3e504aa2a526d823fc9b0680b0ee64eb1
|
[] |
no_license
|
Dabalon/MeteorLite
|
2e2b05efa34eeb465faf5009f2fcf11d35fb07e5
|
9b8e6ed5f9e26ad9c9de52880fd623b6f0f1ba0d
|
refs/heads/main
| 2023-07-16T05:10:29.209935
| 2021-08-25T11:25:03
| 2021-08-25T11:25:03
| 397,429,013
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 846
|
java
|
package osrs;
import net.runelite.mapping.Export;
import net.runelite.mapping.Implements;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
@ObfuscatedName("mc")
@Implements("DualNode")
public class DualNode extends Node {
@ObfuscatedName("cm")
@Export("keyDual")
public long keyDual;
@ObfuscatedName("cy")
@ObfuscatedSignature(
descriptor = "Lmc;"
)
@Export("previousDual")
public DualNode previousDual;
@ObfuscatedName("cp")
@ObfuscatedSignature(
descriptor = "Lmc;"
)
@Export("nextDual")
public DualNode nextDual;
@ObfuscatedName("dn")
@Export("removeDual")
public void removeDual() {
if (this.nextDual != null) {
this.nextDual.previousDual = this.previousDual;
this.previousDual.nextDual = this.nextDual;
this.previousDual = null;
this.nextDual = null;
}
}
}
|
[
"therealnull@gmail.com"
] |
therealnull@gmail.com
|
973b0e6e0596e6b55d3cba9e63e33eaf73c064c0
|
839f3a4218cd26a6e80f9c9e5b5fdf45e74d7f5e
|
/src/by/it/voronovich/JD01_06/Main.java
|
88f6b77c80e46c7e1e313a31c8259d771541eb25
|
[] |
no_license
|
du4/JD2016-08-22
|
a10fb3b268c46e52a8c4003bd9bba1622bfa3ca1
|
9c594c48deef622754483d088ee326b89526ecd1
|
refs/heads/master
| 2021-01-15T16:36:45.135865
| 2016-11-09T08:13:36
| 2016-11-09T08:13:36
| 68,627,723
| 0
| 2
| null | 2016-09-19T17:09:30
| 2016-09-19T17:09:29
| null |
UTF-8
|
Java
| false
| false
| 995
|
java
|
package by.it.voronovich.JD01_06;
/**
* Класс запускает методы и выдает результат
*
* @author Voronovich Dmitry
* @version 1.0
*/
public class Main {
public static void main(String[] args) {
System.out.println("Задание 1А: ");
TaskA1.a1();
System.out.println(" ");
System.out.println("Задание 2А: ");
TaskA2.a2();
System.out.println(" ");
System.out.println("Задание 3А: ");
TaskA3.a3();
System.out.println(" ");
System.out.println("Задание 1B: ");
TaskB1.b1();
System.out.println(" ");
System.out.println("Задание 2B: ");
TaskB2.b2();
System.out.println(" ");
System.out.println("Задание 3B: ");
TaskB3.b3("e");
System.out.println(" ");
System.out.println("Задание 3C: ");
TaskC1.c1();
System.out.println(" ");
}
}
|
[
"dd.versus@gmail.com"
] |
dd.versus@gmail.com
|
bdaa9bea5711d245f7714a0464c76fae292a53ae
|
012af20870157a3c84623e09eadf636b1c3b793b
|
/javautils/src/main/java/ipsk/util/debug/WindowDebug.java
|
b5aa8f8e8d0953e954f07780fe8d9c506085d032
|
[] |
no_license
|
naseem91/SpeechRecorderSBT
|
77c7e129676ffe39da28cc39e1ddc4bb3cfc6407
|
002fd9fb341ca162495c274da94d0e348a283b52
|
refs/heads/master
| 2020-03-19T18:36:42.967724
| 2018-06-10T14:51:30
| 2018-06-10T14:51:30
| 136,816,898
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,463
|
java
|
// IPS Java Utils
// (c) Copyright 2012
// Institute of Phonetics and Speech Processing,
// Ludwig-Maximilians-University, Munich, Germany
//
//
// This file is part of IPS Java Utils
//
//
// IPS Java Utils is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, version 3 of the License.
//
// IPS Java Utils is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with IPS Java Utils. If not, see <http://www.gnu.org/licenses/>.
package ipsk.util.debug;
import java.awt.Window;
/**
* @author klausj
*
*/
public class WindowDebug {
private static void printRecursiveWindows(Window[] ws,int level){
for(Window cw:ws){
System.out.println("Level "+level+" window:"+cw);
printRecursiveWindows(cw.getOwnedWindows(), level+1);
}
}
public static void printWindows(){
// see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4387314
System.out.println("Windows:");
printRecursiveWindows(Window.getWindows(),0);
}
}
|
[
"naseemmahasneh1991@gmail.com"
] |
naseemmahasneh1991@gmail.com
|
90752b017959ac7b1cfdae204967e2d8e330977c
|
cef1151d3111b3746036f30756582ed3b3dfb776
|
/src/test/java/com/school/app/domain/BusRouteNameTest.java
|
d369ded9ee046596ae63088796f92a79a8e262bd
|
[] |
no_license
|
pachapavan/schoolRepository
|
1e74f23e34fee3785a19c32786b4cc3fa653e953
|
05bedc94a583907b9707645b85c281062de518bd
|
refs/heads/master
| 2022-04-29T19:14:40.615162
| 2020-03-13T15:36:41
| 2020-03-13T15:36:41
| 246,538,053
| 0
| 0
| null | 2022-03-08T21:18:37
| 2020-03-11T10:11:48
|
Java
|
UTF-8
|
Java
| false
| false
| 776
|
java
|
package com.school.app.domain;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
import com.school.app.web.rest.TestUtil;
public class BusRouteNameTest {
@Test
public void equalsVerifier() throws Exception {
TestUtil.equalsVerifier(BusRouteName.class);
BusRouteName busRouteName1 = new BusRouteName();
busRouteName1.setId(1L);
BusRouteName busRouteName2 = new BusRouteName();
busRouteName2.setId(busRouteName1.getId());
assertThat(busRouteName1).isEqualTo(busRouteName2);
busRouteName2.setId(2L);
assertThat(busRouteName1).isNotEqualTo(busRouteName2);
busRouteName1.setId(null);
assertThat(busRouteName1).isNotEqualTo(busRouteName2);
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
d0d4f4e22a23850eb2b620b123e56f74f8d93f03
|
1e3b5f41cc9efed1bddab86855e8195a21316544
|
/library/src/main/java/ch/so/agi/avgbs2mtab/mutdat/ParcelContainer.java
|
952141e7c28966395cb35cc5f7a733f13838604f
|
[
"MIT"
] |
permissive
|
sogis/avgbs2mtab-web-service
|
2b8f3e5db2542b35732eca87ab8a2fca03ead1d2
|
43458ce72475ff024bbf3cf9dafe4661603f64d1
|
refs/heads/master
| 2022-07-30T01:40:20.505139
| 2022-07-13T11:30:52
| 2022-07-13T11:30:52
| 101,090,975
| 1
| 0
|
MIT
| 2022-06-28T13:48:28
| 2017-08-22T17:41:04
|
Java
|
UTF-8
|
Java
| false
| false
| 5,231
|
java
|
package ch.so.agi.avgbs2mtab.mutdat;
import java.util.*;
/**
*
*/
public class ParcelContainer implements SetParcel, MetadataOfParcelMutation, DataExtractionParcel {
Map<String,Map> mainParcelMap = new Hashtable<>(); //The main parcel-map.
Map<String,Integer> parcelNewAreaMap = new Hashtable<>(); //Map contains the new area of a parcel.
Map<String,Integer> parcelRemainingAreaMap = new Hashtable<>(); //Map contains the remaining-area of a Parcel (Diagonale).
Map<String,Integer> parcelRoundingDifferenceMap = new Hashtable<>(); //Map contains the roundingdifference.
///////////////////////////////////////////////
// SET-Methoden //////////////////////////////
//////////////////////////////////////////////
@Override
public void setParcelAddition(String newparcelnumber, String oldparcelnumber, int area) {
Map<String,Integer> parcelmap = mainParcelMap.get(newparcelnumber);
if(parcelmap == null){
parcelmap = new Hashtable<String, Integer>();
mainParcelMap.put(newparcelnumber, parcelmap);
}
parcelmap.put(oldparcelnumber, area);
}
@Override
public void setParcelNewArea(String newparcelnumber, int newarea) {
parcelNewAreaMap.put(newparcelnumber,newarea);
}
@Override
public void setParcelOldArea(String oldparcelnumber, int oldarea) {
parcelRemainingAreaMap.put(oldparcelnumber,oldarea);
}
@Override
public void delParcelOldArea(String oldparcelnumber) {
parcelRemainingAreaMap.remove(oldparcelnumber);
}
@Override
public void setParcelRoundingDifference(String parcel, int roundingdifference) {
parcelRoundingDifferenceMap.put(parcel,roundingdifference);
}
////////////////////////////////////
//GET-Methoden ///////////////////
///////////////////////////////////
@Override
public List<String> getOrderedListOfOldParcelNumbers() {
List<String> oldparcelnumbers = new ArrayList<>();
//Add all parcelnumbers in the inner-mainDprMap from the main mainDprMap to the oldparcelmap
for(String key : mainParcelMap.keySet()) {
Map internalmap = mainParcelMap.get(key);
for(Object keyoldparcels : internalmap.keySet()) {
if(!oldparcelnumbers.contains(keyoldparcels)) {
oldparcelnumbers.add((String) keyoldparcels);
}
}
}
//Add also all parcelnumbers from parcelRemainingAreaMap to the oldparcelmap
List<Integer> oldParcelNumbersAsInteger = new ArrayList<>();
List<String> oldParcelNumbersAsString = new ArrayList<>();
for(String key : parcelRemainingAreaMap.keySet()) {
if(!oldparcelnumbers.contains(key)) {
oldparcelnumbers.add(key);
}
}
for (String parcelNumberAsString : oldparcelnumbers)
oldParcelNumbersAsInteger.add(Integer.valueOf(parcelNumberAsString));
Collections.sort(oldParcelNumbersAsInteger);
for (Integer parcelNumberAsInteger : oldParcelNumbersAsInteger)
oldParcelNumbersAsString.add(Integer.toString(parcelNumberAsInteger));
return oldParcelNumbersAsString;
}
@Override
public List<String> getOrderedListOfNewParcelNumbers() {
List<String> newparcelnumbers = new ArrayList<>(parcelNewAreaMap.keySet());
List<Integer> newParcelNumbersAsInteger = new ArrayList<>();
List<String> newParcelNumbersAsString = new ArrayList<>();
for (String parcelNumberAsString : newparcelnumbers)
newParcelNumbersAsInteger.add(Integer.valueOf(parcelNumberAsString));
Collections.sort(newParcelNumbersAsInteger);
for (Integer parcelNumberAsInteger : newParcelNumbersAsInteger)
newParcelNumbersAsString.add(String.valueOf(parcelNumberAsInteger));
return newParcelNumbersAsString;
}
@Override
public Integer getAddedArea(String newparcel, String oldparcel) {
Map addmap = mainParcelMap.get(newparcel);
Integer areaadded = null; //Etwas unglücklich, aber bisher unvermeidlich!
if (addmap!=null) {
areaadded = (Integer) addmap.get(oldparcel);
}
return areaadded;
}
@Override
public Integer getNewArea(String newParcelNumber) {
Integer newarea = parcelNewAreaMap.get(newParcelNumber);
return newarea;
}
@Override
public Integer getRoundingDifference(String oldParcelNumber) {
Integer roundingdifference = parcelRoundingDifferenceMap.get(oldParcelNumber);
return roundingdifference;
}
@Override
public Integer getNumberOfOldParcels() {
Integer numberofoldparcels = getOrderedListOfOldParcelNumbers().size();
return numberofoldparcels;
}
@Override
public Integer getNumberOfNewParcels() {
Integer numberofnewparcels = getOrderedListOfNewParcelNumbers().size();
return numberofnewparcels;
}
@Override
public Integer getRestAreaOfParcel(String oldParcelNumber) {
Integer restarea = parcelRemainingAreaMap.get(oldParcelNumber);
return restarea;
}
}
|
[
"edi.gonzales@gmail.com"
] |
edi.gonzales@gmail.com
|
db0cf812b1b1e43e05b608663af6b845e3bb2a1f
|
e24c6c940689c19fdcc2e39dd80a5061e0b0b326
|
/org.eclipse.emf.refactor.refactorings.uml24.henshin/src/org/eclipse/emf/refactor/refactorings/uml24/removeunusedinterface/RefactoringDataManagement.java
|
59d239c3c382ff044e8ca489ab706d24bc15f4b6
|
[] |
no_license
|
ambrusthomas/MeDeR.refactor.examples
|
63cf443045be9907d237d543db3df93e93175752
|
66a35d6f9b2924f7c1172c0fff857badd0e41b8e
|
refs/heads/master
| 2021-01-22T19:09:18.404936
| 2017-03-29T16:24:23
| 2017-03-29T16:24:23
| 85,169,831
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,494
|
java
|
/**
* <copyright>
* </copyright>
*
* $Id: RefactoringDataManagementHenshin.javajet,v 1.1 2010/07/15 13:09:58 tarendt Exp $
*/
package org.eclipse.emf.refactor.refactorings.uml24.removeunusedinterface;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.refactor.refactoring.core.Port;
import org.eclipse.emf.refactor.refactoring.henshin.interfaces.IHenshinDataManagement;
import org.eclipse.emf.refactor.refactoring.henshin.interfaces.IHenshinInformation;
import org.eclipse.emf.refactor.refactoring.runtime.DataManagementAdapter;
/**
* Class for specific data concerning a model refactoring.
* @generated
*/
public class RefactoringDataManagement extends DataManagementAdapter
implements IHenshinDataManagement {
private final String SELECTEDEOBJECT = "selectedEObject";
/**
* HenshinInformation object used for checking the initial
* conditions of the EMF model refactoring.
* @generated
*/
private RefactoringInformation initialConditionsInformation =
new RefactoringInformation(this);
/**
* HenshinInformation object used for checking the final
* conditions of the EMF model refactoring.
* @generated
*/
private RefactoringInformation finalConditionsInformation =
new RefactoringInformation(this);
/**
* HenshinInformation object used for executing the EMF
* model refactoring.
* @generated
*/
private RefactoringInformation createChangeInformation =
new RefactoringInformation(this);
/**
* Default constructor.
* @generated
*/
public RefactoringDataManagement() {
this.addPorts();
this.addInformation();
}
/**
* Adds the ports to the data management used for parameter passing.
* @generated
*/
private void addPorts(){
this.inPorts.add
(new Port<org.eclipse.uml2.uml.Interface>
(SELECTEDEOBJECT, org.eclipse.uml2.uml.Interface.class));
}
/**
* Adds the Henshin informations to the data management.
* @generated
*/
private void addInformation() {
this.initialConditionsInformation.
setTransformationFileName("remove_unused_interface_initial");
this.createChangeInformation.
setTransformationFileName("remove_unused_interface_execute");
}
/**
* @see org.eclipse.emf.refactor.henshin.core.IHenshinDataManagement#
* getCreateChangeHenshinInformation()
* @generated
*/
@Override
public IHenshinInformation getCreateChangeHenshinInformation() {
return this.createChangeInformation;
}
/**
* @see org.eclipse.emf.refactor.henshin.core.IHenshinDataManagement#
* getFinalConditionsHenshinInformation()
* @generated
*/
@Override
public IHenshinInformation getFinalConditionsHenshinInformation() {
return this.finalConditionsInformation;
}
/**
* @see org.eclipse.emf.refactor.henshin.core.IHenshinDataManagement#
* getInitialConditionsHenshinInformation()
* @generated
*/
@Override
public IHenshinInformation getInitialConditionsHenshinInformation() {
return this.initialConditionsInformation;
}
/**
* @see org.eclipse.emf.refactor.common.core.IDataManagement#
* preselect(java.util.List)
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void preselect(List<EObject> selection) {
getInPortByName(SELECTEDEOBJECT).
setValue((org.eclipse.uml2.uml.Interface) selection.get(0));
}
}
|
[
"tarendt"
] |
tarendt
|
7f6bda9f23c085783d8fa1ed68946d1bb37efcc6
|
2bc2eadc9b0f70d6d1286ef474902466988a880f
|
/tags/mule-1.3-rc1/providers/soap/src/main/java/org/mule/providers/soap/ServiceProxy.java
|
ad91adad99b9551af2aea84097fa5bf54e4efbd3
|
[
"LicenseRef-scancode-symphonysoft",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
OrgSmells/codehaus-mule-git
|
085434a4b7781a5def2b9b4e37396081eaeba394
|
f8584627c7acb13efdf3276396015439ea6a0721
|
refs/heads/master
| 2022-12-24T07:33:30.190368
| 2020-02-27T19:10:29
| 2020-02-27T19:10:29
| 243,593,543
| 0
| 0
| null | 2022-12-15T23:30:00
| 2020-02-27T18:56:48
| null |
UTF-8
|
Java
| false
| false
| 3,140
|
java
|
/*
* $Header$
* $Revision$
* $Date$
* ------------------------------------------------------------------------------------------------------
*
* Copyright (c) SymphonySoft Limited. All rights reserved.
* http://www.symphonysoft.com
*
* The software in this package is published under the terms of the BSD
* style license a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.mule.providers.soap;
import org.mule.umo.UMOComponent;
import org.mule.umo.UMOException;
import org.mule.umo.lifecycle.Callable;
import org.mule.util.ClassHelper;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* <code>ServiceProxy</code> is a proxy that wraps a soap endpointUri to look
* like a Web service.
*
* Also provides helper methods for building and describing web service
* interfaces in Mule.
*
* @author <a href="mailto:ross.mason@symphonysoft.com">Ross Mason</a>
* @version $Revision$
*/
public class ServiceProxy
{
public static Class[] getInterfacesForComponent(UMOComponent component) throws UMOException, ClassNotFoundException
{
Class[] interfaces = new Class[0];
List ifaces = (List) component.getDescriptor().getProperties().get("serviceInterfaces");
if (ifaces == null || ifaces.size() == 0) {
interfaces = component.getDescriptor().getImplementationClass().getInterfaces();
} else {
interfaces = new Class[ifaces.size()];
for (int i = 0; i < ifaces.size(); i++) {
String iface = (String) ifaces.get(i);
interfaces[i] = ClassHelper.loadClass(iface, ServiceProxy.class);
}
}
interfaces = removeInterface(interfaces, Callable.class);
return interfaces;
}
public static Class[] removeInterface(Class[] interfaces, Class iface)
{
if (interfaces == null)
return null;
List results = new ArrayList();
for (int i = 0; i < interfaces.length; i++) {
Class anInterface = interfaces[i];
if (!anInterface.equals(iface)) {
results.add(anInterface);
}
}
Class[] arResults = new Class[results.size()];
if (arResults.length == 0) {
return arResults;
} else {
results.toArray(arResults);
return arResults;
}
}
public static Method[] getMethods(Class[] interfaces)
{
List methodNames = new ArrayList();
for (int i = 0; i < interfaces.length; i++) {
methodNames.addAll(Arrays.asList(interfaces[i].getMethods()));
}
Method[] results = new Method[methodNames.size()];
return (Method[]) methodNames.toArray(results);
}
public static String[] getMethodNames(Class[] interfaces)
{
Method[] methods = getMethods(interfaces);
String[] results = new String[methods.length];
for (int i = 0; i < results.length; i++) {
results[i] = methods[i].getName();
}
return results;
}
}
|
[
"(no author)@bf997673-6b11-0410-b953-e057580c5b09"
] |
(no author)@bf997673-6b11-0410-b953-e057580c5b09
|
57a0333fac3b8ce3de6890c4d1061659de162503
|
e68bbc077e62033e90d15886f4a858e2eaf5bf78
|
/chapter_28/src/ForkJoinDemo.java
|
85c520f9f27821b02c6ec553724cda368776e120
|
[] |
no_license
|
datadiskpfv/java_reference
|
eba22583c3e5298040015898174fe0b84fa48b76
|
8ec37dc0e4447a046e0d4b5dedbff897cd093fe7
|
refs/heads/master
| 2021-01-19T16:35:22.383117
| 2017-07-08T16:44:59
| 2017-07-08T16:44:59
| 88,274,962
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,522
|
java
|
import java.util.concurrent.*;
/**
* Created by vallep on 17/06/2017.
*
*/
class SqrtTransform extends RecursiveAction {
final int seqThreshold = 1000;
double[] data;
int start, end;
SqrtTransform(double[] vals, int s, int e) {
data = vals;
start = s;
end = e;
}
protected void compute() {
if((end - start) < seqThreshold) {
for (int i = start ; i < end ; i++) {
data[i] = Math.sqrt(data[i]);
}
} else {
int middle = (start + end) / 2;
invokeAll(new SqrtTransform(data, start, middle),
new SqrtTransform(data, middle, end));
}
}
}
public class ForkJoinDemo {
public static void main(String[] args) {
//ForkJoinPool fjp = new ForkJoinPool();
double[] nums = new double[100000];
for (int i = 0; i < nums.length; i++)
nums[i] = (double) i;
System.out.println("A portion of the original sequence:");
for (int i = 0; i < 10; i++)
System.out.print(nums[i] + " ");
System.out.println("\n");
SqrtTransform task = new SqrtTransform(nums, 0, nums.length);
//fjp.invoke(task);
// use the common pool
task.invoke();
System.out.println("A portion of the transformed sequence (to four decimal places):");
for (int i = 0; i < 10; i++) {
System.out.format("%.4f ", nums[i]);
}
System.out.println();
}
}
|
[
"paul.valle@datadisk.co.uk"
] |
paul.valle@datadisk.co.uk
|
a2fc0ee9519254f0d7a5fef408b20d9d1ccfb212
|
7b40d383ff3c5d51c6bebf4d327c3c564eb81801
|
/src/com/facebook/internal/LikeActionController$CreateLikeActionControllerWorkItem.java
|
1041629d879bdb815bc3fa62490c8f950c8f3cb2
|
[] |
no_license
|
reverseengineeringer/com.yik.yak
|
d5de3a0aea7763b43fd5e735d34759f956667990
|
76717e41dab0b179aa27f423fc559bbfb70e5311
|
refs/heads/master
| 2021-01-20T09:41:04.877038
| 2015-07-16T16:44:44
| 2015-07-16T16:44:44
| 38,577,543
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 689
|
java
|
package com.facebook.internal;
class LikeActionController$CreateLikeActionControllerWorkItem
implements Runnable
{
private LikeActionController.CreationCallback callback;
private String objectId;
LikeActionController$CreateLikeActionControllerWorkItem(String paramString, LikeActionController.CreationCallback paramCreationCallback)
{
objectId = paramString;
callback = paramCreationCallback;
}
public void run()
{
LikeActionController.access$3000(objectId, callback);
}
}
/* Location:
* Qualified Name: com.facebook.internal.LikeActionController.CreateLikeActionControllerWorkItem
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
69339c089a5ace357479142a5ef0d757298c95ea
|
5122a4619b344c36bfc969283076c12419f198ea
|
/src/test/java/com/snapwiz/selenium/tests/staf/AppiumLearningspaces/apphelper/Screenshot.java
|
0f47b5c55b43002eb3a0b0278d7be5d50741c511
|
[] |
no_license
|
mukesh89m/automation
|
0c1e8ff4e38e8e371cc121e64aacc6dc91915d3a
|
a0b4c939204af946cf7ca7954097660b2a0dfa8d
|
refs/heads/master
| 2020-05-18T15:30:22.681006
| 2018-06-09T15:14:11
| 2018-06-09T15:14:11
| 32,666,214
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,939
|
java
|
package com.snapwiz.selenium.tests.staf.AppiumLearningspaces.apphelper;
import java.io.File;
import java.sql.Timestamp;
import org.apache.commons.io.FileUtils;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.Augmenter;
import org.testng.Assert;
import com.snapwiz.selenium.tests.staf.AppiumLearningspaces.Config;
import com.snapwiz.selenium.tests.staf.AppiumLearningspaces.Driver;
public class Screenshot {
public void captureScreenshotFromAppHelper()
{
try
{
File scrFile;
WebDriver augmentedDriver;
String className = new Exception().getStackTrace()[2].getClassName().substring(57);
String methodName = new Exception().getStackTrace()[2].getMethodName();
java.util.Date date= new java.util.Date();
String datetime = new Timestamp(date.getTime()).toString();
datetime = datetime.replaceAll("\\:", "-");
datetime = datetime.replaceAll("\\.", "-");
if(Config.browser.equals("chrome"))
{
augmentedDriver = new Augmenter().augment(Driver.driver);
scrFile = ((TakesScreenshot)augmentedDriver).getScreenshotAs(OutputType.FILE);
}
else
scrFile = ((TakesScreenshot)Driver.driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File("/home/screenshot/"+className+"_"+methodName+"_"+datetime+".png"));
}
catch(Exception e)
{
Assert.fail("Exception while capturing screen shot",e);
}
}
public void captureScreenshotFromTestCase()
{
try
{
File scrFile;
WebDriver augmentedDriver;
String className = new Exception().getStackTrace()[1].getClassName().substring(57);
String methodName = new Exception().getStackTrace()[1].getMethodName();
java.util.Date date= new java.util.Date();
String datetime = new Timestamp(date.getTime()).toString();
datetime = datetime.replaceAll("\\:", "-");
datetime = datetime.replaceAll("\\.", "-");
if(Config.browser.equals("chrome"))
{
augmentedDriver = new Augmenter().augment(Driver.driver);
scrFile = ((TakesScreenshot)augmentedDriver).getScreenshotAs(OutputType.FILE);
}
else
scrFile = ((TakesScreenshot)Driver.driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File("/home/screenshot/"+className+"_"+methodName+"_"+datetime+"_"+Config.browser+".png"));
}
catch(Exception e)
{
Assert.fail("Exception while capturing screen shot",e);
}
}
}
|
[
"mukesh.mandal@github.com"
] |
mukesh.mandal@github.com
|
7aceeec1724c31e0ebf3225d0ad28d626080bc9a
|
0b2997c4c7ee3e82b35432fc8fbf7b6bdb80c879
|
/src/main/java/org/mfusco/fromgoftolambda/talk/interpreter/InterpreterGof.java
|
c064c000afbbf062cac09b2eb4b96c331bb3a427
|
[] |
no_license
|
dabos/from-gof-to-lambda
|
7d7f5f7033f4fd7b946cdaf6bba18c5ca5ed304d
|
c6622b565810e0d3c55a6cf391352a29d59aca4a
|
refs/heads/master
| 2020-04-04T22:51:34.911488
| 2016-04-13T18:02:34
| 2016-04-13T18:02:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,245
|
java
|
package org.mfusco.fromgoftolambda.talk.interpreter;
import java.util.Stack;
public class InterpreterGof {
interface Expression {
int interpret();
}
public static class Add implements Expression{
private final Expression leftExpression;
private final Expression rightExpression;
public Add(Expression leftExpression,Expression rightExpression ){
this.leftExpression = leftExpression;
this.rightExpression = rightExpression;
}
@Override
public int interpret() {
return leftExpression.interpret() + rightExpression.interpret();
}
}
public static class Subtract implements Expression{
private final Expression leftExpression;
private final Expression rightExpression;
public Subtract(Expression leftExpression,Expression rightExpression ){
this.leftExpression = leftExpression;
this.rightExpression = rightExpression;
}
@Override
public int interpret() {
return leftExpression.interpret() - rightExpression.interpret();
}
}
public static class Product implements Expression{
private final Expression leftExpression;
private final Expression rightExpression;
public Product(Expression leftExpression,Expression rightExpression ){
this.leftExpression = leftExpression;
this.rightExpression = rightExpression;
}
@Override
public int interpret() {
return leftExpression.interpret() * rightExpression.interpret();
}
}
public static class Number implements Expression {
private final int n;
public Number(int n){
this.n = n;
}
@Override
public int interpret() {
return n;
}
}
public static boolean isOperator(String s) {
if (s.equals("+") || s.equals("-") || s.equals("*"))
return true;
else
return false;
}
public static Expression getOperator(String s, Expression left, Expression right) {
switch (s) {
case "+":
return new Add(left, right);
case "-":
return new Subtract(left, right);
case "*":
return new Product(left, right);
}
return null;
}
public static int evaluate(String expression) {
Stack<Expression> stack = new Stack<>();
for (String s : expression.split(" ")) {
if (isOperator(s)) {
Expression rightExpression = stack.pop();
Expression leftExpression = stack.pop();
Expression operator = getOperator(s, leftExpression, rightExpression);
int result = operator.interpret();
stack.push(new Number(result));
} else {
Expression i = new Number(Integer.parseInt(s));
stack.push(i);
}
}
return stack.pop().interpret();
}
public static void main( String[] args ) {
String expression = "7 3 - 2 1 + *";
System.out.println( evaluate( expression ) );
}
}
|
[
"mario.fusco@gmail.com"
] |
mario.fusco@gmail.com
|
8d9bbda823ef05d085dd202cb903bcc9284bc5aa
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-ws/results/XWIKI-13457-17-8-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/web/ExportAction_ESTest_scaffolding.java
|
0cbf84a9aac241744ba8d0b5062598f4d8e8e087
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 434
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Tue Mar 31 03:15:11 UTC 2020
*/
package com.xpn.xwiki.web;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class ExportAction_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
6deb9ef4a1cae3e04656f5c821f12d5b5b74a1c4
|
6a7823d3798414271b1243c1b87715e3ca460a05
|
/src/com/demo/leetcode/FirstUniqueCharacterinaString.java
|
6aba6a748f021169e9718cc35611642234f1578b
|
[] |
no_license
|
shuangxiwu/Data_Structure
|
0ddf1919e1cb148554d2841c774cc5a35f2e980f
|
774ed47972690b338fb979db76a8e48db98361d3
|
refs/heads/master
| 2020-05-25T12:13:30.443902
| 2019-05-12T04:43:54
| 2019-05-12T04:43:54
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 600
|
java
|
package com.demo.leetcode;
public class FirstUniqueCharacterinaString {
/**
* 给定一个字符串,找到它的第一个不重复的字符,并返回它的索引。如果不存在,则返回 -1。
案例:
s = "leetcode"
返回 0.
s = "loveleetcode",
返回 2.
*/
public int firstUniqChar(String s) {
//用一个数组存放每个字符出现的次数
int[] nums=new int[256];
for(int i=0;i<s.length();i++) {
nums[s.charAt(i)-'a']++;
}
for(int i=0;i<s.length();i++) {
if(nums[s.charAt(i)-'a']==1) {
return i;
}
}
return -1;
}
}
|
[
"2283613941@qq.com"
] |
2283613941@qq.com
|
1d2b6f9d559d2c2e220794f02af2b47e8bf3ba38
|
199d7f11bc6178a8ea240b5bf6e6e3092e50a214
|
/arquillian/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/RemoteInitialContextObserver.java
|
9932b03e26cef125032ff30e91a7f7974f24b81d
|
[
"BSD-3-Clause",
"W3C-19980720",
"CDDL-1.0",
"Apache-2.0",
"W3C",
"MIT"
] |
permissive
|
kdchamil/ASTomEE
|
31fc4478cc58351d98a298e5849d3a5a72e7ab6e
|
eaad273b8def8836bb2e82aab04c067662d2f67b
|
refs/heads/master
| 2023-01-13T07:31:53.989780
| 2014-08-07T06:52:32
| 2014-08-07T06:52:32
| 19,934,900
| 0
| 0
|
Apache-2.0
| 2023-01-02T22:04:23
| 2014-05-19T08:49:01
|
Java
|
UTF-8
|
Java
| false
| false
| 5,392
|
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.openejb.arquillian.common;
import org.jboss.arquillian.container.spi.client.protocol.metadata.HTTPContext;
import org.jboss.arquillian.container.spi.client.protocol.metadata.ProtocolMetaData;
import org.jboss.arquillian.core.api.Instance;
import org.jboss.arquillian.core.api.InstanceProducer;
import org.jboss.arquillian.core.api.annotation.ApplicationScoped;
import org.jboss.arquillian.core.api.annotation.Inject;
import org.jboss.arquillian.core.api.annotation.Observes;
import org.jboss.arquillian.test.spi.event.enrichment.BeforeEnrichment;
import javax.naming.Context;
import javax.naming.InitialContext;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.Arrays;
import java.util.Properties;
import java.util.concurrent.Callable;
public class RemoteInitialContextObserver {
private static final String REMOTE_INITIAL_CONTEXT_FACTORY = "org.apache.openejb.client.RemoteInitialContextFactory";
@Inject
@ApplicationScoped
private InstanceProducer<Context> context;
@Inject
private Instance<Context> existingContext;
@Inject
private Instance<ProtocolMetaData> protocolMetadata;
public void beforeSuite(@Observes final BeforeEnrichment event) {
final ProtocolMetaData metaData = protocolMetadata.get();
if(metaData == null || !metaData.hasContext(HTTPContext.class)) {
return;
}
try {
Thread.currentThread().getContextClassLoader().loadClass(REMOTE_INITIAL_CONTEXT_FACTORY);
final HTTPContext httpContext = metaData.getContexts(HTTPContext.class).iterator().next();
final Properties props = new Properties();
props.setProperty(Context.INITIAL_CONTEXT_FACTORY, REMOTE_INITIAL_CONTEXT_FACTORY);
props.setProperty(Context.PROVIDER_URL, "http://" + httpContext.getHost() + ":" + httpContext.getPort() + "/tomee/ejb");
Context existing = null;
try {
existing = existingContext.get();
} catch (Throwable t) {
// no-op
}
context.set((Context) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class<?>[]{ Context.class }, new MultipleContextHandler(props, existing)));
} catch (final ClassNotFoundException e) {
// no-op
}
}
private static class MultipleContextHandler implements InvocationHandler {
private final Context context;
private final Properties properties;
public MultipleContextHandler(final Properties props, final Context initialContexts) {
properties = props;
context = initialContexts;
}
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
Exception err = null;
for (final Callable<Context> callable : Arrays.asList( // order is important to avoid to start an embedded container for some cases
new Callable<Context>() { // then try to create a remote context
@Override
public Context call() throws Exception {
return new InitialContext(properties);
}
},
new Callable<Context>() { // then existing context
@Override
public Context call() throws Exception {
return context;
}
},
new Callable<Context>() { // then contextual context, this can start an embedded container in some cases
@Override
public Context call() throws Exception {
return new InitialContext();
}
}
)) {
try {
final Context ctx = callable.call();
if (ctx == null) {
continue;
}
return method.invoke(ctx, args);
} catch (final Exception e) {
err = e;
}
}
if (err != null) {
if (err instanceof InvocationTargetException) {
throw err.getCause();
}
throw err;
}
return null;
}
}
}
|
[
"kdchamil@gmail.com"
] |
kdchamil@gmail.com
|
30a9e89bfe50a420d4ee7ab7b709bbf0efa720bc
|
31e198531cad335afd17b661f28e8c5e336edd66
|
/src/com/kingdee/eas/st/common/template/app/STBillTemplateEditUIHandler.java
|
6b6709484e1bb8c9661ef4a28f000dea6be4bfc6
|
[] |
no_license
|
javaobjects/Project_0
|
2e17e4e400447b97a6a5f902fdaa9219c94ed66e
|
7009cce7d249051eb2c05219dca27de3adf1f48f
|
refs/heads/master
| 2020-09-29T14:47:48.373140
| 2020-01-15T09:13:49
| 2020-01-15T09:13:49
| 227,056,515
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 563
|
java
|
/**
* output package name
*/
package com.kingdee.eas.st.common.template.app;
import com.kingdee.bos.BOSException;
import com.kingdee.bos.Context;
import com.kingdee.eas.framework.batchHandler.RequestContext;
import com.kingdee.eas.framework.batchHandler.ResponseContext;
/**
* output class name
*/
public class STBillTemplateEditUIHandler extends
AbstractSTBillTemplateEditUIHandler {
protected void _handleInit(RequestContext request,
ResponseContext response, Context context) throws Exception {
super._handleInit(request, response, context);
}
}
|
[
"yanbo0039@yeah.net"
] |
yanbo0039@yeah.net
|
c6413f650e64da72ecd4fe796e034520569b3467
|
f2b6d20a53b6c5fb451914188e32ce932bdff831
|
/src/com/linkedin/android/feed/page/feed/unfolloweducate/UnfollowEducateFragment$3.java
|
73345feac71e6663479dbb09a44d66fb902a3a3e
|
[] |
no_license
|
reverseengineeringer/com.linkedin.android
|
08068c28267335a27a8571d53a706604b151faee
|
4e7235e12a1984915075f82b102420392223b44d
|
refs/heads/master
| 2021-04-09T11:30:00.434542
| 2016-07-21T03:54:43
| 2016-07-21T03:54:43
| 63,835,028
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 609
|
java
|
package com.linkedin.android.feed.page.feed.unfolloweducate;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
final class UnfollowEducateFragment$3
implements View.OnTouchListener
{
UnfollowEducateFragment$3(UnfollowEducateFragment paramUnfollowEducateFragment) {}
public final boolean onTouch(View paramView, MotionEvent paramMotionEvent)
{
return true;
}
}
/* Location:
* Qualified Name: com.linkedin.android.feed.page.feed.unfolloweducate.UnfollowEducateFragment.3
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
5e6ceef862148a3fb79ce8e1ba34dfed7fe14664
|
3ad0461f990d906ed812ab6fc705116d06436e22
|
/src/main/java/com/gb/gofpatterns/behavioural/visitor/hospital/Ward.java
|
ed1a799ec212a29b0be1dea23aad25fe5ef37a14
|
[
"Apache-2.0"
] |
permissive
|
gopalbala/gofpatterns
|
a1a4182e964dca0308b05e615d70941b9e083005
|
9e1fe1c03746385782cd46e8caed550fd10c24f8
|
refs/heads/master
| 2022-08-26T21:46:29.286956
| 2020-05-25T12:34:43
| 2020-05-25T12:34:43
| 260,482,254
| 6
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 145
|
java
|
package com.gb.gofpatterns.behavioural.visitor.hospital;
public interface Ward {
String name();
void accept(WardVisitor wardVisitor);
}
|
[
"balasubramaniangopalakrishnan@gmail.com"
] |
balasubramaniangopalakrishnan@gmail.com
|
7aad752680bf29dde52f5c6203dd3e571e785f61
|
eb7240bd1ab4bccdeca51a7d56bc7c948633467c
|
/maven/store1/src/main/java/com/itheima/dao/ProductDao.java
|
cb76d277c74760572e488647662f80b3a936952a
|
[] |
no_license
|
yp684320/sms
|
00890946d76d9d9d9c12eea3e58535222c25bbc5
|
9bc5a574db6436cefbeb57b4a4639907a16c613f
|
refs/heads/master
| 2020-05-03T13:31:59.839678
| 2019-03-31T06:37:14
| 2019-03-31T06:37:14
| 178,655,242
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 331
|
java
|
package com.itheima.dao;
import com.itheima.domain.Product;
import java.util.List;
public interface ProductDao {
List<Product> findHots();
List<Product> findNews();
Product findOne(String pid);
List<Product> findByPageWithCid(String cid, int pageNumber, int pageSize);
int findTotalByCid(String cid);
}
|
[
"naiba@example.com"
] |
naiba@example.com
|
c740ef5801a0cef0f21a8e6e0c4fa545841980e8
|
471a1d9598d792c18392ca1485bbb3b29d1165c5
|
/jadx-MFP/src/main/java/com/google/ads/interactivemedia/v3/internal/fh.java
|
baebb67c66a9f74e0a07b7cab111e29c01ab32ec
|
[] |
no_license
|
reed07/MyPreferencePal
|
84db3a93c114868dd3691217cc175a8675e5544f
|
365b42fcc5670844187ae61b8cbc02c542aa348e
|
refs/heads/master
| 2020-03-10T23:10:43.112303
| 2019-07-08T00:39:32
| 2019-07-08T00:39:32
| 129,635,379
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,650
|
java
|
package com.google.ads.interactivemedia.v3.internal;
import java.io.IOException;
/* compiled from: IMASDK */
public class fh {
private final fi a;
private final fm b;
private fj c;
private final int d = 940;
protected fh(fk fkVar, fm fmVar, long j, long j2, long j3, long j4, long j5, long j6, int i) {
this.b = fmVar;
fi fiVar = new fi(fkVar, j, 0, j3, 0, j5, 188);
this.a = fiVar;
}
public final fy a() {
return this.a;
}
public final void a(long j) {
long j2 = j;
fj fjVar = this.c;
if (fjVar == null || fjVar.d() != j2) {
fj fjVar2 = r1;
fj fjVar3 = new fj(j, this.a.b(j2), this.a.c, this.a.d, this.a.e, this.a.f, this.a.g);
this.c = fjVar2;
}
}
public final boolean b() {
return this.c != null;
}
public final int a(fr frVar, fx fxVar, ho hoVar) throws InterruptedException, IOException {
fm fmVar = (fm) qi.a(this.b);
while (true) {
fj fjVar = (fj) qi.a(this.c);
long b2 = fjVar.a();
long c2 = fjVar.b();
long d2 = fjVar.e();
if (c2 - b2 <= ((long) this.d)) {
a(false, b2);
return a(frVar, b2, fxVar);
} else if (!a(frVar, d2)) {
return a(frVar, d2, fxVar);
} else {
frVar.a();
fl a2 = fmVar.a(frVar, fjVar.c());
switch (a2.b) {
case -3:
a(false, d2);
return a(frVar, d2, fxVar);
case -2:
fjVar.a(a2.c, a2.d);
break;
case -1:
fjVar.b(a2.c, a2.d);
break;
case 0:
a(true, a2.d);
a(frVar, a2.d);
return a(frVar, a2.d, fxVar);
default:
throw new IllegalStateException("Invalid case");
}
}
}
}
private final void a(boolean z, long j) {
this.c = null;
this.b.a();
}
private static boolean a(fr frVar, long j) throws IOException, InterruptedException {
long c2 = j - frVar.c();
if (c2 < 0 || c2 > 262144) {
return false;
}
frVar.b((int) c2);
return true;
}
private static int a(fr frVar, long j, fx fxVar) {
if (j == frVar.c()) {
return 0;
}
fxVar.a = j;
return 1;
}
}
|
[
"anon@ymous.email"
] |
anon@ymous.email
|
9f0b8ad51abc40c2adb298548c16a8a34f30be15
|
ceeacb5157b67b43d40615daf5f017ae345816db
|
/generated/sdk/network/azure-resourcemanager-network-generated/src/main/java/com/azure/resourcemanager/network/generated/models/EffectiveRouteListResult.java
|
c956b9188cc9ac987d65a40e262764afc5f27cab
|
[
"LicenseRef-scancode-generic-cla"
] |
no_license
|
ChenTanyi/autorest.java
|
1dd9418566d6b932a407bf8db34b755fe536ed72
|
175f41c76955759ed42b1599241ecd876b87851f
|
refs/heads/ci
| 2021-12-25T20:39:30.473917
| 2021-11-07T17:23:04
| 2021-11-07T17:23:04
| 218,717,967
| 0
| 0
| null | 2020-11-18T14:14:34
| 2019-10-31T08:24:24
|
Java
|
UTF-8
|
Java
| false
| false
| 989
|
java
|
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.network.generated.models;
import com.azure.resourcemanager.network.generated.fluent.models.EffectiveRouteListResultInner;
import java.util.List;
/** An immutable client-side representation of EffectiveRouteListResult. */
public interface EffectiveRouteListResult {
/**
* Gets the value property: A list of effective routes.
*
* @return the value value.
*/
List<EffectiveRoute> value();
/**
* Gets the nextLink property: The URL to get the next set of results.
*
* @return the nextLink value.
*/
String nextLink();
/**
* Gets the inner com.azure.resourcemanager.network.generated.fluent.models.EffectiveRouteListResultInner object.
*
* @return the inner object.
*/
EffectiveRouteListResultInner innerModel();
}
|
[
"actions@github.com"
] |
actions@github.com
|
1d52dc9436d8a18a275ba1a5cd0e9189673b00f1
|
0cd8b6883135dc54372577b15e4f6d113838c0af
|
/sjk-stacktrace/src/main/java/org/gridkit/jvmtool/spi/parsers/JsonEventSource.java
|
32b37ce749d0f8e64c6fb305f2c8e9f84b7742b8
|
[
"Apache-2.0"
] |
permissive
|
swaraj/jvm-tools
|
561bc6061d6cc194c19390364cd1608962573a40
|
c88dff49a17971fe467632219874de14dc6612f3
|
refs/heads/master
| 2020-06-22T05:13:00.636355
| 2019-07-08T08:30:34
| 2019-07-08T09:52:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 238
|
java
|
package org.gridkit.jvmtool.spi.parsers;
import java.io.IOException;
import org.gridkit.jvmtool.util.json.JsonStreamWriter;
public interface JsonEventSource {
public boolean readNext(JsonStreamWriter writer) throws IOException;
}
|
[
"alexey.ragozin@gmail.com"
] |
alexey.ragozin@gmail.com
|
aa505bae7af0e69d0e8846656726964c69855635
|
97e0ef7649cfeb0a709c3e7980a4edaa624a5b11
|
/src/main/java/cryptobot/handler/Sha256Handler.java
|
1ae821030166be87cd4e72af30271a861c686dd0
|
[
"Apache-2.0"
] |
permissive
|
dianw/TheCryptoBot
|
cbb87f304175e5f39d43aa0503f3bfd4c9f01d9b
|
f4a7740f93fdb5dcc13135895f4dfe175cd43c6d
|
refs/heads/master
| 2020-07-07T23:23:12.771862
| 2016-09-15T04:34:24
| 2016-09-15T04:34:24
| 67,212,872
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 411
|
java
|
package cryptobot.handler;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import org.springframework.stereotype.Component;
@Component
public class Sha256Handler extends MessageDigestHandler {
public Sha256Handler() throws NoSuchAlgorithmException, NoSuchProviderException {
super("SHA-256");
}
@Override
public String command() {
return "/sha256";
}
}
|
[
"dian.aditya@meruvian.org"
] |
dian.aditya@meruvian.org
|
d150446bf34767d4e8d0c62c9a488260a82a7c35
|
fc4ec6b20510ece8d35bd4be349c242824542474
|
/RESTfulApp/app/src/main/java/com/sriram/restfulapp/LocationActivity.java
|
09b8a0debd2c4d55b4cc15243ac898fe49f3d2b6
|
[] |
no_license
|
srirambtechit/hackathon
|
5a2c59ebf5782360245e3e40817fc2c33d19533a
|
8371523dc0973fee4eec34d35da79438f7980f90
|
refs/heads/master
| 2020-04-13T16:45:19.879530
| 2016-09-22T00:30:33
| 2016-09-22T00:30:33
| 68,226,717
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,552
|
java
|
package com.sriram.restfulapp;
import android.Manifest;
import android.content.pm.PackageManager;
import android.location.Location;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.ActivityCompat;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.PendingResult;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.location.LocationListener;
import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.location.LocationServices;
import java.text.DateFormat;
import java.util.Date;
public class LocationActivity extends AppCompatActivity implements LocationListener, GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener {
private static final String TAG = "RestDebug";
private static final long INTERVAL = 1000 * 10;
private static final long FASTEST_INTERVAL = 1000 * 5;
private static final int MY_ACCESS_PERMISSION_LOCATION = 1;
Button btnFusedLocation;
TextView tvLocation;
LocationRequest mLocationRequest;
GoogleApiClient mGoogleApiClient;
Location mCurrentLocation;
String mLastUpdateTime;
protected void createLocationRequest() {
mLocationRequest = new LocationRequest();
mLocationRequest.setInterval(INTERVAL);
mLocationRequest.setFastestInterval(FASTEST_INTERVAL);
mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
}
private boolean isGooglePlayServicesAvailable() {
int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
if (ConnectionResult.SUCCESS == status) {
return true;
} else {
GooglePlayServicesUtil.getErrorDialog(status, this, 0).show();
return false;
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_location);
Log.d(TAG, "onCreate ...............................");
//show error dialog if GoolglePlayServices not available
if (!isGooglePlayServicesAvailable()) {
finish();
}
createLocationRequest();
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addApi(LocationServices.API)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build();
tvLocation = (TextView) findViewById(R.id.tvLocation);
btnFusedLocation = (Button) findViewById(R.id.btnShowLocation);
}
public void displayLocation(View view) {
updateUI();
}
@Override
public void onStart() {
super.onStart();
Log.d(TAG, "onStart fired ..............");
mGoogleApiClient.connect();
}
@Override
public void onStop() {
super.onStop();
Log.d(TAG, "onStop fired ..............");
mGoogleApiClient.disconnect();
Log.d(TAG, "isConnected ...............: " + mGoogleApiClient.isConnected());
}
@Override
public void onConnected(@Nullable Bundle bundle) {
Log.d(TAG, "onConnected - isConnected ...............: " + mGoogleApiClient.isConnected());
startLocationUpdates();
}
protected void startLocationUpdates() {
if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED
&& ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_COARSE_LOCATION) ||
ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION)) {
//If the user has denied the permission previously your code will come to this block
//Here you can explain why you need this permission
//Explain here why you need this permission
} else {
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION}, MY_ACCESS_PERMISSION_LOCATION);
}
return;
}
PendingResult<Status> pendingResult = LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, mLocationRequest, this);
Log.d(TAG, "Location update started ..............: ");
}
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions,
int[] grantResults) {
switch (requestCode) {
case MY_ACCESS_PERMISSION_LOCATION:
//If permission is granted
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
//Displaying a toast
Toast.makeText(this, "Permission granted now you can read the storage", Toast.LENGTH_LONG).show();
} else {
//Displaying another toast if permission is not granted
Toast.makeText(this, "Oops you just denied the permission", Toast.LENGTH_LONG).show();
}
break;
}
}
@Override
public void onConnectionSuspended(int i) {
Log.d(TAG, "Connection suspended");
}
@Override
public void onConnectionFailed(ConnectionResult connectionResult) {
Log.d(TAG, "Connection failed: " + connectionResult.toString());
}
@Override
public void onLocationChanged(Location location) {
Log.d(TAG, "Firing onLocationChanged..............................................");
mCurrentLocation = location;
mLastUpdateTime = DateFormat.getTimeInstance().format(new Date());
updateUI();
}
private void updateUI() {
Log.d(TAG, "UI update initiated .............");
if (null != mCurrentLocation) {
String lat = String.valueOf(mCurrentLocation.getLatitude());
String lng = String.valueOf(mCurrentLocation.getLongitude());
tvLocation.setText("At Time: " + mLastUpdateTime + "\n" +
"Latitude: " + lat + "\n" +
"Longitude: " + lng + "\n" +
"Accuracy: " + mCurrentLocation.getAccuracy() + "\n" +
"Provider: " + mCurrentLocation.getProvider());
} else {
Log.d(TAG, "location is null ...............");
}
}
@Override
protected void onPause() {
super.onPause();
stopLocationUpdates();
}
protected void stopLocationUpdates() {
LocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient, this);
Log.d(TAG, "Location update stopped .......................");
}
@Override
public void onResume() {
super.onResume();
if (mGoogleApiClient.isConnected()) {
startLocationUpdates();
Log.d(TAG, "Location update resumed .....................");
}
}
}
|
[
"srirambtecit@gmail.com"
] |
srirambtecit@gmail.com
|
dec3f1d95d40427e432690127be601b9f44cdcb0
|
9f8304a649e04670403f5dc1cb049f81266ba685
|
/common/src/main/java/com/cmcc/vrp/enums/FlowControlType.java
|
9c5b79c6ac140fca6cbe2453980b3083a4365c14
|
[] |
no_license
|
hasone/pdata
|
632d2d0df9ddd9e8c79aca61a87f52fc4aa35840
|
0a9cfd988e8a414f3bdbf82ae96b82b61d8cccc2
|
refs/heads/master
| 2020-03-25T04:28:17.354582
| 2018-04-09T00:13:55
| 2018-04-09T00:13:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 765
|
java
|
/**
*
*/
package com.cmcc.vrp.enums;
/**
* <p>
* Title:FlowControlType
* </p>
* <p>
* Description:
* </p>
*
* @author xujue
* @date 2016年9月21日
*/
public enum FlowControlType {
setCountUpper(0, "设置日上限金额"), setCountAddition(1, "设置日追加金额"), setCountCharge(
2, "充值金额");
int code;
String message;
private FlowControlType(int code, String message) {
this.code = code;
this.message = message;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
|
[
"fromluozuwu@qq.com"
] |
fromluozuwu@qq.com
|
b9c727a7a99f27f3c6cac522d824004f365b5e52
|
139b96e65688b2a8b09cab0b070a8f50a630f6ed
|
/Project/ebweb2019/src/main/java/vn/softdreams/ebweb/web/rest/PSSalaryTaxInsuranceRegulationResource.java
|
740cd30aa8342048c22037e4a12025ff2c706dd9
|
[] |
no_license
|
hoangpham1997/ChanDoi
|
785945b93c11c0081888f45c93b57de7de5d45f7
|
2e62bf65b690ebbf36a7f14bdbdaedae4fe16b36
|
refs/heads/master
| 2022-09-14T08:08:58.914426
| 2020-07-06T15:10:18
| 2020-07-06T15:10:18
| 242,865,582
| 0
| 0
| null | 2022-09-01T23:29:37
| 2020-02-24T23:24:29
|
Java
|
UTF-8
|
Java
| false
| false
| 6,884
|
java
|
package vn.softdreams.ebweb.web.rest;
import com.codahale.metrics.annotation.Timed;
import vn.softdreams.ebweb.domain.PSSalaryTaxInsuranceRegulation;
import vn.softdreams.ebweb.service.PSSalaryTaxInsuranceRegulationService;
import vn.softdreams.ebweb.web.rest.errors.BadRequestAlertException;
import vn.softdreams.ebweb.web.rest.util.HeaderUtil;
import vn.softdreams.ebweb.web.rest.util.PaginationUtil;
import io.github.jhipster.web.util.ResponseUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
/**
* REST controller for managing PSSalaryTaxInsuranceRegulation.
*/
@RestController
@RequestMapping("/api")
public class PSSalaryTaxInsuranceRegulationResource {
private final Logger log = LoggerFactory.getLogger(PSSalaryTaxInsuranceRegulationResource.class);
private static final String ENTITY_NAME = "pSSalaryTaxInsuranceRegulation";
private final PSSalaryTaxInsuranceRegulationService pSSalaryTaxInsuranceRegulationService;
public PSSalaryTaxInsuranceRegulationResource(PSSalaryTaxInsuranceRegulationService pSSalaryTaxInsuranceRegulationService) {
this.pSSalaryTaxInsuranceRegulationService = pSSalaryTaxInsuranceRegulationService;
}
/**
* POST /ps-salary-tax-insurance-regulations : Create a new pSSalaryTaxInsuranceRegulation.
*
* @param pSSalaryTaxInsuranceRegulation the pSSalaryTaxInsuranceRegulation to create
* @return the ResponseEntity with status 201 (Created) and with body the new pSSalaryTaxInsuranceRegulation, or with status 400 (Bad Request) if the pSSalaryTaxInsuranceRegulation has already an ID
* @throws URISyntaxException if the Location URI syntax is incorrect
*/
@PostMapping("/ps-salary-tax-insurance-regulations")
@Timed
public ResponseEntity<PSSalaryTaxInsuranceRegulation> createPSSalaryTaxInsuranceRegulation(@RequestBody PSSalaryTaxInsuranceRegulation pSSalaryTaxInsuranceRegulation) throws URISyntaxException {
log.debug("REST request to save PSSalaryTaxInsuranceRegulation : {}", pSSalaryTaxInsuranceRegulation);
if (pSSalaryTaxInsuranceRegulation.getId() != null) {
throw new BadRequestAlertException("A new pSSalaryTaxInsuranceRegulation cannot already have an ID", ENTITY_NAME, "idexists");
}
PSSalaryTaxInsuranceRegulation result = pSSalaryTaxInsuranceRegulationService.save(pSSalaryTaxInsuranceRegulation);
return ResponseEntity.created(new URI("/api/ps-salary-tax-insurance-regulations/" + result.getId()))
.headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))
.body(result);
}
/**
* PUT /ps-salary-tax-insurance-regulations : Updates an existing pSSalaryTaxInsuranceRegulation.
*
* @param pSSalaryTaxInsuranceRegulation the pSSalaryTaxInsuranceRegulation to update
* @return the ResponseEntity with status 200 (OK) and with body the updated pSSalaryTaxInsuranceRegulation,
* or with status 400 (Bad Request) if the pSSalaryTaxInsuranceRegulation is not valid,
* or with status 500 (Internal Server Error) if the pSSalaryTaxInsuranceRegulation couldn't be updated
* @throws URISyntaxException if the Location URI syntax is incorrect
*/
@PutMapping("/ps-salary-tax-insurance-regulations")
@Timed
public ResponseEntity<PSSalaryTaxInsuranceRegulation> updatePSSalaryTaxInsuranceRegulation(@RequestBody PSSalaryTaxInsuranceRegulation pSSalaryTaxInsuranceRegulation) throws URISyntaxException {
log.debug("REST request to update PSSalaryTaxInsuranceRegulation : {}", pSSalaryTaxInsuranceRegulation);
if (pSSalaryTaxInsuranceRegulation.getId() == null) {
throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull");
}
PSSalaryTaxInsuranceRegulation result = pSSalaryTaxInsuranceRegulationService.save(pSSalaryTaxInsuranceRegulation);
return ResponseEntity.ok()
.headers(HeaderUtil.createEntityUpdateAlert(ENTITY_NAME, pSSalaryTaxInsuranceRegulation.getId().toString()))
.body(result);
}
/**
* GET /ps-salary-tax-insurance-regulations : get all the pSSalaryTaxInsuranceRegulations.
*
* @param pageable the pagination information
* @return the ResponseEntity with status 200 (OK) and the list of pSSalaryTaxInsuranceRegulations in body
*/
@GetMapping("/ps-salary-tax-insurance-regulations")
@Timed
public ResponseEntity<List<PSSalaryTaxInsuranceRegulation>> getAllPSSalaryTaxInsuranceRegulations(Pageable pageable) {
log.debug("REST request to get a page of PSSalaryTaxInsuranceRegulations");
Page<PSSalaryTaxInsuranceRegulation> page = pSSalaryTaxInsuranceRegulationService.findAll(pageable);
HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/ps-salary-tax-insurance-regulations");
return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);
}
/**
* GET /ps-salary-tax-insurance-regulations/:id : get the "id" pSSalaryTaxInsuranceRegulation.
*
* @param id the id of the pSSalaryTaxInsuranceRegulation to retrieve
* @return the ResponseEntity with status 200 (OK) and with body the pSSalaryTaxInsuranceRegulation, or with status 404 (Not Found)
*/
@GetMapping("/ps-salary-tax-insurance-regulations/{id}")
@Timed
public ResponseEntity<PSSalaryTaxInsuranceRegulation> getPSSalaryTaxInsuranceRegulation(@PathVariable UUID id) {
log.debug("REST request to get PSSalaryTaxInsuranceRegulation : {}", id);
Optional<PSSalaryTaxInsuranceRegulation> pSSalaryTaxInsuranceRegulation = pSSalaryTaxInsuranceRegulationService.findOne(id);
return ResponseUtil.wrapOrNotFound(pSSalaryTaxInsuranceRegulation);
}
/**
* DELETE /ps-salary-tax-insurance-regulations/:id : delete the "id" pSSalaryTaxInsuranceRegulation.
*
* @param id the id of the pSSalaryTaxInsuranceRegulation to delete
* @return the ResponseEntity with status 200 (OK)
*/
@DeleteMapping("/ps-salary-tax-insurance-regulations/{id}")
@Timed
public ResponseEntity<Void> deletePSSalaryTaxInsuranceRegulation(@PathVariable UUID id) {
log.debug("REST request to delete PSSalaryTaxInsuranceRegulation : {}", id);
pSSalaryTaxInsuranceRegulationService.delete(id);
return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();
}
}
|
[
"hoangpham28121997@gmail.com"
] |
hoangpham28121997@gmail.com
|
53b5b46c52bf59c87ac0a8703498c8a057f4094a
|
7ce021205687faad6654e04623b3cd49bdad452d
|
/roimeshrepo/roi-MetaModel-jdbc/src/main/java/org/apache/metamodel/jdbc/dialects/IQueryRewriter.java
|
f867cb1b12970540f572e4a4e629b736caf293ab
|
[] |
no_license
|
venkateshm383/roibackupprojects
|
4ad9094d25dad9fe60da5f557069ecb36f627e4d
|
a78467028950c8eafdd662113870f633e61304d2
|
refs/heads/master
| 2020-04-18T21:52:10.308611
| 2016-09-02T04:32:21
| 2016-09-02T04:32:21
| 67,107,627
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,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.metamodel.jdbc.dialects;
import java.sql.Types;
import org.apache.metamodel.jdbc.JdbcDataContext;
import org.apache.metamodel.query.AggregateFunction;
import org.apache.metamodel.query.FilterItem;
import org.apache.metamodel.query.FromItem;
import org.apache.metamodel.query.Query;
import org.apache.metamodel.query.ScalarFunction;
import org.apache.metamodel.schema.ColumnType;
/**
* A query rewriter can be used for rewriting (part of) a query's string
* representation. This is usefull for databases that deviate from the SQL 99
* compliant syntax which is delievered by the query and it's query item's
* toString() methods.
*
* @see AbstractQueryRewriter
* @see JdbcDataContext
*/
public interface IQueryRewriter {
public String rewriteFromItem(FromItem item);
public String rewriteQuery(Query query);
public String rewriteFilterItem(FilterItem whereItem);
/**
* Gets whether this query rewriter is able to write the "Max rows" query
* property to the query string.
*
* @return whether this query rewriter is able to write the "Max rows" query
* property to the query string.
*/
public boolean isMaxRowsSupported();
/**
* Gets whether this query rewriter is able to write the "First row" query
* property to the query string.
*
* @return whether this query rewriter is able to write the "First row"
* query property to the query string.
*/
public boolean isFirstRowSupported();
/**
* Determines whether a specific scalar function is supported by the
* database or not.
*
* If the function is not supported then MetaModel will handle the function
* on the client side.
*
* @param function
* @return
*/
public boolean isScalarFunctionSupported(ScalarFunction function);
/**
* Determines whether a specific aggregate function is supported by the
* database or not.
*
* If the function is not supported then MetaModel will handle the function
* on the client side.
*
* @param function
* @return
*/
public boolean isAggregateFunctionSupported(AggregateFunction function);
/**
* Escapes the quotes within a String literal of a query item.
*
* @return String item with quotes escaped.
*/
public String escapeQuotes(String item);
/**
* Rewrites the name of a column type, as it is written in CREATE TABLE
* statements. Some databases dont support all column types, or have
* different names for them. The implementation of this method will do that
* conversion.
*
* @param columnType
* the (non-null) {@link ColumnType} to rewrite
* @param columnSize
* the (possibly null) column size that may or may not have been
* specified
* @return
*/
public String rewriteColumnType(ColumnType columnType, Integer columnSize);
/**
* Gets the column type for a specific JDBC type (as defined in
* {@link Types}), native type name and column size.
*
* @param jdbcType
* @param nativeType
* @param columnSize
* @return
*/
public ColumnType getColumnType(int jdbcType, String nativeType, Integer columnSize);
/**
* Determines if the JDBC data source supports transactions or not. Usually
* this is the case since JDBC is designed for ACID compliant databases, but
* in some cases the JDBC interface is used also to facilitate connectivity
* to non-transactional data source such as Apache Hive and others.
*
* @return
*/
public boolean isTransactional();
}
|
[
"you@example.com"
] |
you@example.com
|
efb803315f4f109f7fa96ec1836cda4b430a2c29
|
abde57231e3297e4dce1753aca88f6582c52ecc5
|
/zjmzxfzhl/src/main/java/com/zjmzxfzhl/modules/sys/entity/SysPost.java
|
2d6aa594870df901bdcce7685f2d3e402a3d66a4
|
[
"Apache-2.0"
] |
permissive
|
Juwenzhe/zjmzxfzhl
|
9a2232f194bd9909849c4ed7dc86f30b5f95c2a8
|
b0e4f0920182c8f736d0151c9f49c8a4b8a4f6b4
|
refs/heads/master
| 2022-07-06T15:26:21.689692
| 2020-05-17T11:48:51
| 2020-05-17T11:48:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 994
|
java
|
package com.zjmzxfzhl.modules.sys.entity;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zjmzxfzhl.common.base.BaseEntity;
import com.zjmzxfzhl.common.validator.constraints.LengthForUtf8;
import lombok.Data;
/**
* 【岗位】实体类
*
* @author 庄金明
*/
@Data
@TableName("T_SYS_POST")
public class SysPost extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 岗位ID
*/
@TableId
@NotNull
@LengthForUtf8(max = 32)
private String postId;
/**
* 岗位名称
*/
@NotNull
@LengthForUtf8(max = 255)
private String postName;
/**
* 排序号
*/
@Max(9999)
private Integer sortNo;
/**
* 备注
*/
@LengthForUtf8(max = 255)
private String remark;
}
|
[
"zjm16@163.com"
] |
zjm16@163.com
|
b86dc6433e207644b906958680112c90d4fc3c21
|
da459d51e6e39c083a5bdd978ea0045f301daaf5
|
/src/main/java/radar/UI/Components/ContentPanel.java
|
7a9faddc92c6102a1f5e60d1ca3156f65a461ce4
|
[] |
no_license
|
qq857115737/Radar
|
5f79a9dd015c2cb76c38891ecfe8fc60441071d7
|
71403dcc56b29e6211da237eed86a0ac2d92d064
|
refs/heads/master
| 2022-11-05T08:13:55.032443
| 2020-06-22T03:44:56
| 2020-06-22T03:44:56
| 270,879,972
| 0
| 0
| null | 2020-06-09T02:03:56
| 2020-06-09T02:03:55
| null |
UTF-8
|
Java
| false
| false
| 1,496
|
java
|
package radar.UI.Components;
import javax.swing.JPanel;
import net.miginfocom.swing.MigLayout;
import java.awt.Color;
import java.awt.FlowLayout;
/**
* 内容面板父组件
*/
public class ContentPanel extends JPanel{
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* 内容面板背景色为白色容器
*/
protected JPanel panel = new JPanel();
/**
* 内容面板顶部栏
*/
protected JPanel contentTop = new JPanel();
/**
* 内容面板内容部分
*/
protected JPanel ContentBody = new JPanel();
/**
* 内容面板底部栏
*/
protected JPanel contentFoot = new JPanel();
public ContentPanel() {
setLayout(new MigLayout("", "[8px][grow][8px]", "[8px][grow][8px]"));
panel.setBackground(Color.WHITE);
add(panel, "cell 1 1,grow");
panel.setLayout(new MigLayout("", "[grow]", "[80px][grow][60px]"));
FlowLayout flowLayout = (FlowLayout) contentTop.getLayout();
flowLayout.setVgap(1);
flowLayout.setHgap(1);
contentTop.setBackground(Color.WHITE);
panel.add(contentTop, "cell 0 0,grow");
FlowLayout flowLayout_1 = (FlowLayout) ContentBody.getLayout();
flowLayout_1.setVgap(1);
flowLayout_1.setHgap(1);
ContentBody.setBackground(Color.WHITE);
panel.add(ContentBody, "cell 0 1,grow");
FlowLayout flowLayout_2 = (FlowLayout) contentFoot.getLayout();
flowLayout_2.setVgap(1);
flowLayout_2.setHgap(1);
contentFoot.setBackground(Color.WHITE);
panel.add(contentFoot, "cell 0 2,grow");
}
}
|
[
"1615168893@qq.com"
] |
1615168893@qq.com
|
9e69ea2c755f24c31be610d6c885c52b3463ea23
|
9100ac076370edee44b778d4d67c22cab4192088
|
/workspace/threeday03/src/com/igeek/io2/IOTest3.java
|
22a15677825da0ad47ab19dcd80798075b09bada
|
[] |
no_license
|
easemeng/java
|
a515514b83da288cda18c74bb2a45c037d263579
|
dcc5a27b0b60a33ce1e5063b4eb244f2287dcbaa
|
refs/heads/master
| 2020-04-09T02:33:28.580362
| 2018-12-17T13:13:59
| 2018-12-17T13:13:59
| 159,945,154
| 2
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 2,442
|
java
|
package com.igeek.io2;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import org.junit.Test;
public class IOTest3 {
@Test
public void test4(){
FileInputStream fis = null;
FileOutputStream fos = null;
BufferedInputStream bis = null;
BufferedOutputStream bos = null;
try {
fis = new FileInputStream("f:/Java基本语法1.pptx");
fos = new FileOutputStream("e:/Java基本语法1.pptx");
bis = new BufferedInputStream(fis);
bos = new BufferedOutputStream(fos);
byte [] b = new byte[1024];
int a = 0;
while((a = bis.read(b)) != -1){
bos.write(b, 0, a);
}
} catch (Exception e) {
e.printStackTrace();
}finally{
if(bos != null){
try {
bos.close();
} catch (IOException e) {
e.printStackTrace();
}
}
if(bis != null){
try {
bis.close();
} catch (IOException e) {
e.printStackTrace();
}
}
if(fos != null){
try {
fos.close();
} catch (IOException e) {
e.printStackTrace();
}
}
if(fis != null){
try {
fis.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
// 推荐使用这种写法 。
@Test
public void test3() throws Exception{
FileInputStream fis = new FileInputStream("e:\\b.txt");
FileOutputStream fos = new FileOutputStream("e:/q(3).txt");
byte [] b = new byte[1027 * 5]; // 5kb 0
int i = -1;
// 7
while((i = fis.read(b)) != -1){
fos.write(b, 0, i); //
}
fos.close();
fis.close();
}
@Test
public void test2() throws Exception {
FileInputStream fis = new FileInputStream("e:\\b.txt");
FileOutputStream fos = new FileOutputStream("e:/q(2).txt");
byte [] b = new byte[1024 * 5]; // 5kb 0
int i = -1;
while((i = fis.read(b)) != -1){
// 不推荐使用 , 会把数组中多余的空格全部写入到文件中 。
fos.write(b);
}
fis.close();
fos.close();
}
@Test
public void test() throws Exception {
// 字符流 , 只针对文本类型的文件进行操作
// 字节流 , 所有的都可以 。
FileInputStream fis = new FileInputStream("e:\\b.txt");
FileOutputStream fos = new FileOutputStream("e:/q.txt");
int i = 0;
while((i = fis.read()) != -1){
fos.write(i);
}
fis.close();
fos.close();
}
}
|
[
"zj0303ym@qq.com"
] |
zj0303ym@qq.com
|
84534e21e4a1195c8fb1adc16926ad82f0559491
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-13916-4-12-NSGA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/internal/mandatory/XWikiPreferencesDocumentInitializer_ESTest.java
|
7a632ddd70e3d4290655ea8153f1067a5a5f07de
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 609
|
java
|
/*
* This file was automatically generated by EvoSuite
* Wed Apr 01 14:29:44 UTC 2020
*/
package com.xpn.xwiki.internal.mandatory;
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 XWikiPreferencesDocumentInitializer_ESTest extends XWikiPreferencesDocumentInitializer_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
35a6955ccb1e7b2fb8fd959ea55030b220f5987f
|
6092cbae5816a60b8124bb1921e6a90d7c7c8279
|
/java01/src/step22/exam02/Test05.java
|
eb092d1ba84719a4c7e668e37a95109a96e95d23
|
[] |
no_license
|
kyeonghunmin/mkh
|
847326c0effa8ec85a7e90554beee74eac9c854c
|
5e4fd583d889205654fc6cfc41db37430b6a3173
|
refs/heads/master
| 2020-12-24T20:14:33.579384
| 2016-05-12T08:30:23
| 2016-05-12T08:30:23
| 56,681,395
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 627
|
java
|
// 주제 : 바이트 읽기
package step22.exam02;
import java.io.File;
import java.io.IOException;
import java.io.FileInputStream;
public class Test05 {
public static void main(String[] args) throws IOException {
FileInputStream in = new FileInputStream("exam02.Test05.data");
int b = in.read(); // 리턴 타입이 int 이지만 1바이트 값을 알아서 리턴한다.
System.out.println(Integer.toHexString(b));
b = in.read();
System.out.println(Integer.toHexString(b));
b = in.read();
System.out.println(Integer.toHexString(b));
in.close(); // OS 자원 사용 후 해제
}
}
|
[
"alsrudgns88@naver.com"
] |
alsrudgns88@naver.com
|
0b10e575b3334cbee7964ae46e88684f6ca55929
|
a57d8bf94ca13ae05837412cf2ab2fe19dd7d3f6
|
/src/day08_ShortHand_Relation/RelationalOperators.java
|
6b18107c00ae11b62d3444da670f260aafaad9ee
|
[] |
no_license
|
SerdarAnnakurdov/myAllFilesCybertek
|
1bdeb3feba7664f6346bf3a4f62ae825a54ccbe9
|
61260280d14d841cf02e1df8981c0f602ea0dd73
|
refs/heads/master
| 2023-02-23T09:57:30.270111
| 2021-02-01T21:31:33
| 2021-02-01T21:31:33
| 333,541,067
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,830
|
java
|
package day08_ShortHand_Relation;
public class RelationalOperators {
public static void main(String[] args) {
int num1 = 324;
int num2 = 678;
boolean r1 = num1 > num2;
boolean r2 = num2 > num1;
boolean r3 = num1 < num2;// num1 is less than num2
boolean r4 = num2 < num1; // num2 less than num1 ;
System.out.println(num1+" is greater than "+num2+" : "+r1);
System.out.println(num2+" is greather than "+num1+" : "+r2);
System.out.println(num1+" is less than "+num2+" : "+r3);
System.out.println(num2+" is less than "+num1+": "+r4);
System.out.println(10>9);
System.out.println(1<0);
System.out.println("======================");
System.out.println(10 > 10 ); // false
System.out.println(10 >= 10); // 10 is greater or = to 10 ,,
System.out.println(10<9);/// false
System.out.println(10 <= 9);// 10 is less or equal to 9 => false
System.out.println("============================");
boolean b1 = 10 == 10;
boolean b2 = 10!= 10 ;
boolean b3 = "Cybertek" == "virginia";
boolean b4 = "virginia" == "Virginia"; // false becouse second V is uppercase
boolean b5 = "Muhtar" == "Muhtar";
boolean b6= "Muhtar"!="Good Guy";
System.out.println(b1);
System.out.println(b2);
System.out.println(b3);
System.out.println(b4);
System.out.println(b5);
System.out.println(b6);
int x = 100;
boolean isEven = x % 2 == 0; // 100 is evenly divisible by 2 ...
// even number ; is any number can be divisible by 2 with 0 remainder ....
boolean isOdd = x % 2 !=0; // opposite of even
// System.out.println("10">9); text to number is complain
}
}
|
[
"serjonchik@gmail.com"
] |
serjonchik@gmail.com
|
5fb95edc55bee38a7f1d62ea23f26dfd0ea96322
|
3955f3bc4b1e9c41ffabb34fcdbfbfb3a8b2f77c
|
/bizcore/WEB-INF/youbenben_core_src/com/youbenben/youbenben/retailstoreclosing/RetailStoreClosingMapper.java
|
d30bb6fb108fc608059d2acd5c6e54e318e01ce6
|
[] |
no_license
|
1342190832/youbenben
|
c9ba34117b30988419d4d053a35960f35cd2c3f0
|
f68fb29f17ff4f74b0de071fe11bc9fb10fd8744
|
refs/heads/master
| 2022-04-25T10:17:48.674515
| 2020-04-25T14:22:40
| 2020-04-25T14:22:40
| 258,133,780
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,892
|
java
|
package com.youbenben.youbenben.retailstoreclosing;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;
import java.math.BigDecimal;
import com.youbenben.youbenben.BaseRowMapper;
public class RetailStoreClosingMapper extends BaseRowMapper<RetailStoreClosing>{
protected RetailStoreClosing internalMapRow(ResultSet rs, int rowNumber) throws SQLException{
RetailStoreClosing retailStoreClosing = getRetailStoreClosing();
setId(retailStoreClosing, rs, rowNumber);
setComment(retailStoreClosing, rs, rowNumber);
setVersion(retailStoreClosing, rs, rowNumber);
return retailStoreClosing;
}
protected RetailStoreClosing getRetailStoreClosing(){
return new RetailStoreClosing();
}
protected void setId(RetailStoreClosing retailStoreClosing, ResultSet rs, int rowNumber) throws SQLException{
//there will be issue when the type is double/int/long
String id = rs.getString(RetailStoreClosingTable.COLUMN_ID);
if(id == null){
//do nothing when nothing found in database
return;
}
retailStoreClosing.setId(id);
}
protected void setComment(RetailStoreClosing retailStoreClosing, ResultSet rs, int rowNumber) throws SQLException{
//there will be issue when the type is double/int/long
String comment = rs.getString(RetailStoreClosingTable.COLUMN_COMMENT);
if(comment == null){
//do nothing when nothing found in database
return;
}
retailStoreClosing.setComment(comment);
}
protected void setVersion(RetailStoreClosing retailStoreClosing, ResultSet rs, int rowNumber) throws SQLException{
//there will be issue when the type is double/int/long
Integer version = rs.getInt(RetailStoreClosingTable.COLUMN_VERSION);
if(version == null){
//do nothing when nothing found in database
return;
}
retailStoreClosing.setVersion(version);
}
}
|
[
"1342190832@qq.com"
] |
1342190832@qq.com
|
e7d8eb95d0d31f3881d7561f4a1c370a9732e14b
|
70f7a06017ece67137586e1567726579206d71c7
|
/alimama/src/main/java/com/alibaba/aliweex/bundle/NestedScrollingWebView.java
|
460e842d5e8cc1f394c36e6571ffa5428f1c603c
|
[] |
no_license
|
liepeiming/xposed_chatbot
|
5a3842bd07250bafaffa9f468562021cfc38ca25
|
0be08fc3e1a95028f8c074f02ca9714dc3c4dc31
|
refs/heads/master
| 2022-12-20T16:48:21.747036
| 2020-10-14T02:37:49
| 2020-10-14T02:37:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,486
|
java
|
package com.alibaba.aliweex.bundle;
import android.content.Context;
import android.taobao.windvane.extra.uc.WVUCWebView;
import android.util.AttributeSet;
import android.view.MotionEvent;
import androidx.core.view.MotionEventCompat;
import androidx.core.view.NestedScrollingChild;
import androidx.core.view.NestedScrollingChildHelper;
import com.uc.webview.export.extension.UCExtension;
public class NestedScrollingWebView extends WVUCWebView implements NestedScrollingChild {
private NestedScrollingChildHelper childHelper;
private int lastY;
private int nestedOffsetY;
private final int[] scrollConsumed;
private final int[] scrollOffset;
public NestedScrollingWebView(Context context) {
this(context, (AttributeSet) null);
}
public NestedScrollingWebView(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 16842885);
}
public NestedScrollingWebView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
this.scrollOffset = new int[2];
this.scrollConsumed = new int[2];
this.childHelper = new NestedScrollingChildHelper(this);
setNestedScrollingEnabled(true);
}
public boolean coreDispatchTouchEvent(MotionEvent motionEvent) {
UCExtension uCExtension = getUCExtension();
if (uCExtension != null) {
if (uCExtension.ignoreTouchEvent()) {
requestDisallowInterceptTouchEvent(true);
} else {
requestDisallowInterceptTouchEvent(false);
}
}
MotionEvent obtain = MotionEvent.obtain(motionEvent);
int actionMasked = MotionEventCompat.getActionMasked(obtain);
if (actionMasked == 0) {
this.nestedOffsetY = 0;
}
int y = (int) obtain.getY();
obtain.offsetLocation(0.0f, (float) this.nestedOffsetY);
switch (actionMasked) {
case 0:
boolean coreDispatchTouchEvent = super.coreDispatchTouchEvent(obtain);
this.lastY = y;
startNestedScroll(2);
return coreDispatchTouchEvent;
case 1:
case 3:
boolean coreDispatchTouchEvent2 = super.coreDispatchTouchEvent(obtain);
stopNestedScroll();
return coreDispatchTouchEvent2;
case 2:
int i = this.lastY - y;
if (dispatchNestedPreScroll(0, i, this.scrollConsumed, this.scrollOffset)) {
i -= this.scrollConsumed[1];
this.lastY = y - this.scrollOffset[1];
obtain.offsetLocation(0.0f, (float) (-this.scrollOffset[1]));
this.nestedOffsetY += this.scrollOffset[1];
}
int i2 = i;
boolean coreDispatchTouchEvent3 = super.coreDispatchTouchEvent(obtain);
if (!dispatchNestedScroll(0, this.scrollOffset[1], 0, i2, this.scrollOffset)) {
return coreDispatchTouchEvent3;
}
obtain.offsetLocation(0.0f, (float) this.scrollOffset[1]);
this.nestedOffsetY += this.scrollOffset[1];
return coreDispatchTouchEvent3;
default:
return false;
}
}
public void setNestedScrollingEnabled(boolean z) {
this.childHelper.setNestedScrollingEnabled(z);
}
public boolean isNestedScrollingEnabled() {
return this.childHelper.isNestedScrollingEnabled();
}
public boolean startNestedScroll(int i) {
return this.childHelper.startNestedScroll(i);
}
public void stopNestedScroll() {
this.childHelper.stopNestedScroll();
}
public boolean hasNestedScrollingParent() {
return this.childHelper.hasNestedScrollingParent();
}
public boolean dispatchNestedScroll(int i, int i2, int i3, int i4, int[] iArr) {
return this.childHelper.dispatchNestedScroll(i, i2, i3, i4, iArr);
}
public boolean dispatchNestedPreScroll(int i, int i2, int[] iArr, int[] iArr2) {
return this.childHelper.dispatchNestedPreScroll(i, i2, iArr, iArr2);
}
public boolean dispatchNestedFling(float f, float f2, boolean z) {
return this.childHelper.dispatchNestedFling(f, f2, z);
}
public boolean dispatchNestedPreFling(float f, float f2) {
return this.childHelper.dispatchNestedPreFling(f, f2);
}
}
|
[
"zhangquan@snqu.com"
] |
zhangquan@snqu.com
|
780e9cc73afebfd17173f6fa8015c64e3671bfd9
|
efa7935f77f5368e655c072b236d598059badcff
|
/src/com/sammyun/dao/impl/TagDaoImpl.java
|
de3ba78236e044ef185a6794bc7583ea6d14f6cf
|
[] |
no_license
|
ma-xu/Library
|
c1404f4f5e909be3e5b56f9884355e431c40f51b
|
766744898745f8fad31766cafae9fd4db0318534
|
refs/heads/master
| 2022-02-23T13:34:47.439654
| 2016-06-03T11:27:21
| 2016-06-03T11:27:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,328
|
java
|
/*
* Copyright 2012-2014 sammyun.com.cn. All rights reserved.
* Support: http://www.sammyun.com.cn
* License: http://www.sammyun.com.cn/license
*/
package com.sammyun.dao.impl;
import java.util.List;
import javax.persistence.FlushModeType;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Root;
import org.springframework.stereotype.Repository;
import com.sammyun.dao.TagDao;
import com.sammyun.entity.Tag;
import com.sammyun.entity.Tag.Type;
/**
* Dao - 标签
*
*/
@Repository("tagDaoImpl")
public class TagDaoImpl extends BaseDaoImpl<Tag, Long> implements TagDao
{
public List<Tag> findList(Type type)
{
CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
CriteriaQuery<Tag> criteriaQuery = criteriaBuilder.createQuery(Tag.class);
Root<Tag> root = criteriaQuery.from(Tag.class);
criteriaQuery.select(root);
if (type != null)
{
criteriaQuery.where(criteriaBuilder.equal(root.get("type"), type));
}
criteriaQuery.orderBy(criteriaBuilder.asc(root.get("order")));
return entityManager.createQuery(criteriaQuery).setFlushMode(FlushModeType.COMMIT).getResultList();
}
}
|
[
"melody@maxudeMacBook-Pro.local"
] |
melody@maxudeMacBook-Pro.local
|
7822e3a1d8e7548d2d42a5ec645c12b33b3562cb
|
50504ec5672c0180bbbfefd0d9f988407229fd9f
|
/zestProject/src/main/java/com/zest/web/admin/model/TalentSubmitVO.java
|
a0f8b86aa14cc558626c5d845e64ff3b793242e7
|
[] |
no_license
|
moving33/zestP
|
ac73a1e9427e8171afaf8e55ed19091eaf57b3d9
|
1e7007c281c3c1245262f2392ff0577f7ef2e0e7
|
refs/heads/master
| 2020-03-22T08:06:40.162323
| 2018-07-05T00:39:43
| 2018-07-05T00:39:43
| 139,745,440
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,238
|
java
|
package com.zest.web.admin.model;
import java.sql.Timestamp;
import java.time.LocalDateTime;
//돈 승인 table
public class TalentSubmitVO {
private Integer ts_no;
private Integer to_no;
private Integer tt_no;
private Integer ts_cl_no;
private Integer ts_status;
private Integer to_real_price;
private Integer to_price_total;
private Integer benefit;
private LocalDateTime ti_date;
private Timestamp to_reg_date;
@Override
public String toString() {
return "TalentSubmitVO [ts_no=" + ts_no + ", to_no=" + to_no + ", tt_no=" + tt_no + ", ts_cl_no=" + ts_cl_no
+ ", ts_status=" + ts_status + ", to_real_price=" + to_real_price + ", to_price_total=" + to_price_total
+ ", benefit=" + benefit + ", ti_date=" + ti_date + ", to_reg_date=" + to_reg_date + "]";
}
public Integer getTs_no() {
return ts_no;
}
public void setTs_no(Integer ts_no) {
this.ts_no = ts_no;
}
public Integer getTo_no() {
return to_no;
}
public void setTo_no(Integer to_no) {
this.to_no = to_no;
}
public Integer getTt_no() {
return tt_no;
}
public void setTt_no(Integer tt_no) {
this.tt_no = tt_no;
}
public Integer getTs_cl_no() {
return ts_cl_no;
}
public void setTs_cl_no(Integer ts_cl_no) {
this.ts_cl_no = ts_cl_no;
}
public Integer getTs_status() {
return ts_status;
}
public void setTs_status(Integer ts_status) {
this.ts_status = ts_status;
}
public Integer getTo_real_price() {
return to_real_price;
}
public void setTo_real_price(Integer to_real_price) {
this.to_real_price = to_real_price;
}
public Integer getTo_price_total() {
return to_price_total;
}
public void setTo_price_total(Integer to_price_total) {
this.to_price_total = to_price_total;
}
public Integer getBenefit() {
return benefit;
}
public void setBenefit(Integer benefit) {
this.benefit = benefit;
}
public LocalDateTime getTi_date() {
return ti_date;
}
public void setTi_date(LocalDateTime ti_date) {
this.ti_date = ti_date;
}
public Timestamp getTo_reg_date() {
return to_reg_date;
}
public void setTo_reg_date(Timestamp to_reg_date) {
this.to_reg_date = to_reg_date;
}
}
|
[
"moving5254@gmail.com"
] |
moving5254@gmail.com
|
6ca132d9eeff62bd529a13548e8afdd050e18b31
|
ac3a7a8d120d4e281431329c8c9d388fcfb94342
|
/src/main/java/com/leetcode/algorithm/hard/maximumfrequencystack/Solution.java
|
b022731a881a7da16ccae5cd9e46d13a0501dd1f
|
[
"MIT"
] |
permissive
|
paulxi/LeetCodeJava
|
c69014c24cda48f80a25227b7ac09c6c5d6cfadc
|
10b4430629314c7cfedaae02c7dc4c2318ea6256
|
refs/heads/master
| 2021-04-03T08:03:16.305484
| 2021-03-02T06:20:24
| 2021-03-02T06:20:24
| 125,126,097
| 3
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 715
|
java
|
package com.leetcode.algorithm.hard.maximumfrequencystack;
import java.util.HashMap;
import java.util.Map;
import java.util.Stack;
class FreqStack {
Map<Integer, Integer> freq;
Map<Integer, Stack<Integer>> group;
int maxfreq;
public FreqStack() {
freq = new HashMap<>();
group = new HashMap<>();
maxfreq = 0;
}
public void push(int x) {
int f = freq.getOrDefault(x, 0) + 1;
freq.put(x, f);
if (f > maxfreq) {
maxfreq = f;
}
group.computeIfAbsent(f, z -> new Stack<>()).push(x);
}
public int pop() {
int x = group.get(maxfreq).pop();
freq.put(x, freq.get(x) - 1);
if (group.get(maxfreq).size() == 0) {
maxfreq--;
}
return x;
}
}
|
[
"paulxi@gmail.com"
] |
paulxi@gmail.com
|
6cc94a6a9d025128626e410a8e98a9654efc3968
|
aa0b5c2a531ac0a8cfbcd47ebdcfdfd40013a071
|
/jambeth/jambeth-persistence/src/main/java/com/koch/ambeth/persistence/sql/ResultSetDataCursor.java
|
f5005b5b1f16a8d4c97869febfa399024a125980
|
[
"Apache-2.0"
] |
permissive
|
vogelb/ambeth
|
7efb73444c4451913d4be30966f2af3596230aaa
|
4b842b2648b33657018fc3b31c5d5b2f33a7b929
|
refs/heads/master
| 2020-04-03T06:32:19.433909
| 2017-07-10T20:49:40
| 2017-07-11T08:03:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,354
|
java
|
package com.koch.ambeth.persistence.sql;
/*-
* #%L
* jambeth-persistence
* %%
* Copyright (C) 2017 Koch Softwaredevelopment
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
* #L%
*/
import com.koch.ambeth.ioc.IInitializingBean;
import com.koch.ambeth.query.persistence.IDataCursor;
import com.koch.ambeth.query.persistence.IDataItem;
import com.koch.ambeth.util.IDisposable;
import com.koch.ambeth.util.ParamChecker;
import com.koch.ambeth.util.collections.IMap;
public class ResultSetDataCursor implements IDataCursor, IDataItem, IDisposable, IInitializingBean {
protected IResultSet resultSet;
protected IMap<String, Integer> propertyToColIndexMap;
protected Object[] data;
@Override
public void afterPropertiesSet() {
ParamChecker.assertNotNull(resultSet, "ResultSet");
ParamChecker.assertNotNull(propertyToColIndexMap, "PropertyToColIndexMap");
data = new Object[propertyToColIndexMap.size()];
}
public IResultSet getResultSet() {
return resultSet;
}
public void setResultSet(IResultSet resultSet) {
this.resultSet = resultSet;
}
public void setPropertyToColIndexMap(IMap<String, Integer> propertyToColIndexMap) {
this.propertyToColIndexMap = propertyToColIndexMap;
}
@Override
public int getFieldCount() {
return propertyToColIndexMap.size();
}
@Override
public Object getValue(String propertyName) {
Integer index = propertyToColIndexMap.get(propertyName);
return data[index];
}
@Override
public Object getValue(int index) {
return data[index];
}
@Override
public IDataItem getCurrent() {
return this;
}
@Override
public boolean moveNext() {
if (resultSet.moveNext()) {
data = resultSet.getCurrent();
return true;
}
return false;
}
@Override
public void dispose() {
if (resultSet != null) {
resultSet.dispose();
resultSet = null;
}
propertyToColIndexMap = null;
}
}
|
[
"dennis.koch@bruker.com"
] |
dennis.koch@bruker.com
|
7eccb46bd3b0d6f076c27798c3290e4c00b23d6e
|
d07d36614cca7bbceabc15a6b03afdb515b0456b
|
/gwt-web/apps/gm-p1-adcollect/src/main/java/com/iwgame/gm/p1/adcollect/modules/hard/admin/client/presenter/PositionMgrPresenter.java
|
cf4e042a9a02727f2eb4a12239a96cfc3436a90c
|
[] |
no_license
|
liveqmock/workspaces
|
b77013e21f8fd7ca6eb53a995bb1285795ac6a31
|
ca39c5d33a970e5c1452100e0b69e4c56decaa00
|
refs/heads/master
| 2021-01-22T13:18:03.914322
| 2014-10-13T02:55:41
| 2014-10-13T02:55:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,515
|
java
|
/****************************************************************
* 系统名称 : '[gm-p1-adcollect]'
* 文件名 : PositionMgrPresenter.java
* (C) Copyright Green Shore Network Technology Co.,Ltd.2012
* All Rights Reserved.
* **************************************************************
* 注意: 本内容仅限于上海绿岸网络科技有限公司内部使用,禁止转发
****************************************************************/
package com.iwgame.gm.p1.adcollect.modules.hard.admin.client.presenter;
import java.util.List;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.iwgame.gm.p1.adcollect.shared.model.DropDownListData;
import com.iwgame.ui.grid.client.view.SchemaGridViewPresenter;
/**
* 类说明
*
* @简述: XXXXXXX
* @作者: ByName's pfwang
* @版本: 1.0
* @邮箱: wangpengfei@iwgame.com
* @创建时间:2012-10-8 下午12:21:55
*/
public interface PositionMgrPresenter extends SchemaGridViewPresenter {
public void getMediaType(int type, AsyncCallback<List<DropDownListData>> callback);
public void getMedia(int type, AsyncCallback<List<DropDownListData>> callback);
public void getUnitsIsNetBar(AsyncCallback<List<DropDownListData>> callback);
public void checkPositionName(String name, AsyncCallback<Boolean> callback);
public void chenkAddPosAuthority(AsyncCallback<Void> callback);
public void chenkUpdatePosAuthority(AsyncCallback<Void> callback);
}
|
[
"areskts@icloud.com"
] |
areskts@icloud.com
|
8ac626484b4c6c29d8508575a0249478ca9a1181
|
9ba3bfc65928a89aee2591f0b2f9920fbe3a53fe
|
/ym_java/src/main/java/com/yumodev/java/patten/singleton/SingletonDcl.java
|
01bf2c536a2f59f40bd4d97df04807d972eb19e9
|
[] |
no_license
|
larryzen/yumoAndroid
|
1989632d6b224d6b8fbd5e9bb30a627a65129a02
|
4c1e7166eec81290b819c3ebcde435ea72c2e068
|
refs/heads/master
| 2022-02-21T03:27:33.836621
| 2019-10-18T12:22:20
| 2019-10-18T12:22:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 541
|
java
|
package com.yumodev.java.patten.singleton;
/**
* Created by guo on 17/9/6.
*/
public class SingletonDcl {
//自行生成一个类的实例。
private volatile static SingletonDcl mInstance;
//私有化构造方法。
private SingletonDcl(){}
//提供获取一个类的实例的接口
public static SingletonDcl getInstance(){
if (mInstance == null){
synchronized (SingletonDcl.class){
mInstance = new SingletonDcl();
}
}
return mInstance;
}
}
|
[
"yumotingyu@gmail.com"
] |
yumotingyu@gmail.com
|
373b921d9ba3cb7d67e0210ea30a17a4c04fd91b
|
d7c5121237c705b5847e374974b39f47fae13e10
|
/airspan.netspan/src/main/java/Netspan/NBI_15_5/Lte/ManagementProfileCreateResponse.java
|
209a247fcf35e8c6f0e7c5eb65252e3dbbc40c6f
|
[] |
no_license
|
AirspanNetworks/SWITModules
|
8ae768e0b864fa57dcb17168d015f6585d4455aa
|
7089a4b6456621a3abd601cc4592d4b52a948b57
|
refs/heads/master
| 2022-11-24T11:20:29.041478
| 2020-08-09T07:20:03
| 2020-08-09T07:20:03
| 184,545,627
| 1
| 0
| null | 2022-11-16T12:35:12
| 2019-05-02T08:21:55
|
Java
|
UTF-8
|
Java
| false
| false
| 1,787
|
java
|
package Netspan.NBI_15_5.Lte;
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>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="ManagementProfileCreateResult" type="{http://Airspan.Netspan.WebServices}ProfileResponse" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"managementProfileCreateResult"
})
@XmlRootElement(name = "ManagementProfileCreateResponse")
public class ManagementProfileCreateResponse {
@XmlElement(name = "ManagementProfileCreateResult")
protected ProfileResponse managementProfileCreateResult;
/**
* Gets the value of the managementProfileCreateResult property.
*
* @return
* possible object is
* {@link ProfileResponse }
*
*/
public ProfileResponse getManagementProfileCreateResult() {
return managementProfileCreateResult;
}
/**
* Sets the value of the managementProfileCreateResult property.
*
* @param value
* allowed object is
* {@link ProfileResponse }
*
*/
public void setManagementProfileCreateResult(ProfileResponse value) {
this.managementProfileCreateResult = value;
}
}
|
[
"build.Airspan.com"
] |
build.Airspan.com
|
02853f33f84b3439d4894f364ac7e75a06103ff9
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-ws/results/XWIKI-14227-23-26-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/internal/XWikiInitializerJob_ESTest.java
|
a770fd54f88c852004d4943dbacb27cdef37ed81
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 567
|
java
|
/*
* This file was automatically generated by EvoSuite
* Fri Jan 17 20:22:18 UTC 2020
*/
package com.xpn.xwiki.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 XWikiInitializerJob_ESTest extends XWikiInitializerJob_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
b29af2f020d08b83580cd4ab44d98abfa65e1530
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/main/java/org/gradle/test/performancenull_404/Productionnull_40341.java
|
79cb6513e4600f49f65c0a5e13daa455f9fff490
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 588
|
java
|
package org.gradle.test.performancenull_404;
public class Productionnull_40341 {
private final String property;
public Productionnull_40341(String param) {
this.property = param;
}
public String getProperty() {
return property;
}
private String prop0;
public String getProp0() {
return prop0;
}
public void setProp0(String value) {
prop0 = value;
}
private String prop1;
public String getProp1() {
return prop1;
}
public void setProp1(String value) {
prop1 = value;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
3e1b3cca4d12ce5a603644f252e9657f07310f47
|
a58d89e55780b9e8995d188663f0ff85794cd53a
|
/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatAbstractIcon.java
|
9675479cdbf1d32592c5cd081542349c730843f7
|
[
"Apache-2.0"
] |
permissive
|
AugustNagro/FlatLaf
|
84efe1991d8d197460b1309b9d44a08bbd1cc061
|
c141cb6c6c535b954164e1224a32ad9b28d74dc0
|
refs/heads/master
| 2020-11-25T15:28:05.832269
| 2019-12-17T22:24:38
| 2019-12-17T22:24:38
| 228,739,502
| 1
| 0
|
Apache-2.0
| 2019-12-18T02:17:59
| 2019-12-18T02:17:58
| null |
UTF-8
|
Java
| false
| false
| 2,115
|
java
|
/*
* Copyright 2019 FormDev Software GmbH
*
* 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.formdev.flatlaf.icons;
import static com.formdev.flatlaf.util.UIScale.*;
import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Graphics2D;
import javax.swing.Icon;
import javax.swing.plaf.UIResource;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.UIScale;
/**
* Base class for icons that scales width and height, creates and initializes
* a scaled graphics context for icon painting.
*
* Subclasses do not need to scale icon painting.
*
* @author Karl Tauber
*/
public abstract class FlatAbstractIcon
implements Icon, UIResource
{
protected final int width;
protected final int height;
protected final Color color;
public FlatAbstractIcon( int width, int height, Color color ) {
this.width = width;
this.height = height;
this.color = color;
}
@Override
public void paintIcon( Component c, Graphics g, int x, int y ) {
Graphics2D g2 = (Graphics2D) g.create();
try {
FlatUIUtils.setRenderingHints( g2 );
// for testing
// g2.setColor( Color.blue );
// g2.drawRect( x, y, getIconWidth() - 1, getIconHeight() - 1 );
g2.translate( x, y );
UIScale.scaleGraphics( g2 );
if( color != null )
g2.setColor( color );
paintIcon( c, g2 );
} finally {
g2.dispose();
}
}
protected abstract void paintIcon( Component c, Graphics2D g2 );
@Override
public int getIconWidth() {
return scale( width );
}
@Override
public int getIconHeight() {
return scale( height );
}
}
|
[
"karl@jformdesigner.com"
] |
karl@jformdesigner.com
|
65df69f870e1c1d4c1e4b1edc90d48c9392a84ee
|
3d6833978344bd46b8f453ead8fd282c72a4f66f
|
/src/main/java/com/example/spay/ui/fragment/deatailFragment/PayMentFragment.java
|
d77e2c320c8c9863bb59297e7f2b80d1da3e9845
|
[] |
no_license
|
huanglonghu/spay
|
c64765d72a6ea547ce38deb787241bd0df21f861
|
095389e1f42b91121ca1ec342ae292ab69679b3e
|
refs/heads/master
| 2021-03-17T09:48:26.595320
| 2020-03-25T10:08:34
| 2020-03-25T10:08:34
| 246,981,281
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,468
|
java
|
package com.example.spay.ui.fragment.deatailFragment;
import android.databinding.DataBindingUtil;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.example.spay.R;
import com.example.spay.databinding.FragmentPaymentBinding;
import com.example.spay.ui.base.BaseFragment;
import com.example.spay.constant.Constant;
import com.example.spay.utils.EncryptUtil;
import com.google.zxing.WriterException;
import com.google.zxing.encoding.EncodingHandler;
import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
public class PayMentFragment extends BaseFragment {
private FragmentPaymentBinding binding;
private ImageView paymentQrcode;
private ImageView paymentBarCode;
private View view;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
if (binding == null) {
binding = DataBindingUtil.inflate(inflater, R.layout.fragment_payment, container, false);
binding.setPresenter(presenter);
view = binding.getRoot();
binding.paymentToolBar.toolbar2.setBackgroundResource(R.color.bg4);
binding.paymentToolBar.title.setText("向商家付款");
paymentQrcode = (ImageView) view.findViewById(R.id.payment_qrcode);
paymentBarCode = (ImageView) view.findViewById(R.id.payment_barCode);
refreshQRCode();
initView();
}
return view;
}
private void refreshQRCode() {
Observable.interval(0, 1, java.util.concurrent.TimeUnit.MINUTES, Schedulers.newThread()).observeOn(AndroidSchedulers.mainThread()).subscribe(
time -> {
long l = System.currentTimeMillis();
Bitmap mBitmap = null;
try {
String qrStr = getQrStr(l);
Bitmap barBitmap = EncodingHandler.createOneDCode("1234");
if (barBitmap != null) {
paymentBarCode.setImageBitmap(barBitmap);
}
mBitmap = EncodingHandler.createQRCode(qrStr, 500);
if (mBitmap != null) {
paymentQrcode.setImageBitmap(mBitmap);
}
} catch (WriterException e) {
e.printStackTrace();
}
}, throwable -> {
}
);
}
@Override
protected void lazyLoad() {
}
public void initView() {
refreshQRCode();
}
public String getQrStr(long time) {
String qrStr = null;
try {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append(Constant.userName + "|");
stringBuffer.append(Constant.userId + "|");
stringBuffer.append(time + "|");
stringBuffer.append("2");
//进行加密
qrStr = EncryptUtil.aesEncrypt(stringBuffer.toString(), "87a4d115c0956912b495d6bb8b7c0013");
} catch (Exception e) {
e.printStackTrace();
}
return qrStr;
}
//隔一分钟刷新一次
}
|
[
"952204748@qq.com"
] |
952204748@qq.com
|
e67c648848a9e278219445d989700daf11d57145
|
5256450a88b151bf855360470a7f77148f89edf8
|
/test-kit/src/test/java/com/babeeta/hudee/test/TestRestSubscriptionHighLevel.java
|
c57330a48e54de0594e3f411f486f8025763536e
|
[] |
no_license
|
zhaom/broadcast-simple
|
cc57054e0c396d4a50807a7acaa99b12f8512604
|
f2a3c58ccab9db5db88df1a87c27b0f3de252906
|
refs/heads/master
| 2021-01-10T01:45:59.823368
| 2016-03-25T06:52:16
| 2016-03-25T06:52:16
| 54,538,358
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,905
|
java
|
package com.babeeta.hudee.test;
import java.io.IOException;
import java.util.List;
import junit.framework.Assert;
import net.sf.json.JSONArray;
import org.apache.http.ParseException;
import org.apache.http.util.EntityUtils;
import org.junit.Test;
import com.babeeta.hudee.test.rest.dev.subscription.highlevel.CountResultClient;
import com.babeeta.hudee.test.rest.dev.subscription.highlevel.CountTagClient;
import com.babeeta.hudee.test.rest.dev.subscription.highlevel.CreateTaskClient;
import com.babeeta.hudee.test.rest.dev.subscription.highlevel.DeleteTaskClient;
import com.babeeta.hudee.test.rest.dev.subscription.highlevel.ListResultClient;
@SuppressWarnings("javadoc")
public class TestRestSubscriptionHighLevel {
private static final String IP = "192.168.20.83";
private static final String aid = "4fe83ea858b0e4b0387cb36eae54066b";
@Test
public final void testCountTag() throws NumberFormatException,
ParseException, IOException {
CountTagClient counter = new CountTagClient(IP, 8083);
counter.countTag(aid, "_ALL");
Assert.assertEquals(counter.getResponseStatus(), 200);
long countResult = Long.parseLong(EntityUtils.toString(counter
.getResponseEntity()));
System.out.println("Count result = " + countResult);
}
@Test
public final void testCreateTask() throws ParseException, IOException {
CreateTaskClient task = new CreateTaskClient(IP, 8083);
task.createTask(aid);
Assert.assertEquals(task.getResponseStatus(), 200);
String key = EntityUtils.toString(task.getResponseEntity());
System.out.println("Key = " + key);
long result = countResult(key);
System.out.println("Count result = " + result);
byte[] readContent = ListResultClient(key, 0);
String listStr = new String(readContent);
JSONArray obj = JSONArray.fromObject(listStr);
@SuppressWarnings("unchecked")
List<String> list = (List<String>) JSONArray.toCollection(obj,
String.class);
for (String p : list) {
System.out.println(p);
}
deleteTask(key);
}
private static void deleteTask(String key) {
DeleteTaskClient deleter = new DeleteTaskClient(IP, 8083);
deleter.deleteTask(key);
Assert.assertEquals(deleter.getResponseStatus(), 200);
}
private static long countResult(String key) throws NumberFormatException,
ParseException, IOException {
CountResultClient counter = new CountResultClient(IP, 8083);
counter.count(key);
Assert.assertEquals(counter.getResponseStatus(), 200);
long result = Long.parseLong(EntityUtils.toString(counter
.getResponseEntity()));
return result;
}
private static byte[] ListResultClient(String key, int index)
throws IOException {
ListResultClient lister = new ListResultClient(
IP, 8083);
lister.list(key, index, 20);
Assert.assertEquals(lister.getResponseStatus(), 200);
return EntityUtils.toByteArray(lister.getResponseEntity());
}
}
|
[
"zhaominhe@gmail.com"
] |
zhaominhe@gmail.com
|
efc9536943bd14e3aee7f50743fc5b1ffcb9f4dd
|
45d58ad7e0af7cf0ec69ee218b0ba46da81c2abd
|
/src/java/org/apache/fop/fo/UnknownXMLObj.java
|
475ca42e86be657acb6abf93dc82568ad6e5d77c
|
[
"Apache-2.0"
] |
permissive
|
balabit-deps/balabit-os-7-fop
|
48cc73bfb90a83329d4e8041bf1c622884df8a08
|
3ff623f6752a0550998528362469857048ccb324
|
refs/heads/master
| 2020-04-07T09:11:06.972556
| 2018-11-07T15:43:56
| 2018-11-07T15:43:56
| 158,243,262
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,787
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* $Id: UnknownXMLObj.java 680378 2008-07-28 15:05:14Z jeremias $ */
package org.apache.fop.fo;
import org.xml.sax.Locator;
import org.apache.fop.apps.FOPException;
/**
* Class for handling generic XML from a namespace not recognized by FOP
*/
public class UnknownXMLObj extends XMLObj {
private String namespace;
/**
* Inner class for an UnknownXMLObj Maker
*/
public static class Maker extends ElementMapping.Maker {
private String space;
/**
* Construct the Maker
* @param ns the namespace for this Maker
*/
public Maker(String ns) {
space = ns;
}
/**
* Make an instance
* @param parent FONode that is the parent of the object
* @return the created UnknownXMLObj
*/
public FONode make(FONode parent) {
return new UnknownXMLObj(parent, space);
}
}
/**
* Constructs an unknown xml object (called by Maker).
*
* @param parent the parent formatting object
* @param space the namespace for this object
*/
protected UnknownXMLObj(FONode parent, String space) {
super(parent);
this.namespace = space;
}
/** {@inheritDoc} */
public String getNamespaceURI() {
return this.namespace;
}
/** {@inheritDoc} */
public String getNormalNamespacePrefix() {
return null; //We don't know that in this case.
}
/** {@inheritDoc} */
protected void addChildNode(FONode child) {
if (doc == null) {
createBasicDocument();
}
super.addChildNode(child);
}
/** {@inheritDoc} */
protected void characters(char[] data, int start, int length,
PropertyList pList, Locator locator) throws FOPException {
if (doc == null) {
createBasicDocument();
}
super.characters(data, start, length, pList, locator);
}
}
|
[
"testbot@balabit.com"
] |
testbot@balabit.com
|
f4c1ccbf09a0ed643d9d11043f48b29ebcf20d8a
|
e617f4ae796f16eeb4705200935a90dfd31955b2
|
/rx/functions/Func2.java
|
11f5412b9ad00c3eb75fccbac5002e197dad5dce
|
[] |
no_license
|
mascot6699/Go-Jek.Android
|
98dfb73b1c52a7c2100c7cf8baebc0a95d5d511d
|
051649d0622bcdc7872cb962a0e1c4f6c0f2a113
|
refs/heads/master
| 2021-01-20T00:24:46.431341
| 2016-01-11T05:59:34
| 2016-01-11T05:59:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 311
|
java
|
package rx.functions;
public abstract interface Func2<T1, T2, R>
extends Function
{
public abstract R call(T1 paramT1, T2 paramT2);
}
/* Location: /Users/michael/Downloads/dex2jar-2.0/GO_JEK.jar!/rx/functions/Func2.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"michael@MJSTONE-MACBOOK.local"
] |
michael@MJSTONE-MACBOOK.local
|
3cf6b21c0f04c5fd9a4bc0621de20082567ca09f
|
66825be6de980385720c12be430feffa7dfef2f5
|
/src/_28_RemoveIf.java
|
a32dab3e626f1c874213c0da6b3c18828d3c482b
|
[] |
no_license
|
Orlando-Houston/JavaOCA
|
c305191af8e5d75d3ad034dfa0e138312ed4e432
|
0bba3c1fccd88ccc6368781f48d5619a264ba638
|
refs/heads/master
| 2023-04-29T06:04:10.606518
| 2021-05-24T16:10:11
| 2021-05-24T16:10:11
| 344,207,834
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 459
|
java
|
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class _28_RemoveIf {
public static void main(String[] args) {
String[]arr={"Hi","How","Are","You"};
List<String > arrList =new ArrayList<> (Arrays.asList (arr));
if (arrList.removeIf (s-> { System.out.print (s); return s.length () >=2;
})){
System.out.println ("removed");
}
// HiHowAreYouremoved
}
}
|
[
"a.ozder@outlook.com"
] |
a.ozder@outlook.com
|
19c920fa9901e085c6e5e8f788c688e3395b98a7
|
365dd8ebb72f54cedeed37272d4db23d139522f4
|
/src/main/java/com/kentington/thaumichorizons/common/lib/EventHandlerWorld.java
|
929f8417953414536ce9c877a78f4be922e19042
|
[] |
no_license
|
Bogdan-G/ThaumicHorizons
|
c05b1fdeda0bdda6d427a39b74cac659661c4cbe
|
83caf754f51091c6b7297c0c68fe8df309d7d7f9
|
refs/heads/master
| 2021-09-10T14:13:54.532269
| 2018-03-27T16:58:15
| 2018-03-27T16:58:15
| 122,425,516
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 753
|
java
|
package com.kentington.thaumichorizons.common.lib;
import com.kentington.thaumichorizons.common.lib.PocketPlaneData;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.event.world.WorldEvent.Load;
import net.minecraftforge.event.world.WorldEvent.Save;
public class EventHandlerWorld {
@SubscribeEvent
public void worldLoad(Load event) {
if(!event.world.isRemote && event.world.provider.dimensionId == 0) {
PocketPlaneData.loadPocketPlanes(event.world);
}
}
@SubscribeEvent
public void worldSave(Save event) {
if(!event.world.isRemote && event.world.provider.dimensionId == 0) {
PocketPlaneData.savePocketPlanes(event.world);
}
}
}
|
[
"bogdangtt@gmail.com"
] |
bogdangtt@gmail.com
|
c2a4b8e71cc672246aac366504f66fff03eb9e94
|
ab618e598da85b8554a79fbf07d936977ca4495a
|
/AttendanceMonitoringSystem/backend-trading/api/src/ph/com/bpi/dao/impl/T0600DAOImpl.java
|
0a78e80f36186602616ccfbb7b20351b6b50152b
|
[] |
no_license
|
chrisjeriel/AttendanceMonitoringSystem
|
1108c55f71dbbb31e09191e47c8035d3f01da467
|
7ce4ee398c091435eefcf4311bc25b0bdc96d22e
|
refs/heads/master
| 2021-01-20T07:09:56.217032
| 2017-05-19T11:46:17
| 2017-05-19T11:46:17
| 89,969,174
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 313
|
java
|
package ph.com.bpi.dao.impl;
import org.hibernate.SessionFactory;
import ph.com.bpi.dao.T0600DAO;
import ph.com.bpi.model.hibernate.T0600;
public class T0600DAOImpl extends BaseDAOImpl<T0600> implements T0600DAO{
public T0600DAOImpl(SessionFactory mSessionFactory) {
super (mSessionFactory, T0600.class);
}
}
|
[
"Christopher Jeriel Sarsonas"
] |
Christopher Jeriel Sarsonas
|
770b06a0befa216d14ac8b28d3d861a42aa2f0f3
|
50cb72436e1545a6ad29298c76ffef42dd08bd2a
|
/Parallel-Concurrent-and-Distributed-Programming/Java Concurrency in Practice/src/main/java/org/oo/demo/pseudo/threadsafety/SafeSequence.java
|
d8d6609f133cb06466277b7fc9ffe761a311c15e
|
[] |
no_license
|
OddUlrich/Parallel-Concurrent-and-Distributed-Programming-in-Java
|
423073b75aed88efcf3e536597cd36dc73e08413
|
839d8ac90da9fbb9688513bdc8660341e8256b05
|
refs/heads/main
| 2023-08-31T07:03:05.376692
| 2023-08-23T16:23:18
| 2023-08-23T16:23:18
| 316,153,376
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 275
|
java
|
package org.oo.demo.pseudo.threadsafety;
import org.oo.demo.annotation.GuardedBy;
import org.oo.demo.annotation.ThreadSafe;
@ThreadSafe
public class SafeSequence {
@GuardedBy("this")
private int value;
public int getNext() {
return value++;
}
}
|
[
"vmoonodd@gmail.com"
] |
vmoonodd@gmail.com
|
7f99dce46559138c39bdcbaa79f2b2441aff9322
|
7e9cb0b3a29dbd7d241640c0dda30b620dae52b9
|
/logging/src/test/java/com/cts/fasttack/logging/interceptor/ExpressionEvaluatorTest.java
|
12f10c405d9d1c1b76ad8a28547beda22009dce3
|
[] |
no_license
|
ilemobayo/FASTTACK
|
f8705ae0b2f5a41487410016756a1b26b0bc5e22
|
85487890b9e5597f9b2b9690713ece2a5c1aff9f
|
refs/heads/master
| 2020-05-26T15:00:06.553982
| 2018-11-30T11:32:39
| 2018-11-30T11:32:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,027
|
java
|
package com.cts.fasttack.logging.interceptor;
import java.lang.reflect.Method;
import com.cts.fasttack.common.core.util.StringUtil;
import org.junit.Test;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.expression.EvaluationContext;
import com.cts.fasttack.logging.interceptor.data.AuthorizeTestObject;
import com.cts.fasttack.logging.interceptor.data.AuthorizeTestService;
import com.cts.fasttack.logging.interceptor.data.DeviceInfoTestObject;
import static org.junit.Assert.assertEquals;
public class ExpressionEvaluatorTest {
private DeviceInfoTestObject deviceInfo = new DeviceInfoTestObject("My Phone", "3F4D62", "ANDROID", "4.4", new String[]{"NFC"});
private AuthorizeTestObject authorize = new AuthorizeTestObject("111000", deviceInfo, "panInternalId", "panInternalGuid", "1000100010001000", "L");
private AuthorizeTestService service = new AuthorizeTestService();
@Test
public void evaluateExpressionTest() throws Throwable {
Method m = AuthorizeTestService.class.getMethod("authenticate", AuthorizeTestObject.class);
MessageHistoryOperation a = AnnotationUtils.getAnnotation(m, MessageHistoryOperation.class);
EvaluationContext context = ExpressionEvaluator.INSTANCE.createEvaluationContext(m, new Object[] {authorize}, service.authenticate(authorize), String.class);
assertEquals("MDES", a.connectorClient());
assertEquals("AUTHENTICATE", a.msgType());
assertEquals("111000", ExpressionEvaluator.INSTANCE.evaluateExpression(a.tokenId(), m, context));
assertEquals(deviceInfo, ExpressionEvaluator.INSTANCE.evaluateExpression(a.rawIn(), m, context));
assertEquals("panInternalId", ExpressionEvaluator.INSTANCE.evaluateExpression(a.panInternalId(), m, context));
assertEquals("panInternalGuid", ExpressionEvaluator.INSTANCE.evaluateExpression(a.panInternalGuid(), m, context));
assertEquals(StringUtil.displayPanOrToken("1000100010001000"), ExpressionEvaluator.INSTANCE.evaluateExpression(a.maskedPan(), m, context));
assertEquals("L", ExpressionEvaluator.INSTANCE.evaluateExpression(a.panSource(), m, context));
assertEquals("01", ExpressionEvaluator.INSTANCE.evaluateExpression(a.errorCode(), m, context));
assertEquals("DECLINE",ExpressionEvaluator.INSTANCE.evaluateExpression(a.decision(), m, context));
assertEquals("R", ExpressionEvaluator.INSTANCE.evaluateExpression(a.cvcResp(), m, context));
}
@Test(expected = RuntimeException.class)
public void evaluateExpressionTestFail() throws Throwable {
Method m = AuthorizeTestService.class.getMethod("fail", AuthorizeTestObject.class);
MessageHistoryOperation a = AnnotationUtils.getAnnotation(m, MessageHistoryOperation.class);
EvaluationContext context = ExpressionEvaluator.INSTANCE.createEvaluationContext(m, new Object[] {authorize}, null, String.class);
ExpressionEvaluator.INSTANCE.evaluateExpression(a.tokenId(), m, context);
}
}
|
[
"a.lazarchuk@cartsys.com.ua"
] |
a.lazarchuk@cartsys.com.ua
|
7e218e57993b9e52e84ea256ab626277d2ac6d9f
|
ca70baa3177bb9f5f57ae0e0edef7b176ee51930
|
/easycode-common/src/main/java/com/easycodebox/common/zookeeper/curator/NamespaceCuratorFrameworkFactory.java
|
8921963c8c351101db969e72bc005f1a262b6d5b
|
[
"Apache-2.0"
] |
permissive
|
easycodebox/easycode
|
5e492af4a6194806a9629fa509e0aec9d3e9a23d
|
802168ffd8cbaa761aee41958ab2bce93890e74a
|
refs/heads/master
| 2023-03-16T06:37:35.245270
| 2020-07-01T11:32:19
| 2020-07-01T11:32:19
| 67,392,510
| 24
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,324
|
java
|
package com.easycodebox.common.zookeeper.curator;
import org.apache.curator.framework.CuratorFramework;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.InitializingBean;
import com.easycodebox.common.validate.Assert;
/**
* 设置CuratorFramework对象的namespace,返回一个新对象(NamespaceFacade),返回的对象不能调用CuratorFramework.close()方法,否则抛异常
* @author WangXiaoJin
*
*/
public class NamespaceCuratorFrameworkFactory implements FactoryBean<CuratorFramework>, InitializingBean {
private CuratorFramework client;
private String namespace;
@Override
public void afterPropertiesSet() throws Exception {
Assert.notNull(client);
}
@Override
public CuratorFramework getObject() throws Exception {
return client.usingNamespace(namespace);
}
@Override
public Class<?> getObjectType() {
return CuratorFramework.class;
}
@Override
public boolean isSingleton() {
return true;
}
public CuratorFramework getClient() {
return client;
}
public void setClient(CuratorFramework client) {
this.client = client;
}
public String getNamespace() {
return namespace;
}
public void setNamespace(String namespace) {
this.namespace = namespace;
}
}
|
[
"381954728@qq.com"
] |
381954728@qq.com
|
520ec49aa3bb4a7a6561244ce81dbc86b0cd68c6
|
e1fde0c2bb2c76b95dc89b0e8949ace93c9875ca
|
/org.summer.view.widget/src/org/summer/view/widget/MultiTrigger.java
|
d914d492288c69e4fc9ea7a207cc5db0eabf0df3
|
[] |
no_license
|
OhmPopy/jswpf
|
09d4fc505b51f915b261e9ad51effca4b06300b9
|
c4e983c4746ce1261dd6b5ab619b677c44d75176
|
refs/heads/master
| 2020-04-29T09:56:02.735280
| 2014-04-21T22:54:37
| 2014-04-21T22:54:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,341
|
java
|
package org.summer.view.widget;
import org.summer.view.widget.collection.HybridDictionary;
import org.summer.view.widget.markup.IAddChild;
/// <summary>
/// A multiple Style property conditional dependency driver
/// </summary>
//[ContentProperty("Setters")]
public /*sealed*/ class MultiTrigger extends TriggerBase implements IAddChild
{
/// <summary>
/// Conditions collection
/// </summary>
// [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public ConditionCollection Conditions
{
get
{
// Verify Context Access
VerifyAccess();
return _conditions;
}
}
/// <summary>
/// Collection of Setter objects, which describes what to apply
/// when this trigger is active.
/// </summary>
// [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public SetterBaseCollection Setters
{
get
{
// Verify Context Access
VerifyAccess();
if( _setters == null )
{
_setters = new SetterBaseCollection();
}
return _setters;
}
}
///<summary>
/// This method is called to Add a Setter Object as a child of the Style.
///</summary>
///<param name="value">
/// The Object to add as a child; it must be a Setter or subclass.
///</param>
public void /*IAddChild.*/AddChild (Object value)
{
// Verify Context Access
VerifyAccess();
Setters.Add(Trigger.CheckChildIsSetter(value));
}
///<summary>
/// This method is called by the parser when text appears under the tag in markup.
/// As default Styles do not support text, calling this method has no effect.
///</summary>
///<param name="text">
/// Text to add as a child.
///</param>
public void /*IAddChild.*/AddText (String text)
{
// Verify Context Access
VerifyAccess();
XamlSerializerUtil.ThrowIfNonWhiteSpaceInAddText(text, this);
}
/*internal*/ public /*override*/ void Seal()
{
if (IsSealed)
{
return;
}
// Process the _setters collection: Copy values into PropertyValueList and seal the Setter objects.
ProcessSettersCollection(_setters);
if (_conditions.Count > 0)
{
// Seal conditions
_conditions.Seal(ValueLookupType.Trigger);
}
// Build conditions array from collection
TriggerConditions = new TriggerCondition[_conditions.Count];
for (int i = 0; i < TriggerConditions.length; i++)
{
TriggerConditions[i] = new TriggerCondition(
_conditions[i].Property,
LogicalOp.Equals,
_conditions[i].Value,
(_conditions[i].SourceName != null) ? _conditions[i].SourceName : StyleHelper.SelfName);
}
// Set conditions array for all property triggers
for (int i = 0; i < PropertyValues.Count; i++)
{
PropertyValue propertyValue = PropertyValues[i];
propertyValue.Conditions = TriggerConditions;
// Put back modified struct
PropertyValues[i] = propertyValue;
}
super.Seal();
}
// evaluate the current state of the trigger
/*internal*/ public /*override*/ boolean GetCurrentState(DependencyObject container, UncommonField<HybridDictionary[]> dataField)
{
boolean retVal = (TriggerConditions.length > 0);
for( int i = 0; retVal && i < TriggerConditions.length; i++ )
{
// Debug.Assert( TriggerConditions[i].SourceChildIndex == 0,
// "This method was created to handle properties on the containing Object, more work is needed to handle templated children too." );
retVal = TriggerConditions[i].Match(container.GetValue(TriggerConditions[i].Property));
}
return retVal;
}
private ConditionCollection _conditions = new ConditionCollection();
private SetterBaseCollection _setters = null;
}
|
[
"1141196380@qq.com"
] |
1141196380@qq.com
|
6f479e171d04b9d1cbf3b43394456bb96f713336
|
0d9f330bcecf399d40b7322ccdaeb0da74a7a1e5
|
/services/hrdb/src/com/auto_ucaaicnlsp/hrdb/controller/QueryExecutionController.java
|
70786694a18497c6181e1daa8e7651f5a080889b
|
[] |
no_license
|
wavemakerapps/Auto_uCAaicnLSp
|
2627f82a5bcd851958f233954d41f3a266fe1f46
|
9f4cd32ec0ced9930cc36d5a609e91844b827083
|
refs/heads/master
| 2021-04-27T20:17:12.995798
| 2018-02-21T18:35:01
| 2018-02-21T18:35:01
| 122,375,213
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,401
|
java
|
/*Copyright (c) 2015-2016 wavemaker.com All Rights Reserved.
This software is the confidential and proprietary information of wavemaker.com You shall not disclose such Confidential Information and shall use it only in accordance
with the terms of the source code license agreement you entered into with wavemaker.com*/
package com.auto_ucaaicnlsp.hrdb.controller;
/*This is a Studio Managed File. DO NOT EDIT THIS FILE. Your changes may be reverted by Studio.*/
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.wavemaker.runtime.data.dao.query.WMQueryExecutor;
import com.wordnik.swagger.annotations.Api;
import com.auto_ucaaicnlsp.hrdb.service.HrdbQueryExecutorService;
@RestController(value = "Hrdb.QueryExecutionController")
@RequestMapping("/hrdb/queryExecutor")
@Api(value = "QueryExecutionController", description = "controller class for query execution")
public class QueryExecutionController {
private static final Logger LOGGER = LoggerFactory.getLogger(QueryExecutionController.class);
@Autowired
private HrdbQueryExecutorService queryService;
}
|
[
"automate1@wavemaker.com"
] |
automate1@wavemaker.com
|
29970093780204d8eeae576fa4b65a22c319cd31
|
b34654bd96750be62556ed368ef4db1043521ff2
|
/confluence_management/tags/version-1.0.0.1/src/java/tests/com/topcoder/confluence/ConfluenceNotAuthorizedExceptionTests.java
|
ec6d149cbefae82a5b2736e720d0a17849da46ec
|
[] |
no_license
|
topcoder-platform/tcs-cronos
|
81fed1e4f19ef60cdc5e5632084695d67275c415
|
c4ad087bb56bdaa19f9890e6580fcc5a3121b6c6
|
refs/heads/master
| 2023-08-03T22:21:52.216762
| 2019-03-19T08:53:31
| 2019-03-19T08:53:31
| 89,589,444
| 0
| 1
| null | 2019-03-19T08:53:32
| 2017-04-27T11:19:01
| null |
UTF-8
|
Java
| false
| false
| 4,394
|
java
|
/*
* Copyright (C) 2008 TopCoder Inc., All Rights Reserved.
*/
package com.topcoder.confluence;
import junit.framework.TestCase;
import com.topcoder.util.errorhandling.ExceptionData;
/**
* <p>
* Unit tests for the <code>ConfluenceNotAuthorizedException</code>.
* </p>
*
* @author TCSDEVELOPER
* @version 1.0
*/
public class ConfluenceNotAuthorizedExceptionTests extends TestCase {
/**
* <p>
* Represents the error message for testing.
* </p>
*/
private static final String MESSAGE = "error message";
/**
* <p>
* Represents the <code>Exception</code> instance used for testing.
* </p>
*/
private static final Exception CAUSE = new Exception();
/**
* <p>
* Represents the <code>ExceptionData</code> instance used for testing.
* </p>
*/
private static final ExceptionData EXCEPTIONDATA = new ExceptionData();
/**
* <p>
* Tests accuracy of <code>ConfluenceNotAuthorizedException(String)</code> constructor.
* </p>
* <p>
* Verifies the error message is properly propagated.
* </p>
*/
public void testCtor1Accuracy() {
ConfluenceNotAuthorizedException exception = new ConfluenceNotAuthorizedException(MESSAGE);
assertNotNull("Unable to instantiate ConfluenceNotAuthorizedException.", exception);
assertEquals("Error message is not properly propagated to super class.", MESSAGE, exception.getMessage());
}
/**
* <p>
* Tests accuracy of <code>ConfluenceNotAuthorizedException(String, Throwable)</code> constructor.
* </p>
* <p>
* Verifies the error message and the cause are properly propagated.
* </p>
*/
public void testCtor2Accuracy() {
ConfluenceNotAuthorizedException exception = new ConfluenceNotAuthorizedException(MESSAGE, CAUSE);
assertNotNull("Unable to instantiate ConfluenceNotAuthorizedException.", exception);
assertEquals("Error message is not properly propagated to super class.", MESSAGE, exception.getMessage());
assertEquals("Cause is not properly propagated to super class.", CAUSE, exception.getCause());
}
/**
* <p>
* Tests accuracy of <code>ConfluenceNotAuthorizedException(String, ExceptionData)</code> constructor.
* </p>
* <p>
* Verifies the error message and the exceptionData are properly propagated.
* </p>
*/
public void testCtor3Accuracy() {
ConfluenceNotAuthorizedException exception = new ConfluenceNotAuthorizedException(MESSAGE, EXCEPTIONDATA);
assertNotNull("Unable to instantiate ConfluenceNotAuthorizedException.", exception);
assertEquals("Error message is not properly propagated to super class.", MESSAGE, exception.getMessage());
assertEquals("ExceptionData is not properly propagated to super class.", EXCEPTIONDATA.getErrorCode(),
exception.getErrorCode());
}
/**
* <p>
* Tests accuracy of <code>ConfluenceNotAuthorizedException(String, Throwable, ExceptionData)</code>
* constructor.
* </p>
* <p>
* Verifies the error message, the cause, and the exceptionData are properly propagated.
* </p>
*/
public void testCtor4Accuracy() {
ConfluenceNotAuthorizedException exception =
new ConfluenceNotAuthorizedException(MESSAGE, CAUSE, EXCEPTIONDATA);
assertNotNull("Unable to instantiate ConfluenceNotAuthorizedException.", exception);
assertEquals("Error message is not properly propagated to super class.", MESSAGE, exception.getMessage());
assertEquals("Cause is not properly propagated to super class.", CAUSE, exception.getCause());
assertEquals("ExceptionData is not properly propagated to super class.", EXCEPTIONDATA.getErrorCode(),
exception.getErrorCode());
}
/**
* <p>
* Inheritance test, verifies <code>ConfluenceNotAuthorizedException</code> subclasses
* <code>ConfluenceManagerException</code>.
* </p>
*/
public void testInheritance() {
assertTrue("ConfluenceNotAuthorizedException does not subclass ConfluenceManagerException.",
new ConfluenceNotAuthorizedException(MESSAGE) instanceof ConfluenceManagerException);
}
}
|
[
"victorsam@fb370eea-3af6-4597-97f7-f7400a59c12a"
] |
victorsam@fb370eea-3af6-4597-97f7-f7400a59c12a
|
031d7824153bba51c7544d510bcce8b78fe024f7
|
37bb0242173cecf022022186de77c5386792cdad
|
/src/introduction/Memorizer.java
|
aff5f3f54f7bba99d29275363aed4a2764223971
|
[] |
no_license
|
aniketmp/Concurrency
|
2a8d081681ce08cc48e8253896d94841f91ff33e
|
79d547652e1c9ffa4b786685ced97ebf6425505c
|
refs/heads/master
| 2021-01-13T02:30:50.932015
| 2017-02-22T13:14:54
| 2017-02-22T13:14:54
| 81,538,159
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,562
|
java
|
package introduction;
import java.math.BigInteger;
import java.util.*;
import java.util.concurrent.*;
/*
*step 1:In this section we develop an efficient and scalable result cache for a computationally expensive function.
Let's start with the obvious approach ?a simple HashMapand then look at some of its concurrency disadvantages and
how to fix them. The Computable<A,V> interface in describes a function with input of type A and result of type V.
ExpensiveFunction, which implements Computable, takes a long time to compute its result; we'd like to create a
Computable wrapper that remembers the results of previous computations and encapsulates the caching process. (This
technique is known as Memorization.)
Memorizer1 in Listing 5.16 shows a first attempt: using a HashMap to store the results of previous computations. The
compute method first checks whether the desired result is already cached, and returns the preͲcomputed value if it is.
Otherwise, the result is computed and cached in the HashMap before returning.
problem of stage 1:
HashMap is not threadͲsafe, so to ensure that two threads do not access the HashMap at the same time, Memorizer1
takes the conservative approach of synchronizing the entire compute method. This ensures thread safety but has an
obvious scalability problem: only one thread at a time can execute compute at all. If another thread is busy computing a
result, other threads calling compute may be blocked for a long time. If multiple threads are queued up waiting to
compute values not already computed, compute may actually take longer than it would have without Memorization.
stage 2:stage 2 improves on the awful concurrent behavior of stage 1 by replacing the HashMap with a
ConcurrentHashMap. Since ConcurrentHashMap is threadͲsafe, there is no need to synchronize when accessing the
backing Map, thus eliminating the serialization induced by synchronizing compute in stage 1.
stage 2 certainly has better concurrent behavior than stage 1: multiple threads can actually use it
concurrently. But it still has some defects as a cache -there is a window of vulnerability in which two threads calling
compute at the same time could end up computing the same value. In the case of memorization, this is merely
inefficient -the purpose of a cache is to prevent the same data from being calculated multiple times. For a more
general-purpose caching mechanism, it is far worse; for an object cache that is supposed to provide once-and-only-once
initialization, this vulnerability would also pose a safety risk.
Problem of stage 2:
The problem with stage 2 is that if one thread starts an expensive computation, other threads are not aware that
the computation is in progress and so may start the same computation. We'd like to
somehow represent the notion that "thread X is currently computing f (27)", so that if another thread arrives looking for
f (27), it knows that the most efficient way to find it is to head over to Thread X's house, hang out there until X is
finished, and then ask "Hey, what did you get for f (27)?"
idea behind stage 3:
We've already seen a class that does almost exactly this: FutureTask. FutureTask represents a computational process
that may or may not already have completed. FutureTask.get returns the result of the computation immediately if it is
available; otherwise it blocks until the result has been computed and then returns it.
stage 3: Stage 3 is present in AdvancedMemorizer class.
to be continued..
*/
public class Memorizer <A, V> implements Computable<A, V> {
//private final Map<A, V> cache = new HashMap<A, V>(); //stage 1
private final Map<A, V> cache = new ConcurrentHashMap<A, V>(); //stage 2
private final Computable<A, V> c;
public Memorizer(Computable<A, V> c)
{
this.c = c;
}
//public synchronized V compute(A arg) throws InterruptedException // stage 1
public V compute(A arg) throws InterruptedException
{
V result = cache.get(arg);
if (result == null)
{
result = c.compute(arg);
cache.put(arg, result);
}
return result;
}
}
interface Computable <A, V> {
V compute(A arg) throws InterruptedException;
}
class ExpensiveFunction implements Computable<String, BigInteger>
{
public BigInteger compute(String arg)
{
// after deep thought...
return new BigInteger(arg);
}
}
|
[
"Admin@Admin-PC"
] |
Admin@Admin-PC
|
2067385c70af44821d0b5aa8ec6a933bbc3ce564
|
7b48b1908f2e23b1d594c3fb0c175364cad8ac6d
|
/edu.pdx.svl.coDoc.cdt.core/src/edu/pdx/svl/coDoc/cdt/internal/core/dom/parser/c/CArrayType.java
|
cef2cd19aaef9d0bf2a30c400997004597a05a75
|
[] |
no_license
|
hellozt/coDoc
|
89bd3928a289dc5a1a53ef81d8048c82eb0cdf46
|
7015c431c9b903a19c0785631c7eb76d857e23cf
|
refs/heads/master
| 2021-01-17T18:23:57.253024
| 2013-05-04T16:09:52
| 2013-05-04T16:09:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,637
|
java
|
/*******************************************************************************
* Copyright (c) 2004, 2005 IBM Corporation 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:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package edu.pdx.svl.coDoc.cdt.internal.core.dom.parser.c;
import edu.pdx.svl.coDoc.cdt.core.dom.ast.DOMException;
import edu.pdx.svl.coDoc.cdt.core.dom.ast.IASTExpression;
import edu.pdx.svl.coDoc.cdt.core.dom.ast.IType;
import edu.pdx.svl.coDoc.cdt.core.dom.ast.ITypedef;
import edu.pdx.svl.coDoc.cdt.core.dom.ast.c.ICASTArrayModifier;
import edu.pdx.svl.coDoc.cdt.core.dom.ast.c.ICArrayType;
import edu.pdx.svl.coDoc.cdt.internal.core.dom.parser.ITypeContainer;
/**
* @author dsteffle
*/
public class CArrayType implements ICArrayType, ITypeContainer {
IType type = null;
ICASTArrayModifier mod = null;
public CArrayType(IType type) {
this.type = type;
}
public boolean isSameType(IType obj) {
if (obj == this)
return true;
if (obj instanceof ITypedef)
return obj.isSameType(this);
if (obj instanceof ICArrayType) {
ICArrayType at = (ICArrayType) obj;
try {
if (isConst() != at.isConst())
return false;
if (isRestrict() != at.isRestrict())
return false;
if (isStatic() != at.isStatic())
return false;
if (isVolatile() != at.isVolatile())
return false;
if (isVariableLength() != at.isVariableLength())
return false;
return at.getType().isSameType(type);
} catch (DOMException e) {
return false;
}
}
return false;
}
/*
* (non-Javadoc)
*
* @see edu.pdx.svl.coDoc.cdt.core.dom.ast.IArrayType#getType()
*/
public IType getType() {
return type;
}
public void setType(IType t) {
this.type = t;
}
public void setModifiedArrayModifier(ICASTArrayModifier mod) {
this.mod = mod;
}
/*
* (non-Javadoc)
*
* @see edu.pdx.svl.coDoc.cdt.core.dom.ast.c.ICArrayType#isConst()
*/
public boolean isConst() {
if (mod == null)
return false;
return mod.isConst();
}
/*
* (non-Javadoc)
*
* @see edu.pdx.svl.coDoc.cdt.core.dom.ast.c.ICArrayType#isRestrict()
*/
public boolean isRestrict() {
if (mod == null)
return false;
return mod.isRestrict();
}
/*
* (non-Javadoc)
*
* @see edu.pdx.svl.coDoc.cdt.core.dom.ast.c.ICArrayType#isVolatile()
*/
public boolean isVolatile() {
if (mod == null)
return false;
return mod.isVolatile();
}
/*
* (non-Javadoc)
*
* @see edu.pdx.svl.coDoc.cdt.core.dom.ast.c.ICArrayType#isStatic()
*/
public boolean isStatic() {
if (mod == null)
return false;
return mod.isStatic();
}
/*
* (non-Javadoc)
*
* @see edu.pdx.svl.coDoc.cdt.core.dom.ast.c.ICArrayType#isVariableLength()
*/
public boolean isVariableLength() {
if (mod == null)
return false;
return mod.isVariableSized();
}
public Object clone() {
IType t = null;
try {
t = (IType) super.clone();
} catch (CloneNotSupportedException e) {
// not going to happen
}
return t;
}
/**
* @return
*/
public ICASTArrayModifier getModifier() {
return mod;
}
/*
* (non-Javadoc)
*
* @see edu.pdx.svl.coDoc.cdt.core.dom.ast.IArrayType#getArraySizeExpression()
*/
public IASTExpression getArraySizeExpression() {
if (mod != null)
return mod.getConstantExpression();
return null;
}
}
|
[
"electronseu@gmail.com"
] |
electronseu@gmail.com
|
f70638c18708806509d771a23a7c96c44825a267
|
6138af219efc3a8f31060e30ebc532ffcbad1768
|
/astrogrid/common/adql-xmlbeans/v1.0a2/target/src/java/org/astrogrid/adql/v1_0/beans/LiteralType.java
|
3306c318d263be5fffb47625c93bf810040de4fc
|
[] |
no_license
|
Javastro/astrogrid-legacy
|
dd794b7867a4ac650d1a84bdef05dfcd135b8bb6
|
51bdbec04bacfc3bcc3af6a896e8c7f603059cd5
|
refs/heads/main
| 2023-06-26T10:23:01.083788
| 2021-07-30T11:17:12
| 2021-07-30T11:17:12
| 391,028,616
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,881
|
java
|
/*
* XML Type: literalType
* Namespace: http://www.ivoa.net/xml/ADQL/v1.0
* Java type: org.astrogrid.adql.v1_0.beans.LiteralType
*
* Automatically generated - do not modify.
*/
package org.astrogrid.adql.v1_0.beans;
/**
* An XML literalType(@http://www.ivoa.net/xml/ADQL/v1.0).
*
* This is a complex type.
*/
public interface LiteralType extends org.apache.xmlbeans.XmlObject
{
public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)schemaorg_apache_xmlbeans.system.s2AEA7D228DB83D6EA12A6A0F2F278CBB.TypeSystemHolder.typeSystem.resolveHandle("literaltypeca1etype");
/**
* A factory class with static methods for creating instances
* of this type.
*/
public static final class Factory
{
/** @deprecated No need to be able to create instances of abstract types */
public static org.astrogrid.adql.v1_0.beans.LiteralType newInstance() {
return (org.astrogrid.adql.v1_0.beans.LiteralType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }
/** @deprecated No need to be able to create instances of abstract types */
public static org.astrogrid.adql.v1_0.beans.LiteralType newInstance(org.apache.xmlbeans.XmlOptions options) {
return (org.astrogrid.adql.v1_0.beans.LiteralType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }
/** @param xmlAsString the string value to parse */
public static org.astrogrid.adql.v1_0.beans.LiteralType parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException {
return (org.astrogrid.adql.v1_0.beans.LiteralType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, null ); }
public static org.astrogrid.adql.v1_0.beans.LiteralType parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
return (org.astrogrid.adql.v1_0.beans.LiteralType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, options ); }
/** @param file the file from which to load an xml document */
public static org.astrogrid.adql.v1_0.beans.LiteralType parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.astrogrid.adql.v1_0.beans.LiteralType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, null ); }
public static org.astrogrid.adql.v1_0.beans.LiteralType parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.astrogrid.adql.v1_0.beans.LiteralType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, options ); }
public static org.astrogrid.adql.v1_0.beans.LiteralType parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.astrogrid.adql.v1_0.beans.LiteralType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, null ); }
public static org.astrogrid.adql.v1_0.beans.LiteralType parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.astrogrid.adql.v1_0.beans.LiteralType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, options ); }
public static org.astrogrid.adql.v1_0.beans.LiteralType parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.astrogrid.adql.v1_0.beans.LiteralType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); }
public static org.astrogrid.adql.v1_0.beans.LiteralType parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.astrogrid.adql.v1_0.beans.LiteralType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, options ); }
public static org.astrogrid.adql.v1_0.beans.LiteralType parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.astrogrid.adql.v1_0.beans.LiteralType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, null ); }
public static org.astrogrid.adql.v1_0.beans.LiteralType parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.astrogrid.adql.v1_0.beans.LiteralType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, options ); }
public static org.astrogrid.adql.v1_0.beans.LiteralType parse(javax.xml.stream.XMLStreamReader sr) throws org.apache.xmlbeans.XmlException {
return (org.astrogrid.adql.v1_0.beans.LiteralType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, null ); }
public static org.astrogrid.adql.v1_0.beans.LiteralType parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
return (org.astrogrid.adql.v1_0.beans.LiteralType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); }
public static org.astrogrid.adql.v1_0.beans.LiteralType parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
return (org.astrogrid.adql.v1_0.beans.LiteralType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, null ); }
public static org.astrogrid.adql.v1_0.beans.LiteralType parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
return (org.astrogrid.adql.v1_0.beans.LiteralType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, options ); }
/** @deprecated {@link XMLInputStream} */
public static org.astrogrid.adql.v1_0.beans.LiteralType parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return (org.astrogrid.adql.v1_0.beans.LiteralType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); }
/** @deprecated {@link XMLInputStream} */
public static org.astrogrid.adql.v1_0.beans.LiteralType parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return (org.astrogrid.adql.v1_0.beans.LiteralType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); }
/** @deprecated {@link XMLInputStream} */
public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); }
/** @deprecated {@link XMLInputStream} */
public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); }
private Factory() { } // No instance of this class allowed
}
}
|
[
"Jeff.Lusted@astrogrid.org"
] |
Jeff.Lusted@astrogrid.org
|
efc6b8ba4151e1905643232cbc91b5e01a4f027e
|
5e933e35df0998d51584b84341cdded343bd8f70
|
/AndEngine/src/org/andengine/util/adt/list/ListUtils.java
|
a1c6d34a0150aa87bf50a5bc0da1cc04ac149862
|
[] |
no_license
|
nullpoin7er/Funky-Domino
|
4b783b7da0dbe96bf50e47d240f55b46215bf44d
|
870f010f787f19814c3be11974253764292fb497
|
refs/heads/master
| 2021-01-17T12:41:30.133134
| 2012-02-26T12:33:36
| 2012-02-26T12:33:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,379
|
java
|
package org.andengine.util.adt.list;
import java.util.ArrayList;
import java.util.List;
import org.andengine.util.adt.queue.IQueue;
import org.andengine.util.adt.queue.concurrent.SynchronizedQueue;
import org.andengine.util.math.MathUtils;
/**
* (c) 2010 Nicolas Gramlich
* (c) 2011 Zynga Inc.
*
* @author Nicolas Gramlich
* @since 12:43:39 - 11.03.2010
*/
public final class ListUtils {
// ===========================================================
// Constants
// ===========================================================
// ===========================================================
// Fields
// ===========================================================
// ===========================================================
// Constructors
// ===========================================================
// ===========================================================
// Getter & Setter
// ===========================================================
// ===========================================================
// Methods for/from SuperClass/Interfaces
// ===========================================================
// ===========================================================
// Methods
// ===========================================================
/**
*
* @param <T>
* @param pQueue
* @return
*/
public static final <T> IQueue<T> synchronizedQueue(final IQueue<T> pQueue) {
return new SynchronizedQueue<T>(pQueue);
}
/**
*
* @param <T>
* @param pList
* @return
*/
public static final <T> T random(final List<T> pList) {
return pList.get(MathUtils.random(0, pList.size() - 1));
}
/**
*
* @param <T>
* @param pItem
* @return
*/
public static final <T> ArrayList<? extends T> toList(final T pItem) {
final ArrayList<T> out = new ArrayList<T>();
out.add(pItem);
return out;
}
/**
*
* @param <T>
* @param pItems
* @return
*/
public static final <T> ArrayList<? extends T> toList(final T ... pItems) {
final ArrayList<T> out = new ArrayList<T>();
final int itemCount = pItems.length;
for(int i = 0; i < itemCount; i++) {
out.add(pItems[i]);
}
return out;
}
/**
*
* @param <T>
* @param pItems
* @param pIndexA
* @param pIndexB
*/
public static <T> void swap(final List<T> pItems, final int pIndexA, final int pIndexB) {
final T tmp = pItems.get(pIndexA);
pItems.set(pIndexA, pItems.get(pIndexB));
pItems.set(pIndexB, tmp);
}
/**
*
* @param <T>
* @param pItems
* @param pIndexA
* @param pIndexB
*/
public static <T> void swap(final IList<T> pItems, final int pIndexA, final int pIndexB) {
final T tmp = pItems.get(pIndexA);
pItems.set(pIndexA, pItems.get(pIndexB));
pItems.set(pIndexB, tmp);
}
/**
*
* @param pIndex
* @return
*/
public static final int encodeInsertionIndex(final int pIndex) {
return (-pIndex) - 1;
}
// ===========================================================
// Inner and Anonymous Classes
// ===========================================================
}
|
[
"guillaumepoiriermorency@gmail.com"
] |
guillaumepoiriermorency@gmail.com
|
50745634c7dcc06131f65cc76c5a94043f707de3
|
774004a61fbc87daf2a51fa8466e7508dbc9f6b6
|
/bqiupu/src/com/borqs/qiupu/fragment/PicsFragment.java
|
19dc72bb378fa66d31bcc8d1b293bb2f5dd5b751
|
[] |
no_license
|
eastlhu/android
|
4f23984a5f11f835a22136ddd95b8f3b964ff3fd
|
0d256031e3c04fffdf61700fcbb49f7fcf93486a
|
refs/heads/master
| 2021-01-21T04:11:53.350910
| 2013-09-24T07:29:49
| 2013-09-24T07:29:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,751
|
java
|
package com.borqs.qiupu.fragment;
import android.os.Bundle;
import android.os.Message;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.borqs.qiupu.QiupuConfig;
import com.borqs.qiupu.R;
import com.borqs.qiupu.cache.ImageRun;
public class PicsFragment extends BasicFragment {
private final String path;
private int position;
public PicsFragment() {
super();
this.path = "";
}
public PicsFragment(int position, String path) {
super();
this.path = path;
this.position = position;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.pics_fragment, null);
ImageView img = (ImageView) view
.findViewById(R.id.img);
shootImageRunner(path,img);
return view;
}
private void shootImageRunner(String photoUrl,ImageView img) {
ImageRun photo_1 = new ImageRun(null, photoUrl, 0);
photo_1.default_image_index = QiupuConfig.DEFAULT_IMAGE_INDEX_SCREENSHOT;
// photo_1.SetOnImageRunListener(new ImageRun.OnImageRunListener() {
//
// @Override
// public void onLoadingFinished() {
// Message msg = mHandler.obtainMessage(LOAD_IMAGE_SUCCESS);
// msg.sendToTarget();
// }
//
// @Override
// public void onLoadingFailed() {
// Message msg = mHandler.obtainMessage(LOAD_IMAGE_FAILED);
// msg.sendToTarget();
// }});
photo_1.addHostAndPath = true;
// photo_1.need_scale = true;
photo_1.noimage = true;
photo_1.isRoate = true;
photo_1.setImageView(img);
photo_1.post(null);
}
}
|
[
"liuhuadong78@gmail.com"
] |
liuhuadong78@gmail.com
|
201c03136a6ec3d8e3e494a8cd900a5767ad33ba
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/10/10_dcd506c6482e7476941a6d4c14b6dd5eb51c85f9/LayoutEditorMatchingStrategy/10_dcd506c6482e7476941a6d4c14b6dd5eb51c85f9_LayoutEditorMatchingStrategy_s.java
|
16ebf7f53d3243e8324c9c1d36cc749d2303b743
|
[] |
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
| 3,376
|
java
|
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Eclipse Public License, Version 1.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/org/documents/epl-v10.php
*
* 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.ide.eclipse.adt.internal.editors.layout;
import com.android.ide.common.resources.ResourceFolder;
import com.android.ide.eclipse.adt.internal.editors.common.CommonXmlEditor;
import com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager;
import com.android.resources.ResourceFolderType;
import org.eclipse.core.resources.IFile;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorMatchingStrategy;
import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.part.FileEditorInput;
/**
* Matching strategy for the Layout Editor. This is used to open all configurations of a layout
* in the same editor.
*/
public class LayoutEditorMatchingStrategy implements IEditorMatchingStrategy {
@Override
public boolean matches(IEditorReference editorRef, IEditorInput input) {
// first check that the file being opened is a layout file.
if (input instanceof FileEditorInput) {
FileEditorInput fileInput = (FileEditorInput)input;
// get the IFile object and check it's in one of the layout folders.
IFile iFile = fileInput.getFile();
ResourceFolder resFolder = ResourceManager.getInstance().getResourceFolder(iFile);
// Per the IEditorMatchingStrategy documentation, editorRef.getEditorInput()
// is expensive so try exclude files that definitely don't match, such
// as those with the wrong extension or wrong file name
if (!iFile.getName().equals(editorRef.getName()) ||
!editorRef.getId().equals(CommonXmlEditor.ID)) {
return false;
}
// if it's a layout, we now check the name of the fileInput against the name of the
// file being currently edited by the editor since those are independent of the config.
if (resFolder != null && resFolder.getType() == ResourceFolderType.LAYOUT) {
try {
IEditorInput editorInput = editorRef.getEditorInput();
if (editorInput instanceof FileEditorInput) {
FileEditorInput editorFileInput = (FileEditorInput)editorInput;
IFile editorIFile = editorFileInput.getFile();
return editorIFile.getProject().equals(iFile.getProject())
&& editorIFile.getName().equals(iFile.getName());
}
} catch (PartInitException e) {
// we do nothing, we'll just return false.
}
}
}
return false;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
eb495962454e64fbff5302af54bdb372c4ca8c56
|
8e2ffc017ed0d90e869345b6d199758e80bb105f
|
/uberfire-security/uberfire-security-management/uberfire-widgets-security-management/src/main/java/org/uberfire/ext/security/management/client/widgets/popup/ErrorBoxView.java
|
0cbccca273d75fedb4c1ecfea1c8e592074a72a0
|
[
"Apache-2.0"
] |
permissive
|
scandihealth/uberfire-extensions
|
eb9cba9bfec85a523ae1414f14088a4956898c5a
|
5fb220ddd472318d309f82e2d303fcf81886b289
|
refs/heads/0.9.0.csc
| 2023-04-16T06:03:31.699196
| 2023-04-11T06:11:39
| 2023-04-11T06:11:39
| 90,751,223
| 0
| 0
|
Apache-2.0
| 2020-05-20T08:47:38
| 2017-05-09T13:51:47
|
Java
|
UTF-8
|
Java
| false
| false
| 1,084
|
java
|
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates.
*
* 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.uberfire.ext.security.management.client.widgets.popup;
import org.uberfire.ext.widgets.common.client.common.popups.errors.ErrorPopup;
/**
* <p>An error box view using <code>org.uberfire.ext.widgets.common.client.common.popups.errors.ErrorPopup</code>.</p>
*
* @since 0.8.0
*/
public class ErrorBoxView implements ErrorBox.View {
@Override
public void show(final String message) {
ErrorPopup.showMessage(message);
}
}
|
[
"christian.sadilek@gmail.com"
] |
christian.sadilek@gmail.com
|
613b74f910c9a1a758d880aa348f8f74309a98c9
|
a756bf302f80a2145c739eff50f16d2f09cdbcf1
|
/src/test/java/com/oth/data/config/WebConfigurerTestController.java
|
b9869ae570aedb87c7f982334ee595524533924c
|
[] |
no_license
|
Grant-Lay/agentCentre
|
94ff31a194a0e7e121ae298b1ccb2a146577b60f
|
82ec8f8f9a030a0856e9402367b02e3d5b193b19
|
refs/heads/master
| 2020-09-13T01:30:59.802573
| 2019-11-19T06:09:29
| 2019-11-19T06:09:29
| 222,621,383
| 0
| 0
| null | 2020-07-18T20:52:17
| 2019-11-19T06:09:17
|
Java
|
UTF-8
|
Java
| false
| false
| 375
|
java
|
package com.oth.data.config;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class WebConfigurerTestController {
@GetMapping("/api/test-cors")
public void testCorsOnApiPath() {
}
@GetMapping("/test/test-cors")
public void testCorsOnOtherPath() {
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
16624ef45da23a51a8d5dd3757221a7584e8ea34
|
2f8160b1e5abfa5420a3af3c7d5fd7a4ac3b3a59
|
/src/main/java/com/microservice/gamification/configuration/WebConfiguration.java
|
ac465d0bdcbecfb4a3368978b5344ff9017fde6e
|
[] |
no_license
|
sbsromero/gamification
|
f4cfe7cae8e3ad9ea1e29ca78b843f057976ce55
|
ed5508a851a6c9ddbe804da578ebcf7b5a6a143d
|
refs/heads/master
| 2020-05-21T21:30:58.505054
| 2019-05-18T16:45:05
| 2019-05-18T16:45:05
| 186,155,299
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 529
|
java
|
package com.microservice.gamification.configuration;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
@EnableWebMvc
public class WebConfiguration implements WebMvcConfigurer{
@Override
public void addCorsMappings(final CorsRegistry registry) {
registry.addMapping("/**");
}
}
|
[
"you@example.com"
] |
you@example.com
|
2b22af21996c6af5d050f55568232adfe1e64118
|
5fd010782dad2fab44b0a11fd6069ef16edc6b6e
|
/03_FRAMEWORKS/JERSEY_RS/JERSEY_RS_DEMO/src/com/myeclipseide/ws/CustomersResource.java
|
4ceb5ab67f3e25fe4e26336f6e05e96518e4f4b3
|
[] |
no_license
|
harrhys/ECLIPSE_WS
|
49c3c5eb7cde2994cfcc59007288a0d10a47b130
|
3acfcad03a1c2020f4ec45d26dd163dc9bde69e8
|
refs/heads/master
| 2022-11-30T09:58:37.640705
| 2020-08-13T04:05:24
| 2020-08-13T04:05:24
| 276,666,955
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,474
|
java
|
package com.myeclipseide.ws;
import java.util.ArrayList;
import java.util.List;
import java.util.TreeMap;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import com.sun.jersey.spi.resource.Singleton;
@Produces("application/xml")
@Path("customers")
@Singleton
public class CustomersResource {
private TreeMap<Integer, Customer> customerMap = new TreeMap<Integer, Customer>();
public CustomersResource() {
// hardcode a single customer into the database for demonstration
// purposes
/*Customer customer = new Customer();
customer.setName("Harold Abernathy");
customer.setAddress("Sheffield, UK");
addCustomer(customer);*/
Customer customer1 = new Customer();
customer1.setName("1Harold Abernathy");
customer1.setAddress("1Sheffield, UK");
addCustomer(customer1);
}
@GET
public List<Customer> getCustomers() {
List<Customer> customers = new ArrayList<Customer>();
customers.addAll(customerMap.values());
return customers;
}
@GET
@Path("{id}")
public Customer getCustomer(@PathParam("id") int cId) {
return customerMap.get(cId);
}
@POST
@Path("add")
@Produces("text/plain")
@Consumes("application/xml")
public String addCustomer(Customer customer) {
int id = customerMap.size();
customer.setId(id);
customerMap.put(id, customer);
return "Customer " + customer.getName() + " added with Id " + id;
}
}
|
[
"harrhys@gmail.com"
] |
harrhys@gmail.com
|
63a498561dcf061962743970afdb36c44517a7a1
|
8abfe589faf5a4859b3a8e298ad5b99f1a7648bf
|
/permission-library/src/main/java/android/support/v7ox/view/CollapsibleActionView.java
|
565acfa7649036f187d7c60b7c4fde3e8cfbaa15
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
qiongqiong-wu/permissionsModule
|
cfb2e4f5b6ca9b80157b5442acd77ee2749c3b99
|
dd126a94188f0ef8011bbfba93656f2da7314a75
|
refs/heads/master
| 2023-03-24T09:23:37.440698
| 2017-06-05T07:57:47
| 2017-06-05T07:57:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,606
|
java
|
/*
* Copyright (C) 2011 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.v7ox.view;
import android.support.v4ox.view.MenuItemCompat.OnActionExpandListener;
/**
* When a {@link android.view.View} implements this interface it will receive callbacks when expanded or
* collapsed as an action view alongside the optional, app-specified callbacks to {@link
* OnActionExpandListener}.
*
* <p>See {@link android.support.v4.view.MenuItemCompat} for more information about action views.
* See {@link android.app.ActionBar} for more information about the action bar.
*/
public interface CollapsibleActionView {
/**
* Called when this view is expanded as an action view. See {@link
* android.support.v4.view.MenuItemCompat#expandActionView(android.view.MenuItem)}.
*/
void onActionViewExpanded();
/**
* Called when this view is collapsed as an action view. See {@link
* android.support.v4.view.MenuItemCompat#collapseActionView(android.view.MenuItem)}.
*/
void onActionViewCollapsed();
}
|
[
"nuborisar@gmail.com"
] |
nuborisar@gmail.com
|
46b484c8a97bb53435e45e5e4f817ce310df0e90
|
8ea08a72049ee945069941f20517ffa77ce84793
|
/araqne-core/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
|
54203fd7570e0bf1633f0a84c0712862578c08e2
|
[
"Apache-2.0"
] |
permissive
|
sunyt/core
|
298714f54f7249965ce0432bd0eb12a705edfac2
|
97d2c53c7eeeb67923369386014fa0d9cd65177a
|
refs/heads/master
| 2020-12-31T03:41:03.136009
| 2016-03-17T05:55:45
| 2016-03-17T05:55:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,263
|
java
|
/*
* Copyright 2009 NCHOVY
*
* 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.slf4j.impl;
import org.slf4j.ILoggerFactory;
import org.slf4j.spi.LoggerFactoryBinder;
public class StaticLoggerBinder implements LoggerFactoryBinder {
public static String REQUESTED_API_VERSION = "1.5.6";
private static final StaticLoggerBinder binder = new StaticLoggerBinder();
private ILoggerFactory loggerFactory = AraqneLoggerFactory.INSTANCE;
public static final StaticLoggerBinder getSingleton() {
return binder;
}
private StaticLoggerBinder() {
}
@Override
public ILoggerFactory getLoggerFactory() {
return loggerFactory;
}
@Override
public String getLoggerFactoryClassStr() {
return loggerFactory.getClass().getName();
}
}
|
[
"xeraph@nchovy.com"
] |
xeraph@nchovy.com
|
c8c23f2caac2d512be1d225f0f42d533eaddc0b3
|
ca3046a6d15260905a94c4163e792f0f84145b36
|
/fichero1/src/fichero1/matriz.java
|
70d01f109eafd0a45359e27c1a27ae3255262306
|
[] |
no_license
|
aavilesv/Java-Ejercicios
|
b3dd1756dba86f4119c19c19d4f8ca95a7e78fc1
|
5be0ff0b1723bb4d8a3670f08ea6615d139b1a36
|
refs/heads/master
| 2023-03-13T04:06:41.968900
| 2021-03-05T18:56:45
| 2021-03-05T18:56:45
| 344,888,534
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,331
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package fichero1;
import javax.swing.JOptionPane;
/**
*/
public class matriz {
private int indicefila;
private int indiceColumana;
private int TamañoFila;
private int TamañoColumna;
private int matriz[][];
public int getIndicefila() {
return indicefila;
}
public int getIndiceColumana() {
return indiceColumana;
}
public int getTamañoFila() {
return TamañoFila;
}
public int getTamañoColumna() {
return TamañoColumna;
}
public int[][] getMatriz() {
return matriz;
}
public void setIndicefila(int indicefila) {
this.indicefila = indicefila;
}
public void setIndiceColumana(int indiceColumana) {
this.indiceColumana = indiceColumana;
}
public void setTamañoFila(int TamañoFila) {
this.TamañoFila = TamañoFila;
}
public void setTamañoColumna(int TamañoColumna) {
this.TamañoColumna = TamañoColumna;
}
public void setMatriz(int[][] matriz) {
this.matriz = matriz;
}
public matriz(int fila, int columna) {
this.matriz = new int[fila][columna];
this.TamañoFila = fila;
this.TamañoColumna = columna;
indicefila = 0;
indiceColumana = 0;
}
public void Ingresar() {
int numero2 = 0;
for (int i = 0; i < matriz.length; i++) {
for (int j = 0; j < matriz[i].length; j++) {
do {
numero2 = Integer.parseInt(JOptionPane.showInputDialog("ingrese numero"));
} while (numero(numero2));
matriz[i][j] = numero2;
indiceColumana++;
}indicefila++;
}
}
public boolean numero(int numero) {
for (int i = 0; i < matriz.length; i++) {
for (int j = 0; j < matriz[i].length; j++) {
if (numero == matriz[i][j]) {
JOptionPane.showMessageDialog(null, "numero repetido en la posicion"+"["+i+"]"+"["+j+"]"+matriz[i][j]); return true;
}
}
}
return false;
}
}
|
[
"you@example.com"
] |
you@example.com
|
6ece03e16c8dfc0f4efa53dd4f490d08c3dd46c5
|
342742954a6c66a3c042ae810fdaf9d91a67669f
|
/goja-core/src/main/java/goja/jxls/model/Point.java
|
1f131864754717ab870ac66bb620bdd981fed042
|
[
"MIT",
"Apache-2.0"
] |
permissive
|
Tifancy/goja
|
73055812b9a9d3015d65188f6f658ef01f84c443
|
444e92b88d4b0d6041b00b760934c164782a68fc
|
refs/heads/master
| 2021-01-17T23:29:54.321444
| 2015-05-24T12:40:43
| 2015-05-24T12:40:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,963
|
java
|
package goja.jxls.model;
import org.apache.poi.ss.util.CellReference;
/**
* Represents a single cell
*
* @author Leonid Vysochyn
*/
public class Point {
int row;
short col;
public Point(int row, short col) {
this.row = row;
this.col = col;
}
public Point(String refCell) {
CellReference cellReference = new CellReference(refCell);
row = cellReference.getRow();
col = cellReference.getCol();
}
public Point shift(int rowOffset, int colOffset) {
return new Point(row + rowOffset, (short) (col + colOffset));
}
public int getRow() {
return row;
}
public void setRow(int row) {
this.row = row;
}
public short getCol() {
return col;
}
public void setCol(short col) {
this.col = col;
}
public String getCellRef() {
CellReference cellRef = new CellReference(row, col, false, false);
return cellRef.formatAsString();
}
public String toString() {
return "(" + row + "," + col + ")";
}
public String toString(String sheetName) {
String cellname;
CellReference cellRef = new CellReference(row, col, false, false);
if (sheetName != null) {
cellname = sheetName + "!" + cellRef.formatAsString();
} else {
cellname = cellRef.formatAsString();
}
return cellname;
}
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
final Point point = (Point) o;
if (col != point.col) {
return false;
}
if (row != point.row) {
return false;
}
return true;
}
public int hashCode() {
int result;
result = row;
result = 29 * result + col;
return result;
}
}
|
[
"poplar1123@gmail.com"
] |
poplar1123@gmail.com
|
79b7e43db3a8e684dc47177d7692b7099166e139
|
fa29571ec1a5c6988e2054078b144262b5fbbef0
|
/fml-parser/src/main/java/org/openflexo/foundation/fml/parser/node/PElementValuePair.java
|
544fbace62a8d2c94d21cf8fce3927f918244813
|
[] |
no_license
|
woutersl/openflexo-core
|
e4dde5b21b7fa5f416bd4ac99d5d88398419493b
|
85fe6334f5534b57d22fbef7d4f6138062890ca2
|
refs/heads/1.7.1
| 2021-01-22T20:34:43.071812
| 2015-04-02T08:45:59
| 2015-04-02T08:45:59
| 33,298,501
| 0
| 0
| null | 2015-04-02T08:38:01
| 2015-04-02T08:38:01
| null |
UTF-8
|
Java
| false
| false
| 195
|
java
|
/* This file was generated by SableCC (http://www.sablecc.org/). */
package org.openflexo.foundation.fml.parser.node;
public abstract class PElementValuePair extends Node
{
// Empty body
}
|
[
"sylvain@openflexo.org"
] |
sylvain@openflexo.org
|
ee2ac8dff56da44d083160bac3964956d8ba554d
|
7cf031b56eaa6ac9b9dd7ff022d16485596bf871
|
/core/src/main/java/org/mariotaku/library/logansquare/extension/annotation/Implementation.java
|
a3a0605472a65001295d3c5675e6f5eded2a6efb
|
[] |
no_license
|
mariotaku/LoganSquareExtension
|
3005c396fd815e9579da4caef9db7d02b7d998c5
|
1f6ba4cf0431c39d6a77a6a403817c864f6a3e00
|
refs/heads/master
| 2021-01-10T07:13:31.092384
| 2015-12-13T06:22:23
| 2015-12-13T06:22:23
| 44,654,026
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,185
|
java
|
/*
* Twidere - Twitter client for Android
*
* Copyright (C) 2012-2015 Mariotaku Lee <mariotaku.lee@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mariotaku.library.logansquare.extension.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Created by mariotaku on 15/10/21.
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.CLASS)
public @interface Implementation {
Class<?> value();
}
|
[
"mariotaku.lee@gmail.com"
] |
mariotaku.lee@gmail.com
|
e64e251711b0d2c341bcdf7457d0cf347896361c
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project52/src/test/java/org/gradle/test/performance52_3/Test52_238.java
|
12bd89440ddf7c999853a7892c8be19d60d091c0
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 292
|
java
|
package org.gradle.test.performance52_3;
import static org.junit.Assert.*;
public class Test52_238 {
private final Production52_238 production = new Production52_238("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.