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
bc9d832d0c561655c395e9f64723be314723552a
3374f62c624c1e133ffcdd340713a50303cb7c6d
/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/traverser/TypeExtractorAbstract.java
8f61daf38f72a3c49a828469118b45262aba206e
[ "Apache-2.0" ]
permissive
DalavanCloud/isis
83b6d6437a3ca3b7e0442ed1b8b5dbc3ae67ef1e
2af2ef3e2edcb807d742f089839e0571d8132bd9
refs/heads/master
2020-04-29T10:08:49.816838
2019-02-11T23:35:56
2019-02-11T23:35:56
176,051,163
1
0
Apache-2.0
2019-03-17T03:19:31
2019-03-17T03:19:31
null
UTF-8
Java
false
false
2,764
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.isis.core.metamodel.specloader.traverser; import java.lang.reflect.Method; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; /** * Abstract base class factoring out common functionality for helper methods * that extract parameterized types. * */ abstract class TypeExtractorAbstract implements Iterable<Class<?>> { private final Method method; private final List<Class<?>> classes = new ArrayList<Class<?>>(); public TypeExtractorAbstract(final Method method) { this.method = method; } protected void addParameterizedTypes(final Type... genericTypes) { for (final Type genericType : genericTypes) { if (genericType instanceof ParameterizedType) { final ParameterizedType parameterizedType = (ParameterizedType) genericType; final Type[] typeArguments = parameterizedType.getActualTypeArguments(); for (final Type type : typeArguments) { if (type instanceof Class) { final Class<?> cls = (Class<?>) type; add(cls); } } } } } /** * Adds to {@link #getClasses() list of classes}, provided not {@link Void}. */ protected void add(final Class<?> cls) { if (cls == void.class) { return; } classes.add(cls); } /** * The {@link Method} provided in the {@link #TypeExtractorAbstract(Method) * constructor.} */ protected Method getMethod() { return method; } public List<Class<?>> getClasses() { return Collections.unmodifiableList(classes); } @Override public Iterator<Class<?>> iterator() { return getClasses().iterator(); } }
[ "danhaywood@apache.org" ]
danhaywood@apache.org
268afc739a153b4cf0c4d29f03594fd9c5ba69dd
d438925835d0b610834e2f2891cd4b4a1571abb4
/employee-service/src/main/java/hu/takarek/ose/employee/controller/EmployeeController.java
b057b0cb1f1e93eadd9c79950620cb11bd29f0ea
[]
no_license
kcsanad/sample-spring-microservices-ose
2d130fd594d737fe3bb6da41b78575ecd62f6e2b
5337fbf37f802cdda4cefbcf1379902932193d44
refs/heads/master
2020-05-17T16:19:49.773724
2019-04-27T19:38:06
2019-04-27T19:38:06
183,814,364
0
0
null
null
null
null
UTF-8
Java
false
false
1,907
java
package hu.takarek.ose.employee.controller; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import hu.takarek.ose.employee.model.Employee; import hu.takarek.ose.employee.repository.EmployeeRepository; import io.micrometer.core.instrument.MeterRegistry; @RestController @RequestMapping("/employee") public class EmployeeController { private static final Logger LOGGER = LoggerFactory.getLogger(EmployeeController.class); @Autowired EmployeeRepository repository; @Autowired MeterRegistry registry; @PostMapping("/") public Employee add(@RequestBody Employee employee) { registry.counter("employee.add","level", "normal").increment(); LOGGER.info("Employee add: {}", employee); return repository.save(employee); } @GetMapping("/{id}") public Employee findById(@PathVariable("id") String id) { registry.counter("employee.find", "level","normal").increment(); LOGGER.info("Employee find: id={}", id); return repository.findById(id).get(); } @GetMapping("/") public Iterable<Employee> findAll() { registry.counter("employee.find", "level","normal").increment(); LOGGER.info("Employee find"); return repository.findAll(); } @GetMapping("/department/{departmentId}") public List<Employee> findByDepartment(@PathVariable("departmentId") String departmentId) { LOGGER.info("Employee find: departmentId={}", departmentId); return repository.findByDepartmentId(departmentId); } @GetMapping("/organization/{organizationId}") public List<Employee> findByOrganization(@PathVariable("organizationId") String organizationId) { LOGGER.info("Employee find: organizationId={}", organizationId); return repository.findByOrganizationId(organizationId); } }
[ "admin@example.com" ]
admin@example.com
f35e3e8f17396e2f9a3569b8a9e7df6dc0cf0618
78f284cd59ae5795f0717173f50e0ebe96228e96
/factura-negocio/src/cl/stotomas/factura/negocio/formulario_12/copy4/TestingError.java
d2573100b6e34414b97e5a2869eecb1f1a9a0b1b
[]
no_license
Pattricio/Factura
ebb394e525dfebc97ee2225ffc5fca10962ff477
eae66593ac653f85d05071b6ccb97fb1e058502d
refs/heads/master
2020-03-16T03:08:45.822070
2018-05-07T15:29:25
2018-05-07T15:29:25
132,481,305
0
0
null
null
null
null
ISO-8859-1
Java
false
false
1,197
java
package cl.stotomas.factura.negocio.formulario_12.copy4; import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; //import cl.stomas.factura.negocio.testing.TestingFinal.Echo; public class TestingError { public static String decryptMessage(final byte[] message, byte[] secretKey) { try { // CÓDIGO VULNERABLE final SecretKeySpec KeySpec = new SecretKeySpec(secretKey, "DES"); final Cipher cipher = Cipher.getInstance("DES/ECB/PKCS5Padding"); cipher.init(Cipher.DECRYPT_MODE, KeySpec); // RECOMENDACIÓN VERACODE // final Cipher cipher = Cipher.getInstance("DES..."); // cipher.init(Cipher.DECRYPT_MODE, KeySpec); return new String(cipher.doFinal(message)); } catch(Exception e) { e.printStackTrace(); } return null; } class Echo { // Control de Proceso // Posible reemplazo de librería por una maliciosa // Donde además se nos muestra el nombre explícito de esta. public native void runEcho(); { System.loadLibrary("echo"); // Se carga librería } public void main(String[] args) { new Echo().runEcho(); } } }
[ "Adriana Molano@DESKTOP-GQ96FK8" ]
Adriana Molano@DESKTOP-GQ96FK8
3e416e3a338bad8ab79ae64f1b87070aac53c53c
a1935a17abf8429c59baf02e44efcd70cbf25b80
/services/testProfileDB/src/com/completeprofileproject/testprofiledb/service/TestProfileDBQueryExecutorServiceImpl.java
cf1e827fe5aaaa63067ef1f60af75cfb183accf4
[]
no_license
wavemakerapps/CompleteProfileProject_10version
2308d87cffa1517da4e19041201d6106b7890802
e592418ef9f7d7875848cd9bbbfeb13eba7fdd9d
refs/heads/master
2020-05-07T13:38:54.726056
2019-04-10T10:26:28
2019-04-10T10:26:28
180,558,503
0
0
null
null
null
null
UTF-8
Java
false
false
2,362
java
/*Copyright (c) 2016-2017 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.completeprofileproject.testprofiledb.service; /*This is a Studio Managed File. DO NOT EDIT THIS FILE. Your changes may be reverted by Studio.*/ import java.io.OutputStream; import java.util.HashMap; import java.util.Map; 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.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.wavemaker.runtime.data.dao.query.WMQueryExecutor; import com.wavemaker.runtime.data.export.ExportOptions; import com.wavemaker.runtime.data.model.QueryProcedureInput; import com.completeprofileproject.testprofiledb.models.query.*; @Service public class TestProfileDBQueryExecutorServiceImpl implements TestProfileDBQueryExecutorService { private static final Logger LOGGER = LoggerFactory.getLogger(TestProfileDBQueryExecutorServiceImpl.class); @Autowired @Qualifier("testProfileDBWMQueryExecutor") private WMQueryExecutor queryExecutor; @Transactional(value = "testProfileDBTransactionManager", readOnly = true) @Override public Page<TestQueryResponse> executeTestQuery(Pageable pageable) { Map<String, Object> params = new HashMap<>(0); return queryExecutor.executeNamedQuery("testQuery", params, TestQueryResponse.class, pageable); } @Transactional(value = "testProfileDBTransactionManager", timeout = 300, readOnly = true) @Override public void exportTestQuery(ExportOptions exportOptions, Pageable pageable, OutputStream outputStream) { Map<String, Object> params = new HashMap<>(0); QueryProcedureInput<TestQueryResponse> queryInput = new QueryProcedureInput<>("testQuery", params, TestQueryResponse.class); queryExecutor.exportNamedQueryData(queryInput, exportOptions, pageable, outputStream); } }
[ "tejaswi.maryala+62@wavemaker.com" ]
tejaswi.maryala+62@wavemaker.com
b81e7eb9ad7765a9fc20931c9c6bc8e832c95938
9b5acec765fcccbe7eac378031bf63907f770b18
/KeBaiWei/src/com/kebaiwei/utils/KbwUtils.java
777efc1146bd0bb16f549550015f232904d5f450
[]
no_license
charmingfst/chm
677beb7c7c85fbd6feb9aa423bfa047151317195
f61cb03b17e7b28f9676dbe13d4713bc25829da1
refs/heads/master
2021-01-17T09:01:49.262847
2016-03-29T06:00:11
2016-03-29T06:00:11
37,236,271
0
0
null
null
null
null
GB18030
Java
false
false
3,217
java
package com.kebaiwei.utils; import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; import java.security.MessageDigest; import java.util.UUID; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Matrix; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.util.DisplayMetrics; /** * @author 陈明 * @date 2015-3-26 下午12:49:41 * @description TODO */ public class KbwUtils { public static Context context; public static void init(Context context) { KbwUtils.context = context; } public static int getScreenWidth(Context context) { DisplayMetrics dm = context.getResources().getDisplayMetrics(); return dm.widthPixels; } public static int getScreenHeight(Context context) { DisplayMetrics dm = context.getResources().getDisplayMetrics(); return dm.heightPixels; } // 图片Url保存为位图并进行缩放操作 // 通过传入图片url获取位图方法 public static Bitmap returnBitMap(String url) { URL myFileUrl = null; Bitmap bitmap = null; try { myFileUrl = new URL(url); } catch (MalformedURLException e) { e.printStackTrace(); } try { HttpURLConnection conn = (HttpURLConnection) myFileUrl .openConnection(); conn.setDoInput(true); conn.connect(); InputStream is = conn.getInputStream(); bitmap = BitmapFactory.decodeStream(is); is.close(); } catch (IOException e) { e.printStackTrace(); } // Log.v(tag, bitmap.toString()); return bitmap; } // 通过传入位图,新的宽.高比进行位图的缩放操作 public static Drawable resizeImage(Bitmap bitmap, int w, int h) { // load the origial Bitmap Bitmap BitmapOrg = bitmap; int width = BitmapOrg.getWidth(); int height = BitmapOrg.getHeight(); int newWidth = w; int newHeight = h; // Log.v(tag, String.valueOf(width)); // Log.v(tag, String.valueOf(height)); // // Log.v(tag, String.valueOf(newWidth)); // Log.v(tag, String.valueOf(newHeight)); // calculate the scale float scaleWidth = ((float) newWidth) / width; float scaleHeight = ((float) newHeight) / height; // create a matrix for the manipulation Matrix matrix = new Matrix(); // resize the Bitmap matrix.postScale(scaleWidth, scaleHeight); // if you want to rotate the Bitmap // matrix.postRotate(45); // recreate the new Bitmap Bitmap resizedBitmap = Bitmap.createBitmap(BitmapOrg, 0, 0, width, height, matrix, true); // make a Drawable from Bitmap to allow to set the Bitmap // to the ImageView, ImageButton or what ever return new BitmapDrawable(resizedBitmap); } // (Universally Unique Identifier)全局唯一标识符,产生全球唯一id public synchronized static String orderNumGenerator() { UUID uuid = UUID.randomUUID(); return uuid.toString(); } public static void jdkmd(String str) { try { MessageDigest md = MessageDigest.getInstance("md5"); byte[] encodeBytes = md.digest(str.getBytes()); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
[ "572663328@qq.com" ]
572663328@qq.com
1d87a940c4d3bedcfd806dec97a16399214a4a89
e05cf54cd7f2a6a3f95797f0ad4b6891156b82f3
/out/smali/com/kingroot/kinguser/s.java
e1e27b0b5b618ea8e4927e6c3af6b21b0db89617
[]
no_license
chenxiaoyoyo/KROutCode
fda014c0bdd9c38b5b79203de91634a71b10540b
f879c2815c4e1d570b6362db7430cb835a605cf0
refs/heads/master
2021-01-10T13:37:05.853091
2016-02-04T08:03:57
2016-02-04T08:03:57
49,871,343
0
0
null
null
null
null
UTF-8
Java
false
false
5,583
java
package com.kingroot.kinguser; class s { void a() { int a; a=0;// .class public Lcom/kingroot/kinguser/s; a=0;// .super Ljava/lang/Object; a=0;// .source "SourceFile" a=0;// a=0;// # interfaces a=0;// .implements Lcom/kingroot/kinguser/e; a=0;// a=0;// a=0;// # instance fields a=0;// .field private final ac:Lcom/kingroot/kinguser/u; a=0;// a=0;// .field private final ad:Ljava/lang/String; a=0;// a=0;// .field private final l:I a=0;// a=0;// .field private final u:Ljava/lang/String; a=0;// a=0;// .field private final v:Ljava/lang/String; a=0;// a=0;// .field private final w:Ljava/lang/String; a=0;// a=0;// .field private final y:Ljava/lang/String; a=0;// a=0;// a=0;// # direct methods a=0;// .method public constructor <init>(Landroid/content/Context;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Lcom/kingroot/kinguser/u;)V a=0;// .locals 2 a=0;// a=0;// .prologue a=0;// .line 23 a=0;// invoke-direct {p0}, Ljava/lang/Object;-><init>()V a=0;// a=0;// .line 25 a=0;// #p0=(Reference,Lcom/kingroot/kinguser/s;); a=0;// iput-object p2, p0, Lcom/kingroot/kinguser/s;->ad:Ljava/lang/String; a=0;// a=0;// .line 26 a=0;// iput-object p4, p0, Lcom/kingroot/kinguser/s;->u:Ljava/lang/String; a=0;// a=0;// .line 27 a=0;// iput-object p6, p0, Lcom/kingroot/kinguser/s;->ac:Lcom/kingroot/kinguser/u; a=0;// a=0;// .line 28 a=0;// iput-object p5, p0, Lcom/kingroot/kinguser/s;->v:Ljava/lang/String; a=0;// a=0;// .line 29 a=0;// iput p3, p0, Lcom/kingroot/kinguser/s;->l:I a=0;// a=0;// .line 30 a=0;// invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String; a=0;// a=0;// move-result-object v0 a=0;// a=0;// #v0=(Reference,Ljava/lang/String;); a=0;// iput-object v0, p0, Lcom/kingroot/kinguser/s;->w:Ljava/lang/String; a=0;// a=0;// .line 32 a=0;// new-instance v0, Ljava/lang/StringBuilder; a=0;// a=0;// #v0=(UninitRef,Ljava/lang/StringBuilder;); a=0;// invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V a=0;// a=0;// #v0=(Reference,Ljava/lang/StringBuilder;); a=0;// const-string v1, "\'" a=0;// a=0;// #v1=(Reference,Ljava/lang/String;); a=0;// invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; a=0;// a=0;// move-result-object v0 a=0;// a=0;// invoke-virtual {p6, p1, p3}, Lcom/kingroot/kinguser/u;->a(Landroid/content/Context;I)Ljava/lang/String; a=0;// a=0;// move-result-object v1 a=0;// a=0;// invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; a=0;// a=0;// move-result-object v0 a=0;// a=0;// const-string v1, "\'" a=0;// a=0;// invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; a=0;// a=0;// move-result-object v0 a=0;// a=0;// invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; a=0;// a=0;// move-result-object v0 a=0;// a=0;// iput-object v0, p0, Lcom/kingroot/kinguser/s;->y:Ljava/lang/String; a=0;// a=0;// .line 33 a=0;// return-void a=0;// .end method a=0;// a=0;// a=0;// # virtual methods a=0;// .method public N()Ljava/lang/String; a=0;// .locals 1 a=0;// a=0;// .prologue a=0;// .line 56 a=0;// iget-object v0, p0, Lcom/kingroot/kinguser/s;->ad:Ljava/lang/String; a=0;// a=0;// #v0=(Reference,Ljava/lang/String;); a=0;// return-object v0 a=0;// .end method a=0;// a=0;// .method public O()Ljava/lang/String; a=0;// .locals 1 a=0;// a=0;// .prologue a=0;// .line 41 a=0;// iget-object v0, p0, Lcom/kingroot/kinguser/s;->u:Ljava/lang/String; a=0;// a=0;// #v0=(Reference,Ljava/lang/String;); a=0;// return-object v0 a=0;// .end method a=0;// a=0;// .method public P()Ljava/lang/String; a=0;// .locals 1 a=0;// a=0;// .prologue a=0;// .line 46 a=0;// iget-object v0, p0, Lcom/kingroot/kinguser/s;->v:Ljava/lang/String; a=0;// a=0;// #v0=(Reference,Ljava/lang/String;); a=0;// return-object v0 a=0;// .end method a=0;// a=0;// .method public Q()Lcom/kingroot/kinguser/u; a=0;// .locals 1 a=0;// a=0;// .prologue a=0;// .line 36 a=0;// iget-object v0, p0, Lcom/kingroot/kinguser/s;->ac:Lcom/kingroot/kinguser/u; a=0;// a=0;// #v0=(Reference,Lcom/kingroot/kinguser/u;); a=0;// return-object v0 a=0;// .end method a=0;// a=0;// .method public a()Ljava/lang/String; a=0;// .locals 1 a=0;// a=0;// .prologue a=0;// .line 61 a=0;// const-string v0, "zgoJavaStart" a=0;// a=0;// #v0=(Reference,Ljava/lang/String;); a=0;// return-object v0 a=0;// .end method a=0;// a=0;// .method public b()Ljava/lang/String; a=0;// .locals 1 a=0;// a=0;// .prologue a=0;// .line 66 a=0;// iget-object v0, p0, Lcom/kingroot/kinguser/s;->y:Ljava/lang/String; a=0;// a=0;// #v0=(Reference,Ljava/lang/String;); a=0;// return-object v0 a=0;// .end method a=0;// a=0;// .method public c()Ljava/lang/String; a=0;// .locals 1 a=0;// a=0;// .prologue a=0;// .line 71 a=0;// iget-object v0, p0, Lcom/kingroot/kinguser/s;->w:Ljava/lang/String; a=0;// a=0;// #v0=(Reference,Ljava/lang/String;); a=0;// return-object v0 a=0;// .end method a=0;// a=0;// .method public getPid()I a=0;// .locals 1 a=0;// a=0;// .prologue a=0;// .line 51 a=0;// iget v0, p0, Lcom/kingroot/kinguser/s;->l:I a=0;// a=0;// #v0=(Integer); a=0;// return v0 a=0;// .end method }}
[ "chenyouzi@sogou-inc.com" ]
chenyouzi@sogou-inc.com
df8b688a624ff96ee9da4b572377545555bb113c
d0969e8811c0aeee14674813a83959e3c949e875
/471/A/Main.java
f29d638467e09f0ec7bf48daefebd6874d83c5ff
[]
no_license
charles-wangkai/codeforces
738354a0c4bb0d83bb0ff431a0d1f39c5e5eab5c
b61ee17b1dea78c74d7ac2f31c4a1ddc230681a7
refs/heads/master
2023-09-01T09:07:31.814311
2023-09-01T01:34:10
2023-09-01T01:34:10
161,009,629
39
14
null
2020-10-01T17:43:45
2018-12-09T06:00:22
Java
UTF-8
Java
false
false
793
java
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] l = new int[6]; for (int i = 0; i < l.length; i++) { l[i] = sc.nextInt(); } System.out.println(solve(l)); sc.close(); } static String solve(int[] l) { Arrays.sort(l); if (canMakeBear(l)) { return "Bear"; } else if (canMakeElephant(l)) { return "Elephant"; } else { return "Alien"; } } static boolean canMakeBear(int[] l) { return (l[0] == l[3] && l[4] != l[5]) || (l[1] == l[4] && l[0] != l[5]) || (l[2] == l[5] && l[0] != l[1]); } static boolean canMakeElephant(int[] l) { return (l[0] == l[3] && l[4] == l[5]) || (l[1] == l[4] && l[0] == l[5]) || (l[2] == l[5] && l[0] == l[1]); } }
[ "charles.wangkai@gmail.com" ]
charles.wangkai@gmail.com
4e737122c013691b8a56b272a1693664a153d834
8cefcd801f8e9b69a93edbd1f75d99f77171c303
/src/cn/year2020/dongyao/TestDemo.java
122cd1e1e6ede6e14649478d8da53b1c9a938364
[ "MIT" ]
permissive
chywx/JavaSE-chy
3219fe50df03ee1efb5dbdf26d3ea11d76929ee4
3f8ac7eaf2a1d87745f6eea996cf72f73450b05e
refs/heads/master
2023-04-30T21:12:25.172175
2023-04-21T02:18:19
2023-04-21T02:18:19
166,914,146
5
4
null
2021-10-09T02:12:11
2019-01-22T02:35:30
Java
UTF-8
Java
false
false
1,412
java
package cn.year2020.dongyao; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.TreeMap; /** * @author chy * @date 2020/8/20 0020 */ public class TestDemo { public static void main(String[] args) { List<Person> list = new ArrayList<Person>() {{ add(new Person(3)); add(new Person(22)); add(new Person(13)); add(new Person(11)); add(new Person(34)); add(new Person(21)); add(new Person(21)); add(new Person(31)); add(new Person(11)); add(new Person(13)); add(new Person(51)); add(new Person(3)); add(new Person(11)); add(new Person(3)); }}; // 统计出各个年龄的人数并打印,且按年龄排序,如下所示 // 1→1 // 2→1 // 3→2 Map<Integer, Integer> map = new TreeMap<>(); for (Person person : list) { map.put(person.getAge(), map.getOrDefault(person.getAge(), 0) + 1); } map.entrySet().forEach(p -> System.out.println(p.getKey() + "→" + p.getValue())); } } class Person { private int age; public Person(int age) { this.age = age; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } }
[ "1559843332@qq.com" ]
1559843332@qq.com
5941c73dcb4382dfee3112d33766f06175725454
d280800ca4ec277f7f2cdabc459853a46bf87a7c
/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/influx/InfluxPropertiesConfigAdapter.java
13fbe691075f81b761103b95f677355b9b0f9601
[ "Apache-2.0" ]
permissive
qqqqqcjq/spring-boot-2.1.x
e5ca46d93eeb6a5d17ed97a0b565f6f5ed814dbb
238ffa349a961d292d859e6cc2360ad53b29dfd0
refs/heads/master
2023-03-12T12:50:11.619493
2021-03-01T05:32:52
2021-03-01T05:32:52
343,275,523
0
0
null
null
null
null
UTF-8
Java
false
false
2,801
java
/* * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://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.springframework.boot.actuate.autoconfigure.metrics.export.influx; import io.micrometer.influx.InfluxConfig; import io.micrometer.influx.InfluxConsistency; import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesConfigAdapter; /** * Adapter to convert {@link InfluxProperties} to an {@link InfluxConfig}. * * @author Jon Schneider * @author Phillip Webb */ class InfluxPropertiesConfigAdapter extends StepRegistryPropertiesConfigAdapter<InfluxProperties> implements InfluxConfig { InfluxPropertiesConfigAdapter(InfluxProperties properties) { super(properties); } @Override public String db() { return get(InfluxProperties::getDb, InfluxConfig.super::db); } @Override public InfluxConsistency consistency() { return get(InfluxProperties::getConsistency, InfluxConfig.super::consistency); } @Override public String userName() { return get(InfluxProperties::getUserName, InfluxConfig.super::userName); } @Override public String password() { return get(InfluxProperties::getPassword, InfluxConfig.super::password); } @Override public String retentionPolicy() { return get(InfluxProperties::getRetentionPolicy, InfluxConfig.super::retentionPolicy); } @Override public Integer retentionReplicationFactor() { return get(InfluxProperties::getRetentionReplicationFactor, InfluxConfig.super::retentionReplicationFactor); } @Override public String retentionDuration() { return get(InfluxProperties::getRetentionDuration, InfluxConfig.super::retentionDuration); } @Override public String retentionShardDuration() { return get(InfluxProperties::getRetentionShardDuration, InfluxConfig.super::retentionShardDuration); } @Override public String uri() { return get(InfluxProperties::getUri, InfluxConfig.super::uri); } @Override public boolean compressed() { return get(InfluxProperties::isCompressed, InfluxConfig.super::compressed); } @Override public boolean autoCreateDb() { return get(InfluxProperties::isAutoCreateDb, InfluxConfig.super::autoCreateDb); } }
[ "caverspark@163.com" ]
caverspark@163.com
7cb982b92653907699f36da796d4e10f7ee3522d
e72267e4c674dc3857dc91db556572534ecf6d29
/mybatis-3-master/src/main/java/org/apache/ibatis/executor/statement/RoutingStatementHandler.java
77c6345fa7962588dadb95cfc8642ff1057ca711
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "BSD-3-Clause" ]
permissive
lydon-GH/mybatis-study
4be7f279529a33ead3efa9cd79d60cd44d2184a9
a8a89940bfa6bb790e78e1c28b0c7c0a5d69e491
refs/heads/main
2023-07-29T06:55:56.549751
2021-09-04T09:08:25
2021-09-04T09:08:25
403,011,812
0
0
null
null
null
null
UTF-8
Java
false
false
3,145
java
/* * Copyright ${license.git.copyrightYears} the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ibatis.executor.statement; import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; import java.util.List; import org.apache.ibatis.cursor.Cursor; import org.apache.ibatis.executor.Executor; import org.apache.ibatis.executor.ExecutorException; import org.apache.ibatis.executor.parameter.ParameterHandler; import org.apache.ibatis.mapping.BoundSql; import org.apache.ibatis.mapping.MappedStatement; import org.apache.ibatis.session.ResultHandler; import org.apache.ibatis.session.RowBounds; /** * @author Clinton Begin */ public class RoutingStatementHandler implements StatementHandler { private final StatementHandler delegate; public RoutingStatementHandler(Executor executor, MappedStatement ms, Object parameter, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql) { switch (ms.getStatementType()) { case STATEMENT: delegate = new SimpleStatementHandler(executor, ms, parameter, rowBounds, resultHandler, boundSql); break; case PREPARED: delegate = new PreparedStatementHandler(executor, ms, parameter, rowBounds, resultHandler, boundSql); break; case CALLABLE: delegate = new CallableStatementHandler(executor, ms, parameter, rowBounds, resultHandler, boundSql); break; default: throw new ExecutorException("Unknown statement type: " + ms.getStatementType()); } } @Override public Statement prepare(Connection connection, Integer transactionTimeout) throws SQLException { return delegate.prepare(connection, transactionTimeout); } @Override public void parameterize(Statement statement) throws SQLException { delegate.parameterize(statement); } @Override public void batch(Statement statement) throws SQLException { delegate.batch(statement); } @Override public int update(Statement statement) throws SQLException { return delegate.update(statement); } @Override public <E> List<E> query(Statement statement, ResultHandler resultHandler) throws SQLException { return delegate.query(statement, resultHandler); } @Override public <E> Cursor<E> queryCursor(Statement statement) throws SQLException { return delegate.queryCursor(statement); } @Override public BoundSql getBoundSql() { return delegate.getBoundSql(); } @Override public ParameterHandler getParameterHandler() { return delegate.getParameterHandler(); } }
[ "447172979@qq.com" ]
447172979@qq.com
03075f1d34117a8999bd92994ea94c25050398cc
a5d01febfd8d45a61f815b6f5ed447e25fad4959
/Source Code/5.27.0/sources/com/google/common/b/g.java
ddcb5a6473d01785665a3d9ca89946cf7f23b5fc
[]
no_license
kkagill/Decompiler-IQ-Option
7fe5911f90ed2490687f5d216cb2940f07b57194
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
refs/heads/master
2020-09-14T20:44:49.115289
2019-11-04T06:58:55
2019-11-04T06:58:55
223,236,327
1
0
null
2019-11-21T18:17:17
2019-11-21T18:17:16
null
UTF-8
Java
false
false
731
java
package com.google.common.b; import com.google.common.base.i; import java.lang.reflect.Method; /* compiled from: SubscriberExceptionContext */ public class g { private final Object XX; private final d Yk; private final Object Yl; private final Method Ym; g(d dVar, Object obj, Object obj2, Method method) { this.Yk = (d) i.checkNotNull(dVar); this.XX = i.checkNotNull(obj); this.Yl = i.checkNotNull(obj2); this.Ym = (Method) i.checkNotNull(method); } public d uM() { return this.Yk; } public Object uG() { return this.XX; } public Object uN() { return this.Yl; } public Method uO() { return this.Ym; } }
[ "yihsun1992@gmail.com" ]
yihsun1992@gmail.com
144097b396453f8d686aeb7cfcdf6dd3ff3e5782
4120e073a4b0b2c79870e3ab87b294f98f47d0be
/app/src/test/java/com/rideaustin/utils/CommentUtilsTest.java
1c5812fda5ec2bd6909d4fc3730c6bd8bcb174d5
[ "MIT" ]
permissive
jyt109/server
8933281097303d14b5a329f0c679edea4fcd174b
24354717624c25b5d4faf0b7ea540e2742e8039f
refs/heads/master
2022-03-20T10:36:44.973843
2019-10-03T11:43:07
2019-10-03T11:43:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
979
java
package com.rideaustin.utils; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.junit.Test; public class CommentUtilsTest { @Test public void isReadableReturnsTrueForLongEnglishComment() throws Exception { boolean result = CommentUtils.isReadable("Great trip! Many thanks to Justin, he was an excellent driver!"); assertTrue(result); } @Test public void isReadableReturnsTrueForShortEnglishComment() throws Exception { boolean result = CommentUtils.isReadable("Great!"); assertTrue(result); } @Test public void isReadableReturnsTrueForSenselessNoisyComment() throws Exception { boolean result = CommentUtils.isReadable("fgkhanv. kfjvb!"); assertTrue(result); } @Test public void isReadableReturnsFalseForCyrillicComment() throws Exception { boolean result = CommentUtils.isReadable("Спасибо, отличная поездка!"); assertFalse(result); } }
[ "mikhail.chugunov@crossover.com" ]
mikhail.chugunov@crossover.com
c12c5ee1147b7c14f4f592fedd94e5c34baecc54
1bdcbecb5f6aea980de377b8cbb71887c2200f74
/storm/storm-applications/src/main/java/storm/applications/constants/LinearRoadConstants.java
c254ed05277a47ed1d6083a33245694c3660bde9
[]
no_license
lilijiangnan/bigdata
d9c8e3ebc5efa48e05463772c89c3782ad88f27a
d54f5886e706e96fc793a0426a39415c3e413c0c
refs/heads/master
2021-04-09T10:18:39.289089
2016-11-07T03:26:19
2016-11-07T03:26:19
125,361,007
1
0
null
2018-03-15T12:02:01
2018-03-15T12:02:01
null
UTF-8
Java
false
false
581
java
package storm.applications.constants; /** * * @author mayconbordin */ public interface LinearRoadConstants extends BaseConstants { interface Field { String TIMESTAMP = "timestamp"; String VEHICLE_ID = "vehicleId"; String SPEED = "speed"; String EXPRESSWAY = "expressway"; String LANE = "lane"; String DIRECTION = "direction"; String SEGMENT = "segment"; String POSITION = "position"; } interface Conf extends BaseConf { } interface Component extends BaseComponent { } }
[ "zqhxuyuan@gmail.com" ]
zqhxuyuan@gmail.com
a2c86ae74f22de3dad6c1f0b341ca95a28f77258
d26dc3090fe97a853a4f01707c9fb4f1c32cd943
/HZCFrame/src/com/lugq/mydemo/hzcframe/netbasic/ConnectionBasic.java
c534dcac397741d58d11ed5db68c5cdd3cba1811
[]
no_license
road9/my-integration-framework
095030cf5f387a2644081dba67cac92d85a70181
10ecefe16001185e56b74f31d3a108a7706b7271
refs/heads/master
2016-09-06T15:16:04.068512
2015-04-08T09:40:38
2015-04-08T09:40:38
23,692,630
0
0
null
null
null
null
GB18030
Java
false
false
3,828
java
package com.lugq.mydemo.hzcframe.netbasic; import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import org.apache.http.HttpEntity; import org.apache.http.HttpHost; import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.conn.params.ConnRouteParams; import org.apache.http.entity.InputStreamEntity; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BufferedHeader; import org.apache.http.params.HttpConnectionParams; import android.content.Context; /** * access network util.提供直接访问服务器接口功能. * @ClassName: ConnectionBasic * @author lugq * @date 2014年9月11日 下午1:48:20 * */ public class ConnectionBasic { public int timeout = 8000; private int mRequestMethod; private String mUrl; private byte[] mPostData; private Context mContext; public ConnectionBasic(Context context) { this.mContext = context; } /** * get. * @param url * @return */ public String[] requestGet(String url) { create(AsyncConnectionBasic.GET_METHOD_INDEX, url, null); return request(); } /** * post. * @param url * @param postData * @return */ public String[] requestPost(String url, byte[] postData) { create(AsyncConnectionBasic.POST_METHOD_INDEX, url, postData); return request(); } private String[] request() { try { HttpEntity httpEntity = getHttpEntity(); if (httpEntity != null) return processEntity(httpEntity); } catch (Exception e) { } String json[] = {"405", "数据获取失败"}; return json; } private HttpEntity getHttpEntity() { HttpClient mHttpClient = new DefaultHttpClient(); HttpConnectionParams.setConnectionTimeout(mHttpClient.getParams(), timeout); HttpConnectionParams.setSoTimeout(mHttpClient.getParams(), timeout); checkProxySetting(mHttpClient); try { HttpResponse response = null; switch (mRequestMethod) { case AsyncConnectionBasic.GET_METHOD_INDEX: { HttpGet httpGet = new HttpGet(mUrl); response = mHttpClient.execute(httpGet); break; } case AsyncConnectionBasic.POST_METHOD_INDEX: { HttpPost httpPost = new HttpPost(mUrl); InputStream instream = new ByteArrayInputStream(mPostData); InputStreamEntity inputStreamEntity = new InputStreamEntity(instream, mPostData.length); httpPost.setEntity(inputStreamEntity); response = mHttpClient.execute(httpPost); break; } } if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { return response.getEntity(); } } catch (Exception e) { e.printStackTrace(); } return null; } private void create(int method, String url, byte[] postData) { this.mRequestMethod = method; this.mUrl = url; this.mPostData = postData; } private void checkProxySetting(HttpClient httpClient) { boolean useProxy = APNUtils.hasProxy(mContext); if (useProxy) { HttpHost proxy = new HttpHost(APNUtils.getApnProxy(mContext), APNUtils.getApnPortInt(mContext)); httpClient.getParams().setParameter(ConnRouteParams.DEFAULT_PROXY, proxy); } } /** * get string json. * @param entity * @return * @throws IOException */ private String[] processEntity(HttpEntity entity) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(entity.getContent())); String line, result = ""; while ((line = br.readLine()) != null) result += line; JsonAnalyse analyse = new JsonAnalyse(); String json[] = {analyse.getStatus(result), result}; return json; } }
[ "1281110961@qq.com" ]
1281110961@qq.com
fcc065b3c36081b56fdad50c13aac4e5619fbb00
772d3e6ac425b1e6fa13ef3858adecf4eb51e8dc
/ch07/DmbCellPhone.java
3edad4ecb8a7a3b2ec3a3cf1741d42ecc297829c
[]
no_license
go88hoontops/java
2723a13decbf5eaf7a4928476a76e94341f5c58c
ea7c4f2f577874dc1ec8ab5d5f7f910432ab3f37
refs/heads/master
2023-04-06T09:10:10.373247
2021-04-06T01:09:46
2021-04-06T01:09:46
355,005,350
0
0
null
null
null
null
UHC
Java
false
false
529
java
package com.jh.ch07; public class DmbCellPhone extends CellPhone { int channel; //부모 Cellphone 에서 모델 컬러 필드를 가져옴 DmbCellPhone(String model, String color, int channel){ this.model = model; this.color = color; this.channel = channel; } //메소드 void turnOnDmb(){ System.out.println("DMB를 켭니다"); } void changChannel() { System.out.println("채널"+channel+"번으로 채널변경"); } void turnOff() { System.out.println("방송을 끕니다"); } }
[ "go88.hoon@gmail.com" ]
go88.hoon@gmail.com
75d22d55e7e65c52f9fd59718bf4c9f7b921ee56
0ac7c33b0bfd133885a89d64c637cd48aa176fca
/app/src/main/java/com/findtech/threePomelos/mydevices/bean/DeviceCarBean.java
91423a7256e369e560e9ca179284e5d623565e4f
[]
no_license
AlexTiti/threeGrapefruit
8f6a19f70eece257ec021a7c4f5b5ffda51be0cd
be5b549e1c1112a0eb77893cc27c787703b306b4
refs/heads/master
2020-03-18T12:11:59.833602
2018-06-26T11:17:26
2018-06-26T11:17:36
134,657,804
0
0
null
null
null
null
UTF-8
Java
false
false
1,310
java
package com.findtech.threePomelos.mydevices.bean; /** * <pre> * * author : Alex * e_mail : 18238818283@sina.cn * timr : 2017/06/22 * desc : * version : V 1.0.5 * * @author Administrator */ public class DeviceCarBean { private String deviceName; private String deviceAddress; private String deviceType; private String functionType; private String company; public String getCompany() { return company; } public String getFunctionType() { return functionType; } public DeviceCarBean(String deviceName, String deviceAddress, String deviceType , String functionType ,String company) { this.deviceName = deviceName; this.deviceAddress = deviceAddress; this.deviceType = deviceType; this.functionType = functionType; this.company = company; } public String getDeviceName() { return deviceName; } public void setDeviceName(String deviceName) { this.deviceName = deviceName; } public String getDeviceaAddress() { return deviceAddress; } public void setDeviceaAddress(String deviceAddress) { this.deviceAddress = deviceAddress; } public String getDeviceType() { return deviceType; } }
[ "18238818283@sina.cn" ]
18238818283@sina.cn
80f05d90cc7823208203befc81bdd5a23c2dc3d1
a93a0b282e7a6281d3188b9549e070f993bb33e1
/modules/portal_security_sso_twitter_api/src/main/java/com/liferay/portal/security/sso/twitter/connect/constants/TwitterConnectConfigurationKeys.java
23dec438f77a0ce158f096512cab124172b62bf0
[]
no_license
micha-mn/youth
e12e15d8a1c0e644ecca8b2b36971cc556261884
3044dd068a4a5ef770a08c4ad9c8fdd42febf604
refs/heads/master
2020-09-25T00:48:28.565275
2019-12-09T11:37:08
2019-12-09T11:37:08
225,882,323
0
0
null
null
null
null
UTF-8
Java
false
false
373
java
package com.liferay.portal.security.sso.twitter.connect.constants; public class TwitterConnectConfigurationKeys { public static final String CONSUMER_KEY = "consumerKey"; public static final String CONSUMER_KEY_SECRET = "consumerKeySecret"; public static final String AUTH_ENABLED = "enabled"; public static final String OAUTH_CALLBACK_URL = "oauthCallbackURL"; }
[ "m.nassar@everteam-gs.com" ]
m.nassar@everteam-gs.com
8b1b588ff55a991afed1c8b90a3410d71b701166
0c2cfa473a0f8ab64ed86b73d19077dae817e53b
/src/org/opendatafoundation/data/spss/SPSSRecordType7Subtype11.java
a243768d7025380801fbc06890b5a36b4af201c2
[]
no_license
reshet/DataBankIDEA
5bef96a5ece9a1fdc2c0e4ef12129272d8506a82
407296381f98a4bbfcbcdcafdd7133696588d55f
refs/heads/master
2020-02-26T14:33:59.772768
2013-10-13T15:18:02
2013-10-13T15:18:02
12,902,240
1
0
null
null
null
null
UTF-8
Java
false
false
4,290
java
package org.opendatafoundation.data.spss; /* * Author(s): Pascal Heus (pheus@opendatafoundation.org) * * This product has been developed with the financial and * technical support of the UK Data Archive Data Exchange Tools * project (http://www.data-archive.ac.uk/dext/) and the * Open Data Foundation (http://www.opendatafoundation.org) * * Copyright 2007 University of Essex (http://www.esds.ac.uk) * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA * The full text of the license is also available on the Internet at * http://www.gnu.org/copyleft/lesser.html * */ import java.io.IOException; import java.util.ArrayList; import java.util.List; /** * SPSS Record Type 7 Subtype 11 - Variable display parameters * * @author Pascal Heus (pheus@opendatafoundation.org) */ public class SPSSRecordType7Subtype11 extends SPSSAbstractRecordType { // type 7 int recordTypeCode; int recordSubtypeCode; int dataElementLength; int numberOfDataElements; // subtype 11 List<VariableDisplayParams> variableDisplayParams; /** a collection of VariableDisplayParams (one for each variable) */ public void read(SPSSFile is) throws IOException, SPSSFileException { // position in file fileLocation = is.getFilePointer(); // record type recordTypeCode = is.readSPSSInt(); if(recordTypeCode!=7) throw new SPSSFileException("Error reading record type 7 subtype 11: bad record type ["+recordTypeCode+"]. Expecting Record Type 7."); // subtype recordSubtypeCode = is.readSPSSInt(); if(recordSubtypeCode!=11) throw new SPSSFileException("Error reading record type 7 subtype 11: bad subrecord type ["+recordSubtypeCode+"]. Expecting Record Subtype 11."); // data elements dataElementLength = is.readSPSSInt(); if(dataElementLength!=4) throw new SPSSFileException("Error reading record type 7 subtype 11: bad data element length ["+dataElementLength+"]. Expecting 4."); numberOfDataElements = is.readSPSSInt(); int n_variables = numberOfDataElements / 3; if( (numberOfDataElements % 3)!=0 ) throw new SPSSFileException("Error reading record type 7 subtype 11: number of data elements ["+dataElementLength+"] is not a multiple of 3."); // read display parameters for eeach variable variableDisplayParams = new ArrayList<VariableDisplayParams>(); for(int i=0 ; i<n_variables; i++) { VariableDisplayParams params = new VariableDisplayParams(); params.measure = is.readSPSSInt(); params.width= is.readSPSSInt(); params.alignment = is.readSPSSInt(); variableDisplayParams.add(params); } } public String toString() { String str=""; str += "\nRECORD TYPE 7 SUBTYPE 11 - VARIABLE DISPLAY PARAMETERS"; str += "\nLocation : "+fileLocation; str += "\nRecord Type : "+recordTypeCode; str += "\nRecord Subtype : "+recordSubtypeCode; str += "\nData elements : "+numberOfDataElements; str += "\nElement length : "+dataElementLength; int var_index=0; for (VariableDisplayParams params: variableDisplayParams) { var_index++; str += "\nDisplay params : Var "+var_index+" Measure="+params.measure+" Width="+params.width+" Alignment="+params.alignment; } return(str); } public class VariableDisplayParams { int measure; int width; int alignment; } }
[ "reshet.ukr@gmail.com" ]
reshet.ukr@gmail.com
ab76d8008143fae14ec4597c1c2c00f831f3a9eb
5ec76201d1717f95d5f77c8d0d183f35b33ad1a6
/src/main/java/com/scm/gsoft/domain/cxc/Clase.java
1cf87863cfb4198d4e0dc0465a9ad122a5689aef
[]
no_license
KevinMendez7/G-Soft
7da92a5a722d629a1ddef6c53f6d667514134314
0f43c2c5094dc5c55afbc8e9d3f4d0fc101ab873
refs/heads/master
2020-03-28T18:17:28.018515
2018-09-15T04:31:54
2018-09-15T04:31:54
148,868,460
0
0
null
null
null
null
UTF-8
Java
false
false
1,995
java
package com.scm.gsoft.domain.cxc; // Generated 26/08/2018 01:38:39 AM by Hibernate Tools 4.3.1 import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; /** * Clase generated by hbm2java */ @Entity @Table(name = "clase") public class Clase implements java.io.Serializable { @Id @Column(name = "cia") @GeneratedValue(strategy = GenerationType.IDENTITY) private Long cia; @Column(name = "codigo") private float codigo; @Column(name = "concepto") private String concepto; @Column(name = "stat_reg") private Character statReg; @Column(name = "usuario") private String usuario; @Column(name = "fecha_ingreso") private Date fechaIngreso; public Clase() { } public Clase(Long cia, float codigo) { this.cia = cia; this.codigo = codigo; } public Clase(Long cia, float codigo, String concepto, Character statReg, String usuario, Date fechaIngreso) { this.cia = cia; this.codigo = codigo; this.concepto = concepto; this.statReg = statReg; this.usuario = usuario; this.fechaIngreso = fechaIngreso; } public Long getCia() { return this.cia; } public void setCia(Long cia) { this.cia = cia; } public float getCodigo() { return this.codigo; } public void setCodigo(float codigo) { this.codigo = codigo; } public String getConcepto() { return this.concepto; } public void setConcepto(String concepto) { this.concepto = concepto; } public Character getStatReg() { return this.statReg; } public void setStatReg(Character statReg) { this.statReg = statReg; } public String getUsuario() { return this.usuario; } public void setUsuario(String usuario) { this.usuario = usuario; } public Date getFechaIngreso() { return this.fechaIngreso; } public void setFechaIngreso(Date fechaIngreso) { this.fechaIngreso = fechaIngreso; } }
[ "kevin_33_6@hotmail.com" ]
kevin_33_6@hotmail.com
7d2d6cc68c461e02016075099bf3b63b32176b0c
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/27/27_2bfd4e374c60efa5f9dbdb6a6863cc409f94df66/CCorePreferenceInitializer/27_2bfd4e374c60efa5f9dbdb6a6863cc409f94df66_CCorePreferenceInitializer_s.java
c7c34f2b2585d49ac0a2ddd69dd0302ea524daa9
[]
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,304
java
/******************************************************************************* * Copyright (c) 2000, 2007 QNX Software Systems 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: * QNX Software Systems - Initial API and implementation * Sergey Prigogin, Google * Markus Schorn (Wind River Systems) *******************************************************************************/ package org.eclipse.cdt.internal.core; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.CCorePreferenceConstants; import org.eclipse.cdt.core.formatter.DefaultCodeFormatterConstants; import org.eclipse.cdt.core.parser.CodeReaderCache; import org.eclipse.cdt.internal.core.model.CModelManager; import org.eclipse.cdt.internal.core.pdom.indexer.IndexerPreferences; import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; import org.eclipse.core.runtime.preferences.DefaultScope; import org.eclipse.core.runtime.preferences.IEclipsePreferences; import org.eclipse.core.runtime.preferences.IScopeContext; public class CCorePreferenceInitializer extends AbstractPreferenceInitializer { /* (non-Javadoc) * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences() */ public void initializeDefaultPreferences() { HashSet optionNames = CModelManager.OptionNames; // Formatter settings Map defaultOptionsMap = DefaultCodeFormatterConstants.getDefaultSettings(); // code formatter defaults // Compiler settings defaultOptionsMap.put(CCorePreferenceConstants.TRANSLATION_TASK_TAGS, CCorePreferenceConstants.DEFAULT_TASK_TAG); defaultOptionsMap.put(CCorePreferenceConstants.TRANSLATION_TASK_PRIORITIES, CCorePreferenceConstants.DEFAULT_TASK_PRIORITY); defaultOptionsMap.put(CCorePreferenceConstants.CODE_FORMATTER, CCorePreferenceConstants.DEFAULT_CODE_FORMATTER); defaultOptionsMap.put(CCorePreferenceConstants.INDEX_DB_CACHE_SIZE_PCT, CCorePreferenceConstants.DEFAULT_INDEX_DB_CACHE_SIZE_PCT); defaultOptionsMap.put(CCorePreferenceConstants.MAX_INDEX_DB_CACHE_SIZE_MB, CCorePreferenceConstants.DEFAULT_MAX_INDEX_DB_CACHE_SIZE_MB); defaultOptionsMap.put(CCorePreferenceConstants.WORKSPACE_LANGUAGE_MAPPINGS, CCorePreferenceConstants.DEFAULT_WORKSPACE_LANGUAGE_MAPPINGS); defaultOptionsMap.put(CodeReaderCache.CODE_READER_BUFFER, CodeReaderCache.DEFAULT_CACHE_SIZE_IN_MB_STRING); // Store default values to default preferences IEclipsePreferences defaultPreferences = ((IScopeContext) new DefaultScope()).getNode(CCorePlugin.PLUGIN_ID); for (Iterator iter = defaultOptionsMap.entrySet().iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry) iter.next(); String optionName = (String) entry.getKey(); defaultPreferences.put(optionName, (String)entry.getValue()); optionNames.add(optionName); } // indexer defaults IndexerPreferences.initializeDefaultPreferences(defaultPreferences); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
87ceef37b3ae79358094be8eb1bc86c8c7f5482e
419dc8af02e1b128acb0fd0fc444918cfb12751f
/app/src/main/java/com/rcpt/mvp/presenter/SystemMessagePresenter.java
4ee5c7f6fd59688db6da7c514fe341a3ceaa6582
[]
no_license
jieyuchongliang/RCPT
e9f7258b1ca9ec6cdf688bafb43c5fd2c201371a
931c4ccfbcf8f123f4f2152ea36b61121d5337da
refs/heads/master
2021-01-15T12:59:25.001619
2017-08-08T07:27:38
2017-08-08T07:27:38
99,663,470
0
0
null
null
null
null
UTF-8
Java
false
false
1,971
java
package com.rcpt.mvp.presenter; import com.rcpt.LoginHelper; import com.rcpt.base.mvp.BasePresenter; import com.rcpt.base.mvp.OnDataGetCallback; import com.rcpt.bean.SystemMessageBean; import com.rcpt.bean.User; import com.rcpt.mvp.contract.SystemMessageContract; import com.rcpt.mvp.module.SystemMessageModule; import com.rcpt.ui.me.message.MessageInfoActivity; import java.util.List; /** * Created by lvzp on 2017/3/6. * 类描述: */ public class SystemMessagePresenter extends BasePresenter<SystemMessageContract.View> implements SystemMessageContract.Presenter { private SystemMessageModule mModule; @Override public void attach(SystemMessageContract.View view) { super.attach(view); mModule = new SystemMessageModule(); getView().initRecyclerView(); } @Override public void loadListData() { onLoadMore(1); } /** * 加载更多的数据 * 只需要根据相应的页码加载相应的数据,无需关心刷新和加载更多 * * @param page */ @Override public void onLoadMore(int page) { User userBean = LoginHelper.getInstance().getUserBean(); mModule.requestMessageList(getView().getContext(), userBean.getUserType(), page, new OnDataGetCallback<List<SystemMessageBean.MessageListBean>>() { @Override public void onSuccessResult(List<SystemMessageBean.MessageListBean> data) { getView().updateIsEnd(mModule.isEnd()); getView().bindListData(data); } }); } /** * 条目的点击事件 */ @Override public void onItemClick() { int position = getView().getClickItemPosition(); SystemMessageBean.MessageListBean messageListBean = mModule.getListData().get(position); MessageInfoActivity.actionStart(getView().getContext(), messageListBean); } }
[ "1134119088@qq.com" ]
1134119088@qq.com
3e29122b5d14c2552e8fe7fb738a78e020bebcc8
bbddeb279df2aededc825a7f5c772066814ab7ef
/app/src/main/java/com/echoesnet/eatandmeet/activities/MySetAccountSecAlipayAct.java
cbcdc1a11979675497d5ed42ffeed4307dba1759
[]
no_license
a35363507800/EatAndMeet
dfda19e0f761fa027ddcc40e2bb585a6b45a1a14
a4dbc0c92be08f413ba9621c77d52e76244550f8
refs/heads/master
2020-03-31T12:35:37.136634
2018-10-10T01:25:58
2018-10-10T01:33:29
152,222,308
1
2
null
null
null
null
UTF-8
Java
false
false
5,064
java
package com.echoesnet.eatandmeet.activities; import android.app.Activity; import android.app.Dialog; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import android.widget.Button; import android.widget.EditText; import com.echoesnet.eatandmeet.R; import com.echoesnet.eatandmeet.presenters.ImpMySetAccountSecAlipayView; import com.echoesnet.eatandmeet.presenters.viewinterface.IMySetAccountSecAlipayView; import com.echoesnet.eatandmeet.utils.NetUtils.NetHelper; import com.echoesnet.eatandmeet.utils.ToastUtils; import com.echoesnet.eatandmeet.views.widgets.DialogUtil; import com.echoesnet.eatandmeet.views.widgets.TopBar.ITopbarClickListener; import com.echoesnet.eatandmeet.views.widgets.TopBar.TopBar; import com.orhanobut.logger.Logger; import org.json.JSONException; import org.json.JSONObject; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import okhttp3.Call; public class MySetAccountSecAlipayAct extends BaseActivity implements IMySetAccountSecAlipayView { private static final String TAG = MySettingAct.class.getSimpleName(); @BindView(R.id.top_bar) TopBar topBar; @BindView(R.id.tv_alipay_account) EditText fetAlipayAccount; @BindView(R.id.btn_bind) Button btnBindAliPay; private Dialog pDialog; private Activity mContext; private ImpMySetAccountSecAlipayView impMySetAccountSecAlipayView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.act_my_set_account_sec_alipay); ButterKnife.bind(this); afterViews(); } private void afterViews() { mContext = this; topBar.setTitle("绑定支付宝"); topBar.getRightButton().setVisibility(View.GONE); topBar.setOnClickListener(new ITopbarClickListener() { @Override public void leftClick(View view) { mContext.finish(); } @Override public void left2Click(View view) { } @Override public void rightClick(View view) { } }); impMySetAccountSecAlipayView = new ImpMySetAccountSecAlipayView(mContext, this); pDialog = DialogUtil.getCommonDialog(mContext, "正在处理"); pDialog.setCancelable(false); if (impMySetAccountSecAlipayView != null) { if (pDialog != null && !pDialog.isShowing()) pDialog.show(); impMySetAccountSecAlipayView.checkAlipayState(); } } @OnClick({R.id.btn_bind}) void onViewClick(View view) { switch (view.getId()) { case R.id.btn_bind: String alipayAccount = fetAlipayAccount.getText().toString(); if (TextUtils.isEmpty(alipayAccount)) { ToastUtils.showShort( "支付宝账号不能为空"); } else { if (impMySetAccountSecAlipayView != null) { if (pDialog != null && !pDialog.isShowing()) pDialog.show(); impMySetAccountSecAlipayView.bindAlipay(alipayAccount); } } break; default: break; } } @Override protected void onDestroy() { super.onDestroy(); if (pDialog != null && pDialog.isShowing()) { pDialog.dismiss(); pDialog = null; } } @Override public void requestNetError(Call call, Exception e, String exceptSource) { NetHelper.handleNetError(mContext, null, exceptSource, e); if (pDialog != null && pDialog.isShowing()) pDialog.dismiss(); } @Override public void checkAlipayStateCallback(String response) { Logger.t(TAG).json(response); if (response == null) { if (pDialog != null && pDialog.isShowing()) pDialog.dismiss(); ToastUtils.showShort("获取信息失败"); } else { try { JSONObject body = new JSONObject(response); String flag = body.getString("flag"); fetAlipayAccount.setText(flag.equals("0") ? "" : flag); } catch (JSONException e) { Logger.t(TAG).d(e.getMessage()); e.printStackTrace(); } finally { if (pDialog != null && pDialog.isShowing()) pDialog.dismiss(); } } } @Override public void bindAlipayCallback(String response) { if (pDialog != null && pDialog.isShowing()) pDialog.dismiss(); ToastUtils.showShort("支付宝绑定成功"); mContext.finish(); } }
[ "lingcbyq@163.com" ]
lingcbyq@163.com
103423cedba75eb9b0bd023f9caef6713c0bfe42
9b6cf5fd1a0163ca9bf6ec0f6d4f887bcac89b52
/plugins/InspectionGadgets/testsrc/com/siyeh/ig/fixes/controlflow/BooleanExpressionMayBeFactorizedFixTest.java
d36383020f54947e7ae64c30715863a9980c56cd
[ "Apache-2.0" ]
permissive
trushev/intellij-community
2ea1762fba69c760e64d7f34dc9c87e4c29b732a
3197e0b35652759eda9d45f6b14178eaa5f65049
refs/heads/master
2023-07-31T00:50:03.578729
2021-09-06T14:55:52
2021-09-06T15:41:32
398,008,865
0
0
Apache-2.0
2021-08-28T06:45:32
2021-08-19T16:34:14
null
UTF-8
Java
false
false
2,843
java
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.siyeh.ig.fixes.controlflow; import com.siyeh.InspectionGadgetsBundle; import com.siyeh.ig.BaseInspection; import com.siyeh.ig.IGQuickFixesTestCase; import com.siyeh.ig.controlflow.BooleanExpressionMayBeFactorizedInspection; /** * @author Fabrice TIERCELIN */ public class BooleanExpressionMayBeFactorizedFixTest extends IGQuickFixesTestCase { public void testSimple() { doMemberTest(InspectionGadgetsBundle.message("if.may.be.factorized.quickfix"), "void test(boolean foo, boolean bar) {\n" + " boolean c = false;\n" + " boolean b = (foo &&/**/ (c = bar)) || (foo && true);" + "}", "void test(boolean foo, boolean bar) {\n" + " boolean c = false;\n" + " boolean b = foo && ((c = bar) || true);}" ); } public void testSideEffects1() { doTest(InspectionGadgetsBundle.message("if.may.be.factorized.quickfix"), "class X {" + " boolean b = true;" + " void test(boolean foo) {" + " boolean c = b && foo ||/**/ b && complex();" + " }" + " boolean complex() {" + " b = !b;" + " return true;" + " }" + "}", "class X {" + " boolean b = true;" + " void test(boolean foo) {" + " boolean c = b && (foo || complex());" + " }" + " boolean complex() {" + " b = !b;" + " return true;" + " }" + "}"); } public void testSideEffects2() { assertQuickfixNotAvailable(InspectionGadgetsBundle.message("if.may.be.factorized.quickfix"), "class X {" + " boolean b = true;" + " void test(boolean foo) {" + " boolean c = complex() && foo ||/**/ complex() && b;" + " }" + " boolean complex() {" + " b = !b;" + " return true;" + " }" + "}"); } public void testComparison() { doTest(InspectionGadgetsBundle.message("if.may.be.factorized.quickfix"), "class X {\n" + " boolean test(int x, int y, int z) {\n" + " return (x > y && z == 1) || /**/(y < x && z == 2);\n" + " }\n" + "}", "class X {\n" + " boolean test(int x, int y, int z) {\n" + " return x > y && (z == 1 || z == 2);\n" + " }\n" + "}"); } @Override protected BaseInspection getInspection() { return new BooleanExpressionMayBeFactorizedInspection(); } }
[ "intellij-monorepo-bot-no-reply@jetbrains.com" ]
intellij-monorepo-bot-no-reply@jetbrains.com
6b288248e9ea86b52c2427912f55ce0394d3b3fa
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/7538b837cb3b69a38b767721cde48a51ba7bc386/before/Declaration.java
27d1b5fbb49e801db0b2f359fe8f9840d14651e0
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
3,426
java
/* * Copyright 2000-2007 JetBrains s.r.o. * 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.jetbrains.plugins.groovy.lang.parser.parsing.statements.declaration; import com.intellij.lang.PsiBuilder; import com.intellij.psi.tree.IElementType; import org.jetbrains.plugins.groovy.GroovyBundle; import org.jetbrains.plugins.groovy.lang.lexer.GroovyElementType; import org.jetbrains.plugins.groovy.lang.parser.GroovyElementTypes; import org.jetbrains.plugins.groovy.lang.parser.parsing.auxiliary.modifiers.Modifiers; import org.jetbrains.plugins.groovy.lang.parser.parsing.types.TypeSpec; /** * @autor: Dmitry.Krasilschikov * @date: 14.03.2007 */ /* * Declaration ::= modifiers [TypeSpec] VariableDefinitions * | TypeSpec VariableDefinitions */ public class Declaration implements GroovyElementTypes { public static GroovyElementType parse(PsiBuilder builder) { PsiBuilder.Marker declmMarker = builder.mark(); //allows error messages IElementType modifiers = Modifiers.parse(builder); if (!WRONGWAY.equals(modifiers)) { PsiBuilder.Marker checkMarker = builder.mark(); //point to begin of type or variable if (WRONGWAY.equals(TypeSpec.parse(builder, true))) { //if type wasn't recognized trying poarse VaribleDeclaration checkMarker.rollbackTo(); GroovyElementType varDecl = VariableDefinitions.parse(builder); if (WRONGWAY.equals(varDecl)) { builder.error(GroovyBundle.message("variable.definitions.expected")); declmMarker.rollbackTo(); return WRONGWAY; } else { declmMarker.done(varDecl); return varDecl; } } else { //type was recognezed GroovyElementType varDeclarationTop = VariableDefinitions.parse(builder); if (WRONGWAY.equals(varDeclarationTop)) { checkMarker.rollbackTo(); GroovyElementType varDecl = VariableDefinitions.parse(builder); if (WRONGWAY.equals(varDecl)) { builder.error(GroovyBundle.message("variable.definitions.expected")); declmMarker.rollbackTo(); return WRONGWAY; } else { declmMarker.done(varDecl); return varDecl; } } else { checkMarker.drop(); declmMarker.done(varDeclarationTop); return varDeclarationTop; } } } else { if (WRONGWAY.equals(TypeSpec.parse(builder, true))) { builder.error(GroovyBundle.message("type.specification.expected")); declmMarker.rollbackTo(); return WRONGWAY; } GroovyElementType varDef = VariableDefinitions.parse(builder); if (WRONGWAY.equals(varDef)) { builder.error(GroovyBundle.message("variable.definitions.expected")); declmMarker.rollbackTo(); return WRONGWAY; } declmMarker.done(varDef); return varDef; } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
146f12d490176931ab5ab7168bd03d5f44328a8e
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_completed/2646424.java
d0a4590b098581a348577d6a96efed093755004f
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,008
java
// import java.io.ArithmeticException; import java.io.UncheckedIOException; import java.io.UncheckedIOException; class c2646424 { public MyHelperClass iox; public String downloadFromUrl(URL url) { BufferedReader dis; String content = ""; HttpURLConnection urlConn = null; try { urlConn = (HttpURLConnection)(HttpURLConnection)(Object) url.openConnection(); urlConn.setDoInput(true); urlConn.setUseCaches(false); urlConn.setAllowUserInteraction(false); dis = new BufferedReader(new InputStreamReader(urlConn.getInputStream())); String line; while ((line =(String)(Object) dis.readLine()) != null) { content = content.concat(line); content = content.concat("\n"); } } catch (UncheckedIOException ex) { System.err.println(ex + " (downloadFromUrl)"); // } catch (java.io.ArithmeticException iox) { System.out.println(iox + " (downloadFromUrl)"); } catch (Exception generic) { System.out.println(generic.toString() + " (downloadFromUrl)"); } finally { } return content; } } // Code below this line has been added to remove errors class MyHelperClass { } class URL { public MyHelperClass openConnection(){ return null; }} class BufferedReader { BufferedReader(){} BufferedReader(InputStreamReader o0){} public MyHelperClass readLine(){ return null; }} class HttpURLConnection { public MyHelperClass getInputStream(){ return null; } public MyHelperClass setAllowUserInteraction(boolean o0){ return null; } public MyHelperClass setUseCaches(boolean o0){ return null; } public MyHelperClass setDoInput(boolean o0){ return null; }} class InputStreamReader { InputStreamReader(){} InputStreamReader(MyHelperClass o0){}} class MalformedURLException extends Exception{ public MalformedURLException(String errorMessage) { super(errorMessage); } }
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
f36277569123c3a62b1478c4a9f407c887623ec6
68997877e267f71388a878d37e3380e161f2f1bb
/app/src/main/java/com/sy/bottle/servlet/Photos_Set_Servlet.java
fc20933460febb7e988393ce634766d4c8533dea
[]
no_license
jiangadmin/Bottle
1af8555efb6d54a314c500ec8e83fe795c20f796
582c7ab0eb216400980cd4aae830a3db131b66f6
refs/heads/master
2020-03-20T00:53:31.757289
2018-07-25T01:22:42
2018-07-25T01:22:42
137,059,653
1
0
null
null
null
null
UTF-8
Java
false
false
3,294
java
package com.sy.bottle.servlet; import android.app.Activity; import android.os.AsyncTask; import android.text.TextUtils; import com.google.gson.Gson; import com.sy.bottle.activity.mian.mine.Edit_Mine_Info_Activity; import com.sy.bottle.dialog.Loading; import com.sy.bottle.dialog.ReLogin_Dialog; import com.sy.bottle.entity.Base_Entity; import com.sy.bottle.entity.Const; import com.sy.bottle.entity.Save_Key; import com.sy.bottle.utils.HttpUtil; import com.sy.bottle.utils.LogUtil; import com.sy.bottle.utils.SaveUtils; import com.sy.bottle.view.TabToast; import java.util.List; /** * @author: jiangadmin * @date: 2018/5/31 * @Email: www.fangmu@qq.com * @Phone: 186 6120 1018 * TODO: 设置相册 */ public class Photos_Set_Servlet extends AsyncTask<String, Integer, Photos_Set_Servlet.Entity> { private static final String TAG = "Photos_Set_Servlet"; Activity activity; public Photos_Set_Servlet(Activity activity) { this.activity = activity; } @Override protected Entity doInBackground(String... strings) { String res = HttpUtil.uploadFile(Const.API + "photos/" + SaveUtils.getString(Save_Key.UID), strings[0]); LogUtil.e(TAG,res); Entity entity; if (TextUtils.isEmpty(res)) { entity = new Entity(); entity.setStatus(-1); entity.setMessage("连接服务器失败!"); } else { try { entity = new Gson().fromJson(res, Entity.class); } catch (Exception e) { entity = new Entity(); entity.setStatus(-2); entity.setMessage("数据解析失败!"); } } return entity; } @Override protected void onPostExecute(Entity entity) { super.onPostExecute(entity); Loading.dismiss(); switch (entity.getStatus()) { case 200: if (activity instanceof Edit_Mine_Info_Activity) { ((Edit_Mine_Info_Activity) activity).initphotos(); } break; case 401: new ReLogin_Dialog(); break; default: TabToast.makeText(entity.getMessage()); break; } } @Override protected void onProgressUpdate(Integer... values) { LogUtil.e(TAG, "进度:" + values[0]); super.onProgressUpdate(values); } public class Entity extends Base_Entity { private List<DataBean> data; public List<DataBean> getData() { return data; } public void setData(List<DataBean> data) { this.data = data; } public class DataBean { /** * id : 44 * pic_url : syplp/1000008/15296434487753.jpeg */ private int id; private String pic_url; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getPic_url() { return pic_url; } public void setPic_url(String pic_url) { this.pic_url = pic_url; } } } }
[ "www.fangmu@qq.com" ]
www.fangmu@qq.com
d5c62f006bb81a1b127c641c02b986d6df544f29
5256450a88b151bf855360470a7f77148f89edf8
/common-utilities/src/main/java/com/babeeta/hudee/common/memcache/MemoryCacheMBean.java
26d18f70299c17b02375b789c8b2c56d18d80b45
[]
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
773
java
package com.babeeta.hudee.common.memcache; /** * @author Xinyu * */ public interface MemoryCacheMBean { /** * @return memory cahce name */ String getMemoryCacheName(); /** * @return current size */ int getMemoryCacheSize(); /** * @return max size */ int getMemoryCacheCapacity(); /** * @return current reflesh interval */ long getRefleshInterval(); /** * @param newInterval * new interval * @return return true if set successful */ boolean setRefleshInterval(long newInterval); /** * @return return true if memory cache in working */ boolean isMemoryCacheWorking(); /** * @return stop memory cache */ boolean disableMemoryCache(); /** * @return start memory cache */ boolean enableMemoryCache(); }
[ "zhaominhe@gmail.com" ]
zhaominhe@gmail.com
d1c667c1fb3eb0b1ef2706210cfc060165a60f48
7f20b1bddf9f48108a43a9922433b141fac66a6d
/csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/io-impl/impl/src/main/java/org/cytoscape/io/internal/write/sif/SifNetworkWriterFactory.java
5c77dac3813e462dc327caea8cf29e3e1951459f
[]
no_license
ahdahddl/cytoscape
bf783d44cddda313a5b3563ea746b07f38173022
a3df8f63dba4ec49942027c91ecac6efa920c195
refs/heads/master
2020-06-26T16:48:19.791722
2013-08-28T04:08:31
2013-08-28T04:08:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
839
java
package org.cytoscape.io.internal.write.sif; import org.cytoscape.view.model.CyNetworkView; import org.cytoscape.model.CyNetwork; import org.cytoscape.io.CyFileFilter; import org.cytoscape.io.write.CyNetworkViewWriterFactory; import org.cytoscape.io.write.CyWriter; import java.io.OutputStream; import org.cytoscape.io.internal.write.AbstractCyWriterFactory; public class SifNetworkWriterFactory extends AbstractCyWriterFactory implements CyNetworkViewWriterFactory { public SifNetworkWriterFactory(CyFileFilter filter) { super(filter); } @Override public CyWriter createWriter(OutputStream outputStream, CyNetworkView view) { return new SifWriter(outputStream, view.getModel()); } @Override public CyWriter createWriter(OutputStream outputStream, CyNetwork network) { return new SifWriter(outputStream, network); } }
[ "mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5" ]
mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5
ee97fe901db8aadcf58125ea3fc691bbb0ed0841
5c4ae76a9885361f4fe94c6fd5e3487cb5fb3036
/leadnews/leadnews-model/src/main/java/com/siyi/model/user/pojos/ApUserMessage.java
4dd1bd59668a2b982b9e1abf8111d4cf9faf0715
[]
no_license
ppker/leadnews
d4b62d1df459e460d02b58eb49d29bdccfee1440
78115309361f7e888040ab265afe167c1005221e
refs/heads/main
2023-05-27T03:19:07.078738
2021-06-02T02:58:04
2021-06-02T02:58:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
367
java
package com.siyi.model.user.pojos; import lombok.Data; import java.util.Date; @Data public class ApUserMessage { private Integer id; private Long userId; private Integer senderId; private String senderName; private String content; private Integer type; private Boolean isRead; private Date createdTime; private Date readTime; }
[ "siyiyimiaozhong@qq.com" ]
siyiyimiaozhong@qq.com
8526903b28bba22c815724f1ee33e0948af0acce
389810afe005f702ccbb23d4a227d5431f3205cb
/ratpack-groovy/src/main/java/ratpack/groovy/internal/RatpackScriptBacking.java
7eaceb776c9c8af3f23aa129de9ac2a700a33ee6
[ "Apache-2.0" ]
permissive
vqvu/ratpack
fb553461e5044d8234f975bf03ea7670d3f4cf9a
48988a4af1a9d9e14227e00cb9cbbcd5362d3174
refs/heads/master
2021-01-17T06:57:59.518757
2015-03-26T00:31:29
2015-03-26T00:31:29
32,959,687
0
0
null
2015-03-27T00:38:59
2015-03-27T00:38:59
null
UTF-8
Java
false
false
1,868
java
/* * Copyright 2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ratpack.groovy.internal; import groovy.lang.Closure; import ratpack.func.Action; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; public abstract class RatpackScriptBacking { private static final ThreadLocal<Lock> LOCK_HOLDER = new ThreadLocal<Lock>() { @Override protected Lock initialValue() { return new ReentrantLock(); } }; private static final ThreadLocal<Action<Closure<?>>> BACKING_HOLDER = new InheritableThreadLocal<Action<Closure<?>>>() { @Override protected Action<Closure<?>> initialValue() { return new StandaloneScriptBacking(); } }; public static void withBacking(Action<Closure<?>> backing, Runnable runnable) { LOCK_HOLDER.get().lock(); try { Action<Closure<?>> previousBacking = BACKING_HOLDER.get(); BACKING_HOLDER.set(backing); try { runnable.run(); } finally { BACKING_HOLDER.set(previousBacking); } } finally { LOCK_HOLDER.get().unlock(); } } public static void execute(Closure<?> closure) throws Exception { LOCK_HOLDER.get().lock(); try { BACKING_HOLDER.get().execute(closure); } finally { LOCK_HOLDER.get().unlock(); } } }
[ "ld@ldaley.com" ]
ld@ldaley.com
b6fb2b1249a002df94a5db701b21c61ecc00860e
a6658a372b91f9de3140755b944e3d8f0847031c
/epm-parent/middleware/kms/kpi-mgr-impl/src/main/java/com/kpisoft/kpi/domain/KpiOrgType.java
fbce9a56bfe8eaffe478c1ac3830762aebfdb36b
[]
no_license
sagaranbu/Myresults-epm
81fa1686ae8424bd803e858b11d380aece69591b
001a27c1fc182146f51a00cce75865b64948eb79
refs/heads/master
2021-01-23T00:44:36.620373
2017-05-30T13:22:59
2017-05-30T13:22:59
92,835,001
0
0
null
null
null
null
UTF-8
Java
false
false
1,956
java
package com.kpisoft.kpi.domain; import com.canopus.mw.*; import com.kpisoft.kpi.vo.*; import com.kpisoft.kpi.vo.param.*; import com.canopus.mw.dto.*; import com.canopus.mw.utils.*; import com.kpisoft.kpi.utility.*; import com.kpisoft.kpi.dac.*; import javax.validation.*; public class KpiOrgType extends BaseDomainObject { private KpiOrgTypeManager manager; private KpiOrgTypeData kpiOrgTypeDetails; public KpiOrgType(final KpiOrgTypeManager manager) { this.manager = manager; } public int save() { this.validate(); final Request request = new Request(); request.put(KpiParams.KPI_ORG_TYPE_DATA.name(), (BaseValueObject)this.kpiOrgTypeDetails); final Response response = this.getDataService().saveKpiOrgType(request); final Identifier id = (Identifier)response.get(KpiParams.KPI_ORG_TYPE_ID.name()); this.kpiOrgTypeDetails.setId(id.getId()); return id.getId(); } public Response delete() { final Request request = new Request(); request.put(KpiParams.KPI_ORG_TYPE_ID.name(), (BaseValueObject)new Identifier(this.getKpiOrgTypeDetails().getId())); return this.getDataService().deleteKpiOrgType(request); } public void validate() { final ValidationHelper vh = new ValidationHelper(); vh.validate(this.getValidator(), (Object)this.kpiOrgTypeDetails, KpiErrorCodesEnum.ERR_KPI_ORIG_TYPE_INVALID_INPUT_002.name(), "Invalid kpiOrgType details"); } public KpiOrgTypeData getKpiOrgTypeDetails() { return this.kpiOrgTypeDetails; } public void setKpiOrgTypeDetails(final KpiOrgTypeData kpiOrgTypeDetails) { this.kpiOrgTypeDetails = kpiOrgTypeDetails; } private KpiOrgTypeDataService getDataService() { return this.manager.getDataService(); } private Validator getValidator() { return this.manager.getValidator(); } }
[ "kalpanadare@gmail.com" ]
kalpanadare@gmail.com
5ace16a0847ec9a65795caa8eb1c80ad937f2ef7
83964a56c3d3fff94d0ff0e52386552d193aca03
/src/main/java/com/sun/jersey/server/impl/uri/rules/AtomicMatchingPatterns.java
c2ae87d2847d197f188f212991a8d369b5e24aa7
[]
no_license
onurtokat/hal-streaming
9a0da5c050b9dd79984427a2594ef8726cae270a
63063991e94698d6588c1cf2170965f3991c78e3
refs/heads/master
2020-04-30T23:19:24.625158
2019-03-22T13:02:57
2019-03-22T13:02:57
177,141,138
0
0
null
null
null
null
UTF-8
Java
false
false
2,640
java
// // Decompiled by Procyon v0.5.30 // package com.sun.jersey.server.impl.uri.rules; import java.util.NoSuchElementException; import java.util.regex.MatchResult; import java.util.Iterator; import com.sun.jersey.spi.uri.rules.UriMatchResultContext; import java.util.Collection; import com.sun.jersey.spi.uri.rules.UriRules; public final class AtomicMatchingPatterns<R> implements UriRules<R> { private final Collection<PatternRulePair<R>> rules; public AtomicMatchingPatterns(final Collection<PatternRulePair<R>> rules) { this.rules = rules; } @Override public Iterator<R> match(final CharSequence path, final UriMatchResultContext resultContext) { if (resultContext.isTracingEnabled()) { final StringBuilder sb = new StringBuilder(); sb.append("match path \"").append(path).append("\" -> "); boolean first = true; for (final PatternRulePair<R> prp : this.rules) { if (!first) { sb.append(", "); } sb.append("\"").append(prp.p.toString()).append("\""); first = false; } resultContext.trace(sb.toString()); } for (final PatternRulePair<R> prp2 : this.rules) { final MatchResult mr = prp2.p.match(path); if (mr != null) { resultContext.setMatchResult(mr); return new SingleEntryIterator<R>(prp2.r); } } return new EmptyIterator<R>(); } private static final class SingleEntryIterator<T> implements Iterator<T> { private T t; SingleEntryIterator(final T t) { this.t = t; } @Override public boolean hasNext() { return this.t != null; } @Override public T next() { if (this.hasNext()) { final T _t = this.t; this.t = null; return _t; } throw new NoSuchElementException(); } @Override public void remove() { throw new UnsupportedOperationException(); } } private static final class EmptyIterator<T> implements Iterator<T> { @Override public boolean hasNext() { return false; } @Override public T next() { throw new NoSuchElementException(); } @Override public void remove() { throw new UnsupportedOperationException(); } } }
[ "onurtkt@gmail.com" ]
onurtkt@gmail.com
dcc8a2889e1e4e968afda761bd5af99e7a160d15
43275b575e5ed0b5043337dd87de3bd818edfcbe
/app/src/main/java/com/as/demo_ok30/pullrefresh/LoadingLayout.java
6f7e9395e11fd19a9be2091f3cbaaaef1d0de1fd
[]
no_license
zhangqifan1/Demo_ok30
41c1c1c3626ebfa9e8a8b097765afdecd2957cf2
783687d1427bfb7f167a0310115a5cb57b0fb611
refs/heads/master
2020-06-06T06:44:44.840020
2019-08-07T06:55:20
2019-08-07T06:55:20
192,668,852
2
0
null
null
null
null
UTF-8
Java
false
false
5,681
java
package com.as.demo_ok30.pullrefresh; import android.content.Context; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; /** * 这个类定义了Header和Footer的共通行为 * * @author Li Hong * @since 2013-8-16 */ public abstract class LoadingLayout extends FrameLayout implements ILoadingLayout { /**容器布局*/ private View mContainer; /**当前的状态*/ private State mCurState = State.NONE; /**前一个状态*/ private State mPreState = State.NONE; /** * 构造方法 * * @param context context */ public LoadingLayout(Context context) { this(context, null); } /** * 构造方法 * * @param context context * @param attrs attrs */ public LoadingLayout(Context context, AttributeSet attrs) { this(context, attrs, 0); } /** * 构造方法 * * @param context context * @param attrs attrs * @param defStyle defStyle */ public LoadingLayout(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(context, attrs); } /** * 初始化 * * @param context context * @param attrs attrs */ protected void init(Context context, AttributeSet attrs) { mContainer = createLoadingView(context, attrs); if (null == mContainer) { throw new NullPointerException("Loading view can not be null."); } LayoutParams params = new LayoutParams( LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); addView(mContainer, params); } /** * 显示或隐藏这个布局 * * @param show flag */ public void show(boolean show) { // If is showing, do nothing. if (show == (View.VISIBLE == getVisibility())) { return; } ViewGroup.LayoutParams params = mContainer.getLayoutParams(); if (null != params) { if (show) { params.height = ViewGroup.LayoutParams.WRAP_CONTENT; } else { params.height = 0; } setVisibility(show ? View.VISIBLE : View.INVISIBLE); } } /** * 设置最后更新的时间文本 * * @param label 文本 */ public void setLastUpdatedLabel(CharSequence label) { } /** * 设置加载中的图片 * * @param drawable 图片 */ public void setLoadingDrawable(Drawable drawable) { } /** * 设置拉动的文本,典型的是“下拉可以刷新” * * @param pullLabel 拉动的文本 */ public void setPullLabel(CharSequence pullLabel) { } /** * 设置正在刷新的文本,典型的是“正在刷新” * * @param refreshingLabel 刷新文本 */ public void setRefreshingLabel(CharSequence refreshingLabel) { } /** * 设置释放的文本,典型的是“松开可以刷新” * * @param releaseLabel 释放文本 */ public void setReleaseLabel(CharSequence releaseLabel) { } @Override public void setState(State state) { if (mCurState != state) { mPreState = mCurState; mCurState = state; onStateChanged(state, mPreState); } } @Override public State getState() { return mCurState; } @Override public void onPull(int offset) { } /** * 得到前一个状态 * * @return 状态 */ protected State getPreState() { return mPreState; } /** * 当状态改变时调用 * * @param curState 当前状态 * @param oldState 老的状态 */ protected void onStateChanged(State curState, State oldState) { switch (curState) { case RESET: onReset(); break; case RELEASE_TO_REFRESH: onReleaseToRefresh(); break; case PULL_TO_REFRESH: onPullToRefresh(); break; case REFRESHING: onRefreshing(); break; case NO_MORE_DATA: onNoMoreData(); break; default: break; } } /** * 当状态设置为{@link State#RESET}时调用 */ protected void onReset() { } /** * 当状态设置为{@link State#PULL_TO_REFRESH}时调用 */ protected void onPullToRefresh() { } /** * 当状态设置为{@link State#RELEASE_TO_REFRESH}时调用 */ protected void onReleaseToRefresh() { } /** * 当状态设置为{@link State#REFRESHING}时调用 */ protected void onRefreshing() { } /** * 当状态设置为{@link State#NO_MORE_DATA}时调用 */ protected void onNoMoreData() { } /** * 得到当前Layout的内容大小,它将作为一个刷新的临界点 * * @return 高度 */ public abstract int getContentSize(); /** * 创建Loading的View * * @param context context * @param attrs attrs * @return Loading的View */ protected abstract View createLoadingView(Context context, AttributeSet attrs); }
[ "852780161@qq.com" ]
852780161@qq.com
021d8a6182d0541f88b126636b9dfa7507599fe7
647ce242e20bc792b334cf445d1fb3243f0f3b47
/chintai-migration-cms/src/net/chintai/backend/sysadmin/user/dao/UserPasswordChangePageDao.java
013d67ef8f4aab8f56a8365329a38705907300c5
[]
no_license
sangjiexun/20191031test
0ce6c9e3dabb7eed465d4add33a107e5b5525236
3248d86ce282c1455f2e6ce0e05f0dbd15e51518
refs/heads/master
2020-12-14T20:31:05.085987
2019-11-01T06:03:50
2019-11-01T06:03:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
885
java
/* * $Id: UserPasswordChangePageDao.java 3570 2007-12-14 08:55:47Z t-kojima $ * --------------------------------------------------------- * 更新日 更新者 内容 * --------------------------------------------------------- * 2007/10/10 BGT)金東珍 新規作成 * */ package net.chintai.backend.sysadmin.user.dao; import net.chintai.backend.sysadmin.user.domain.UserDomain; /** * ユーザパスワード変更画面に遷移DAO * * @author Kim Dong Jin * @version $Revision: 3570 $ * Copyright: (C) CHINTAI Corporation All Right Reserved. */ public interface UserPasswordChangePageDao { /** * ユーザパスワード変更画面に遷移 * @param paramBean ユーザID * @return UserDomain ユーザ情報で最新更新日付 */ public UserDomain userPasswordChangePage(UserPasswordChangePageParamBean paramBean); }
[ "yuki.hirukawa@ctc-g.co.jp" ]
yuki.hirukawa@ctc-g.co.jp
72097ac99963d3de1ebdebb341af0405daad0f40
efe469d4b01fc67e4179bd90653843423c8ca7d1
/welcomelibrary/src/main/java/com/eric/come/glide/request/transition/BitmapTransitionFactory.java
23afe1e1c3e1b93630133c102badf9fefbfc150c
[]
no_license
AndroidLMY/Welcome
5194e5da9f08b5ac809ed89d8c40ddb57b7b946a
e2c1eed1e86021e57fe3804cb20ee6d9c24d43b5
refs/heads/master
2021-06-13T20:29:59.541071
2021-05-25T03:14:27
2021-05-25T03:14:27
200,602,628
6
1
null
null
null
null
UTF-8
Java
false
false
704
java
package com.eric.come.glide.request.transition; import android.graphics.Bitmap; import android.graphics.drawable.Drawable; import androidx.annotation.NonNull; /** * A {@link TransitionFactory} for {@link Bitmap}s that uses a Drawable transition * factory to transition from an existing drawable already visible on the target to the new bitmap. * * @see BitmapContainerTransitionFactory */ public class BitmapTransitionFactory extends BitmapContainerTransitionFactory<Bitmap> { public BitmapTransitionFactory(@NonNull TransitionFactory<Drawable> realFactory) { super(realFactory); } @Override @NonNull protected Bitmap getBitmap(@NonNull Bitmap current) { return current; } }
[ "465008238@qq.com" ]
465008238@qq.com
3647ca10761eb8c2273fbe689e46c3c53f255136
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/12/12_66cd0b32cf56ca457b50f5de3f2c51975f4a5c12/CopyToClipboard/12_66cd0b32cf56ca457b50f5de3f2c51975f4a5c12_CopyToClipboard_s.java
c68021a95ec5f5304bb15cbf144377033efffbba
[]
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
7,078
java
/* CopyToClipboard.java / Frost Copyright (C) 2007 Frost Project <jtcfrost.sourceforge.net> 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 2 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, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package frost.util; import java.awt.*; import java.awt.datatransfer.*; import frost.util.gui.translation.*; public class CopyToClipboard { private static Clipboard clipboard = null; private static class DummyClipboardOwner implements ClipboardOwner { public void lostOwnership(final Clipboard tclipboard, final Transferable contents) { } } private static DummyClipboardOwner dummyClipboardOwner = new DummyClipboardOwner(); private static Clipboard getClipboard() { if (clipboard == null) { clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); } return clipboard; } public static void copyText(final String text) { final StringSelection selection = new StringSelection(text); getClipboard().setContents(selection, dummyClipboardOwner); } /** * This method copies the CHK keys and file names of the selected items (if any) to the clipboard. * Each ModelItem must implement interface ICopyToClipboardItem. */ public static void copyKeysAndFilenames(final Object[] items) { if (items == null && items.length == 0) { return; } final String keyNotAvailableMessage = Language.getInstance().getString("Common.copyToClipBoard.extendedInfo.keyNotAvailableYet"); final StringBuilder textToCopy = new StringBuilder(); CopyToClipboardItem item; for (final Object ditem : items) { if( !(ditem instanceof CopyToClipboardItem) ) { continue; } item = (CopyToClipboardItem) ditem; appendKeyAndFilename(textToCopy, item.getKey(), item.getFilename(), keyNotAvailableMessage); // for a single item don't append newline if( items.length > 1 ) { textToCopy.append("\n"); } } copyText(textToCopy.toString()); } /** * This method copies extended information about the selected items (if any) to * the clipboard. That information is composed of the filename, the key and * the size in bytes. * Each ModelItem must implement interface ICopyToClipboardItem. */ public static void copyExtendedInfo(final Object[] items) { if (items == null && items.length == 0) { return; } final String keyNotAvailableMessage = Language.getInstance().getString("Common.copyToClipBoard.extendedInfo.keyNotAvailableYet"); final String fileMessage = Language.getInstance().getString("Common.copyToClipBoard.extendedInfo.file")+" "; final String keyMessage = Language.getInstance().getString("Common.copyToClipBoard.extendedInfo.key")+" "; final String bytesMessage = Language.getInstance().getString("Common.copyToClipBoard.extendedInfo.bytes")+" "; final StringBuilder textToCopy = new StringBuilder(); CopyToClipboardItem item; for (final Object ditem : items) { if( !(ditem instanceof CopyToClipboardItem) ) { continue; } item = (CopyToClipboardItem) ditem; String key = item.getKey(); if (key == null) { key = keyNotAvailableMessage; } else { // always use key+filename, also on 0.5. wait for user feedback :) key = new StringBuffer().append(key).append("/").append(item.getFilename()).toString(); } String fs; if( item.getFileSize() < 0 ) { fs = "?"; } else { fs = Long.toString(item.getFileSize()); } textToCopy.append(fileMessage); textToCopy.append(item.getFilename()).append("\n"); textToCopy.append(keyMessage); textToCopy.append(key).append("\n"); textToCopy.append(bytesMessage); textToCopy.append(fs).append("\n\n"); } // We remove the additional \n at the end textToCopy.deleteCharAt(textToCopy.length() - 1); copyText(textToCopy.toString()); } /** * This method copies the CHK keys of the selected items (if any) to the clipboard. * Used only for 0.5 items. * Each ModelItem must implement interface ICopyToClipboardItem. */ public static void copyKeys(final Object[] items) { if (items == null && items.length == 0) { return; } final String keyNotAvailableMessage = Language.getInstance().getString("Common.copyToClipBoard.extendedInfo.keyNotAvailableYet"); final StringBuilder textToCopy = new StringBuilder(); CopyToClipboardItem item; for (final Object ditem : items) { if( !(ditem instanceof CopyToClipboardItem) ) { continue; } item = (CopyToClipboardItem) ditem; String key = item.getKey(); if (key == null) { key = keyNotAvailableMessage; } textToCopy.append(key); if( items.length > 1 ) { textToCopy.append("\n"); } } copyText(textToCopy.toString()); } /** * Appends key/filename to the StringBuilder. * Does not append filename if there is already a filename. * Only appends filename for CHK keys. */ private static void appendKeyAndFilename(final StringBuilder textToCopy, String key, final String filename, final String keyNotAvailableMessage) { if (key == null) { key = keyNotAvailableMessage; // no key, its a shared file textToCopy.append(filename); } else if( key.startsWith("CHK@") ) { textToCopy.append(key); // CHK, append filename if there is not already a filename in the key if( key.indexOf('/') < 0 ) { textToCopy.append("/"); textToCopy.append(filename); } } else { // else for KSK,SSK,USK: don't append filename, key contains all needed information textToCopy.append(key); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
9fd5609c508944a3c987bc525a7afe9dabfbf836
4f51e57340d81faa8f3bebd3ca96f2d82f26e15e
/src/main/java/com/avaje/ebeanservice/elastic/search/rawsource/RawSourceCopier.java
31d5ecdfca5a41075e055540306f009b16bb2b10
[ "Apache-2.0" ]
permissive
chenghuanhuan/ebean-elastic
ae4d7f78466e3cc0fd4cef863cc5bd341135f2f0
50c2f6259df828e9c0a50a4619aa3e129ab45bfa
refs/heads/master
2021-01-01T04:41:45.746525
2016-11-17T11:52:12
2016-11-17T11:52:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,560
java
package com.avaje.ebeanservice.elastic.search.rawsource; import com.avaje.ebean.PersistenceIOException; import com.avaje.ebean.QueryEachConsumer; import com.avaje.ebean.text.json.EJson; import com.avaje.ebeanservice.elastic.bulk.BulkUpdate; import com.fasterxml.jackson.core.JsonGenerator; import java.io.IOException; /** * Used to scroll a source index and copy to another index. */ public class RawSourceCopier implements QueryEachConsumer<RawSource> { private final BulkUpdate txn; private final String targetIndexType; private final String targetIndexName; /** * Construct with target index type and name. */ public RawSourceCopier(BulkUpdate txn, String targetIndexType, String targetIndexName) { this.txn = txn; this.targetIndexType = targetIndexType; this.targetIndexName = targetIndexName; } @Override public void accept(RawSource bean) { try { JsonGenerator gen = txn.obtain().gen(); writeBulkHeader(gen, bean.getId()); EJson.write(bean.getSource(), gen); gen.writeRaw("\n"); } catch (IOException e) { throw new PersistenceIOException(e); } } private void writeBulkHeader(JsonGenerator gen, Object idValue) throws IOException { gen.writeStartObject(); gen.writeFieldName("index"); gen.writeStartObject(); gen.writeStringField("_id", idValue.toString()); gen.writeStringField("_type", targetIndexType); gen.writeStringField("_index", targetIndexName); gen.writeEndObject(); gen.writeEndObject(); gen.writeRaw("\n"); } }
[ "robin.bygrave@gmail.com" ]
robin.bygrave@gmail.com
580dca5fb20a77694ea8a3717075aa7a13a60de1
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_253f5e3162ede01940e63e2b4eb4e4690c5fe391/Record/3_253f5e3162ede01940e63e2b4eb4e4690c5fe391_Record_s.java
afa15d5016c89bdd9d77e5ec66782d89f9d42101
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,145
java
package com.example.gifting; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Bundle; import android.provider.MediaStore; import android.view.Menu; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class Record extends Activity implements OnClickListener{ private static final int ACTION_TAKE_VIDEO = 3; Button b1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_record); PackageManager pm = this.getPackageManager(); if (!pm.hasSystemFeature(PackageManager.FEATURE_CAMERA)) { // create an alert dialog alertbox("Error", "You Do Not Have A Camera"); }else{ b1=(Button)findViewById(R.id.button1); b1.setOnClickListener(this); fdispatchTakeVideoIntent(); } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.activity_record, menu); return true; } private void dispatchTakeVideoIntent() { Intent takeVideoIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE); startActivityForResult(takeVideoIntent, ACTION_TAKE_VIDEO); } protected void alertbox(String title, String mymessage) { new AlertDialog.Builder(this) .setMessage(mymessage) .setTitle(title) .setCancelable(true) .setNeutralButton(android.R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { finish(); } }).show(); } @Override public void onClick(View v) { // TODO Auto-generated method stub switch (v.getId()) { case R.id.button1: //basically the same as before but sends an empty string for the address and sends the string containing all previous searches dispatchTakeVideoIntent(); break; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
3fcd34ed01202e93dcad2b94ae7cc7a5b9f87857
cb6beb899054b1308d384a66e2fee1dcbd0abfdb
/app/models/User.java
2969d2d4ef5720e47aa22f14e48e83cc505a6b3e
[]
no_license
mosliu/cpzinfo
a3b03efc2968cf3f3bcc39b756cc7e9bf47e5289
33decb4731f973780a4ff4bc0a8cab5eac0dd250
refs/heads/master
2020-05-17T20:06:02.379237
2019-02-01T05:55:33
2019-02-01T05:55:33
32,117,535
0
0
null
null
null
null
UTF-8
Java
false
false
3,492
java
package models; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.ManyToMany; import javax.persistence.Table; import play.data.format.Formats; import play.data.validation.Constraints; import play.db.jpa.JPA; import be.objectify.deadbolt.core.models.Permission; import be.objectify.deadbolt.core.models.Role; import be.objectify.deadbolt.core.models.Subject; /** * USER entity managed by JPA */ @Entity @Table(name = "user") public class User implements Subject{ @Id @Constraints.Required public long id; @Constraints.Required @Formats.NonEmpty public String email; @Constraints.Required public String name; @Constraints.Required public String password; public int right; public String group; @ManyToMany public List<SecurityRole> roles; @ManyToMany public List<UserPermission> permissions; public static Map<String,String> options() { List<User> users = JPA.em().createQuery("from User order by name").getResultList(); LinkedHashMap<String,String> options = new LinkedHashMap<String,String>(); for(User c: users) { options.put(""+c.id,c.name+":"+c.email); } return options; } public static User findByID(long id){ return JPA.em().find(User.class, id); } public static User findByEmail(String email) { if(email == null){ email = ""; return null; } List<User> l = JPA.em().createQuery("from User where email =? ").setParameter(1,email).getResultList(); // JPA.em().createQuery("from User where email = "+email). if(l.size()==1){ return l.get(0); }else if(l.size()>1){ System.out.println("===================error==================="); for (User user : l) { System.out.println(user.email); } System.out.println("=================error end================="); return null; }else{ return null; } // return JPA.em().find(User.class, email); } // public static Map<String, String> options() { // List<USER> companies = JPA.em() // .createQuery("from Company order by name").getResultList(); // LinkedHashMap<String, String> options = new LinkedHashMap<String, // String>(); // for (USER c : companies) { // options.put(c.id.toString(), c.name); // } // return options; // } // -- Queries // public static Model.Finder<String, User> find = new Model.Finder( // String.class, User.class); /** * Retrieve all users. */ public static List<User> findAll() { return JPA.em().createQuery("from User").getResultList(); // return User.findAll(); } /** * Authenticate a User. */ public static User authenticate(String email, String password) { User u = findByEmail(email); // User u = JPA.em().find(User.class,email, map); if(u!=null&&u.password.equals(password)){ System.out.println(u); return u; }else{ return null; } // return find.where().eq("email", email).eq("password", password) // .findUnique(); } /** * Insert this new user. */ public void save() { JPA.em().persist(this); } // -- @Override public String toString() { return "User(" + email + ")"; } @Override public List<? extends Permission> getPermissions() { return permissions; } @Override public List<? extends Role> getRoles() { return roles; } @Override public String getIdentifier() { // TODO Auto-generated method stub return ""+id; } }
[ "lx0319@gmail.com" ]
lx0319@gmail.com
02072f6ac1a68dbe22e0a6b6d50ce0d5733e9d68
43b7d79aec0c020365da7f94bfa001072f134c98
/api-service/src/main/java/io/revx/api/service/clickdestination/ClickDestinationCacheService.java
9aed6999943c9abb9ef6ca548dc3fd9408fa6d2d
[]
no_license
anony-mous131415/api
2706d4e617fd181462545d8c349a975653924755
4c9309bcbe7810f94a2a8c23276414ffc8f56049
refs/heads/master
2023-04-10T11:46:24.498611
2021-04-21T13:26:27
2021-04-21T13:26:27
360,180,066
0
1
null
null
null
null
UTF-8
Java
false
false
4,035
java
/* * @author : ranjan-pritesh * * @date: 32 Dec 2019 */ package io.revx.api.service.clickdestination; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import io.revx.api.constants.ApiConstant; import io.revx.api.mysql.entity.clickdestination.ClickDestinationEntity; import io.revx.api.mysql.repo.clickdestination.ClickDestinationRepository; import io.revx.api.service.LoginUserDetailsService; import io.revx.api.service.ModelConverterService; import io.revx.core.model.BaseEntity; import io.revx.core.model.ClickDestination; import io.revx.core.model.requests.SearchRequest; import io.revx.core.service.CacheService; /** * The Class ClickDestinationCacheService. */ @Component public class ClickDestinationCacheService { /** The logger. */ private static Logger logger = LogManager.getLogger(ClickDestinationCacheService.class); /** The cache service. */ @Autowired CacheService cacheService; /** The login user details service. */ @Autowired LoginUserDetailsService loginUserDetailsService; /** The model converter. */ @Autowired ModelConverterService modelConverter; /** The repository. */ @Autowired ClickDestinationRepository repository; /** * Fetch click destination. * * @param search the search * @param sort the sort * @param refresh the refresh * @return the list * @throws Exception the exception */ List<BaseEntity> fetchClickDestination(SearchRequest search, String sort, boolean refresh) throws Exception { logger.debug("getting click destinations from cache.............."); List<BaseEntity> listofClickDestination = new ArrayList<>(); String cacheKeyClickDestination = getCacheKey(); List<BaseEntity> listData = cacheService.fetchListCachedEntityData(cacheKeyClickDestination, search.getFilters().stream().collect(Collectors.toSet()), getSortList(sort)); if (listData == null || refresh) { logger.debug("Could Not find click destination in cache...getting from DB."); List<ClickDestinationEntity> listofClickDestns = repository.findAllByLicenseeIdAndIsRefactored(loginUserDetailsService.getLicenseeId(),Boolean.TRUE); listofClickDestns.forEach(cd -> { try { listofClickDestination.add(modelConverter.convertFromClickDestEntity(cd)); } catch (Exception e) { logger.debug("Exception occured while adding data to click destination cache list {} ", ExceptionUtils.getStackTrace(e)); } }); } if (!listofClickDestination.isEmpty()) { cacheService.populateCache(cacheKeyClickDestination, listofClickDestination, 86400000L, ClickDestination.class); listData = cacheService.fetchListCachedEntityData(cacheKeyClickDestination, search.getFilters().stream().collect(Collectors.toSet()), getSortList(sort)); } listofClickDestination.clear(); return listData; } /** * Gets the cache key. * * @return the cache key */ public String getCacheKey() { return ApiConstant.CLICK_DESTINATION_CACHE_KEY + "_" + loginUserDetailsService.getLicenseeId(); } /** * Gets the sort list. * * @param sort the sort * @return the sort list */ private List<String> getSortList(String sort) { List<String> sortList = new ArrayList<>(); if (StringUtils.isNotBlank(sort)) { for (String sortValue : sort.split(",")) { sortList.add(StringUtils.trim(sortValue)); } } return sortList; } /** * Removes the cache for given key. */ public void remove() { logger.debug("cache removed for key : {} }", getCacheKey()); cacheService.removeCache(getCacheKey()); } }
[ "abhinav.dubey@affle.com" ]
abhinav.dubey@affle.com
7cc810c0f365e52e3696018adaffbd4d80b0617f
59a19bb8c3e2c59a7f7a354f5cafc106e0116e59
/modules/bluima_opennlp/src/main/java/ch/epfl/bbp/shaded/opennlp/tools/lang/spanish/PosTagger.java
64d0c307b4e741faa4d858a2ba88acb35235c161
[ "Apache-2.0" ]
permissive
KnowledgeGarden/bluima
ffd5d54d69e42078598a780bdf6e67a6325d695a
793ea3f46761dce72094e057a56cddfa677156ae
refs/heads/master
2021-01-01T06:21:54.919609
2016-01-25T22:37:43
2016-01-25T22:37:43
97,415,950
1
0
null
2017-07-16T22:53:46
2017-07-16T22:53:46
null
UTF-8
Java
false
false
3,789
java
/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2004 Jason Baldridge, Gann Bierner, and Tom Morton // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ////////////////////////////////////////////////////////////////////////////// package ch.epfl.bbp.shaded.opennlp.tools.lang.spanish; import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintStream; import ch.epfl.bbp.shaded.opennlp.maxent.MaxentModel; import ch.epfl.bbp.shaded.opennlp.maxent.io.SuffixSensitiveGISModelReader; import ch.epfl.bbp.shaded.opennlp.tools.ngram.Dictionary; import ch.epfl.bbp.shaded.opennlp.tools.postag.DefaultPOSContextGenerator; import ch.epfl.bbp.shaded.opennlp.tools.postag.POSDictionary; import ch.epfl.bbp.shaded.opennlp.tools.postag.POSTaggerME; import ch.epfl.bbp.shaded.opennlp.tools.postag.TagDictionary; /** * A part of speech tagger that uses a model trained on Spanish data. */ public class PosTagger extends POSTaggerME { public PosTagger(String modelFile, Dictionary dict, TagDictionary tagdict) { super(getModel(modelFile), new DefaultPOSContextGenerator(dict),tagdict); } public PosTagger(String modelFile, TagDictionary tagdict) { super(getModel(modelFile), new DefaultPOSContextGenerator(null),tagdict); } public PosTagger(String modelFile) { super(getModel(modelFile), new DefaultPOSContextGenerator(null)); } private static MaxentModel getModel(String name) { try { return new SuffixSensitiveGISModelReader(new File(name)).getModel(); } catch (IOException e) { e.printStackTrace(); return null; } } /** * <p>Part-of-speech tag a string passed in on the command line. For * example: * * <p>java opennlp.tools.lang.spanish.PosTagger -test "Sr. Smith da el auto a sus hermano en Lunes." */ public static void main(String[] args) throws IOException { if (args.length == 0) { System.err.println("Usage: PosTaggerME [-td tagdict] model < tokenized_sentences"); System.err.println(" PosTaggerME -test model \"sentence\""); System.exit(1); } int ai=0; boolean test = false; String tagdict = null; while(ai < args.length && args[ai].startsWith("-")) { if (args[ai].equals("-test")) { ai++; test=true; } else if (args[ai].equals("-td")) { tagdict = args[ai+1]; ai+=2; } } POSTaggerME tagger; String modelFile = args[ai++]; if (tagdict != null) { tagger = new PosTagger(modelFile, new POSDictionary(tagdict)); } else { tagger = new PosTagger(modelFile); } if (test) { System.out.println(tagger.tag(args[ai])); } else { BufferedReader in = new BufferedReader(new InputStreamReader(System.in,"ISO-8859-1")); PrintStream out = new PrintStream(System.out,true,"ISO-8859-1"); for (String line = in.readLine(); line != null; line = in.readLine()) { out.println(tagger.tag(line)); } } } }
[ "renaud@apache.org" ]
renaud@apache.org
74830eba2d39d6ec27fde81bfe43b70196c5dd8b
e9739272edb41faa17d5945ffe1bd0e7496cec81
/src/com/giago/ecard/utils/actionbar/ActionBarHelperHoneycomb.java
9ba3ec3b5bd17e760537bca52dede140e54979c1
[]
no_license
dreab8/eCard
d3d5dc8b0a8e863a329ebdb6835c1c0fcf421504
5d7eb4933a7dac471b4d7488727501d27004af6e
refs/heads/master
2016-09-05T13:03:27.500790
2012-04-04T22:07:01
2012-04-04T22:07:01
3,290,039
0
0
null
null
null
null
UTF-8
Java
false
false
2,750
java
/* * Copyright 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 com.giago.ecard.utils.actionbar; import android.app.Activity; import android.content.Context; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import com.giago.ecard.R; /** * An extension of {@link ActionBarHelper} that provides Android 3.0-specific functionality for * Honeycomb tablets. It thus requires API level 11. */ public class ActionBarHelperHoneycomb extends ActionBarHelper { private Menu mOptionsMenu; private View mRefreshIndeterminateProgressView = null; protected ActionBarHelperHoneycomb(Activity activity) { super(activity); } @Override public boolean onCreateOptionsMenu(Menu menu) { mOptionsMenu = menu; return super.onCreateOptionsMenu(menu); } @Override public void setRefreshActionItemState(boolean refreshing) { // On Honeycomb, we can set the state of the refresh button by giving it a custom // action view. if (mOptionsMenu == null) { return; } final MenuItem refreshItem = mOptionsMenu.findItem(R.id.menu_refresh); if (refreshItem != null) { if (refreshing) { if (mRefreshIndeterminateProgressView == null) { LayoutInflater inflater = (LayoutInflater) getActionBarThemedContext().getSystemService( Context.LAYOUT_INFLATER_SERVICE); mRefreshIndeterminateProgressView = inflater.inflate( R.layout.actionbar_indeterminate_progress, null); } refreshItem.setActionView(mRefreshIndeterminateProgressView); } else { refreshItem.setActionView(null); } } } /** * Returns a {@link Context} suitable for inflating layouts for the action bar. The * implementation for this method in {@link ActionBarHelperICS} asks the action bar for a * themed context. */ protected Context getActionBarThemedContext() { return mActivity; } }
[ "luigi.agosti@gmail.com" ]
luigi.agosti@gmail.com
c1bcfed32b2d3ba3b3483c8f2112ded90713d833
2a76f8d5b366ec0997fdf4373ea849f15aad4860
/ch10/src/main/java/com/sanqing/po/CstLost.java
9ae19e375b4269c93a2750db0725d5b3e46da16c
[]
no_license
py85252876/JavaWeb
008d69f274c69780eccc2eb70c58f4f5bb3b9714
ffde4d7b210b29b1b0bdccf7cae2b04167c1ea72
refs/heads/master
2021-06-19T14:31:16.830488
2017-06-02T22:45:11
2017-06-02T22:45:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,797
java
package com.sanqing.po; import java.util.Date; /** * CstLost entity. * * @author MyEclipse Persistence Tools */ public class CstLost implements java.io.Serializable { // Fields private Long lstId; private CstCustomer cstCustomer; private String lstCustManagerName; private Date lstLastOrderDate; private Date lstLostDate; private String lstDelay; private String lstReason; private String lstStatus; // Constructors /** * default constructor */ public CstLost() { } /** * minimal constructor */ public CstLost(CstCustomer cstCustomer, String lstCustManagerName, String lstStatus) { this.cstCustomer = cstCustomer; this.lstCustManagerName = lstCustManagerName; this.lstStatus = lstStatus; } /** * full constructor */ public CstLost(CstCustomer cstCustomer, String lstCustManagerName, Date lstLastOrderDate, Date lstLostDate, String lstDelay, String lstReason, String lstStatus) { this.cstCustomer = cstCustomer; this.lstCustManagerName = lstCustManagerName; this.lstLastOrderDate = lstLastOrderDate; this.lstLostDate = lstLostDate; this.lstDelay = lstDelay; this.lstReason = lstReason; this.lstStatus = lstStatus; } // Property accessors public Long getLstId() { return this.lstId; } public void setLstId(Long lstId) { this.lstId = lstId; } public CstCustomer getCstCustomer() { return this.cstCustomer; } public void setCstCustomer(CstCustomer cstCustomer) { this.cstCustomer = cstCustomer; } public String getLstCustManagerName() { return this.lstCustManagerName; } public void setLstCustManagerName(String lstCustManagerName) { this.lstCustManagerName = lstCustManagerName; } public Date getLstLastOrderDate() { return lstLastOrderDate; } public void setLstLastOrderDate(Date lstLastOrderDate) { this.lstLastOrderDate = lstLastOrderDate; } public Date getLstLostDate() { return lstLostDate; } public void setLstLostDate(Date lstLostDate) { this.lstLostDate = lstLostDate; } public String getLstDelay() { return this.lstDelay; } public void setLstDelay(String lstDelay) { this.lstDelay = lstDelay; } public String getLstReason() { return this.lstReason; } public void setLstReason(String lstReason) { this.lstReason = lstReason; } public String getLstStatus() { return this.lstStatus; } public void setLstStatus(String lstStatus) { this.lstStatus = lstStatus; } }
[ "yanruilin@139.com" ]
yanruilin@139.com
9eb467043b87c23657bcc409a2d91b0e6413fd2e
1a8bed788239b5ed784539f820fc0117e5f89ddc
/src/main/java/com/readboy/ssm/po/PerformanceDkkhbsMx.java
f3d96e55ff32f4ce8b42b138218fd5abaec6c0dc
[]
no_license
jlf1997/bank_pm
9cfbc3d63d8d0db782491f31539b102bbb17f043
ce301773e11d451045bfacd53d0bd762316cc634
refs/heads/master
2020-03-29T22:14:05.261212
2019-04-29T08:17:06
2019-04-29T08:17:06
150,410,112
0
0
null
null
null
null
UTF-8
Java
false
false
3,891
java
package com.readboy.ssm.po; import java.io.Serializable; import java.math.BigDecimal; /** * @author: LCL * @date: 2017-6-24 * @description:绩效_贷款客户包收明细,对应数据库表:erp_wage_dkkhbsmx */ public class PerformanceDkkhbsMx{ private String tjrq; //统计日期 private String jgdm; //机构代码 private String zzbz; //组织标志 private String gwbz; //岗位标志 private String yggh; //员工工号 private String khbh; //客户编号 private String khmc; //客户名称 private String zjhm; //证件号码 private String hth; //合同号 private BigDecimal dkje; //贷款金额 private String dkzh; //贷款账号 private String dkfl; //贷款分类 private BigDecimal dj; //单价 private String ffrq; //发放日期 private String dqrq; //到期日期 private BigDecimal zrbl; //责任比例 private BigDecimal bsdj; //笔数单价 private BigDecimal bsdw; //笔数单位 private BigDecimal bsgz; //笔数工资 private BigDecimal eddj; //额度单价 private BigDecimal eddw; //额度单位 private BigDecimal edgz; //额度工资 private String zzjc; //组织简称,该属性是显示要用,对应数据库表无 public String getZzjc() { return zzjc; } public void setZzjc(String zzjc) { this.zzjc = zzjc; } public String getTjrq() { if(tjrq != null && tjrq.length() > 10){ return tjrq.substring(0,10); } return tjrq; } public String getJgdm() { return jgdm; } public String getZzbz() { return zzbz; } public String getGwbz() { return gwbz; } public String getYggh() { return yggh; } public String getKhbh() { return khbh; } public String getKhmc() { return khmc; } public String getZjhm() { return zjhm; } public String getHth() { return hth; } public BigDecimal getDkje() { return dkje; } public String getDkzh() { return dkzh; } public String getDkfl() { return dkfl; } public BigDecimal getDj() { return dj; } public String getFfrq() { if(ffrq != null && ffrq.length() > 10){ return ffrq.substring(0,10); } return ffrq; } public String getDqrq() { if(dqrq != null && dqrq.length() > 10){ return dqrq.substring(0,10); } return dqrq; } public BigDecimal getZrbl() { return zrbl; } public BigDecimal getBsdj() { return bsdj; } public BigDecimal getBsdw() { return bsdw; } public BigDecimal getBsgz() { return bsgz; } public BigDecimal getEddj() { return eddj; } public BigDecimal getEddw() { return eddw; } public BigDecimal getEdgz() { return edgz; } public void setTjrq(String tjrq) { this.tjrq = tjrq; } public void setJgdm(String jgdm) { this.jgdm = jgdm; } public void setZzbz(String zzbz) { this.zzbz = zzbz; } public void setGwbz(String gwbz) { this.gwbz = gwbz; } public void setYggh(String yggh) { this.yggh = yggh; } public void setKhbh(String khbh) { this.khbh = khbh; } public void setKhmc(String khmc) { this.khmc = khmc; } public void setZjhm(String zjhm) { this.zjhm = zjhm; } public void setHth(String hth) { this.hth = hth; } public void setDkje(BigDecimal dkje) { this.dkje = dkje; } public void setDkzh(String dkzh) { this.dkzh = dkzh; } public void setDkfl(String dkfl) { this.dkfl = dkfl; } public void setDj(BigDecimal dj) { this.dj = dj; } public void setFfrq(String ffrq) { this.ffrq = ffrq; } public void setDqrq(String dqrq) { this.dqrq = dqrq; } public void setZrbl(BigDecimal zrbl) { this.zrbl = zrbl; } public void setBsdj(BigDecimal bsdj) { this.bsdj = bsdj; } public void setBsdw(BigDecimal bsdw) { this.bsdw = bsdw; } public void setBsgz(BigDecimal bsgz) { this.bsgz = bsgz; } public void setEddj(BigDecimal eddj) { this.eddj = eddj; } public void setEddw(BigDecimal eddw) { this.eddw = eddw; } public void setEdgz(BigDecimal edgz) { this.edgz = edgz; } }
[ "675866753@qq.com" ]
675866753@qq.com
ff289dec9c243c40d02f5fba83fe8537be688695
32cd70512c7a661aeefee440586339211fbc9efd
/aws-java-sdk-redshift/src/main/java/com/amazonaws/services/redshift/model/transform/DescribeTagsResultStaxUnmarshaller.java
c93275c2747827f041292d08a0625437c6452bc7
[ "Apache-2.0" ]
permissive
twigkit/aws-sdk-java
7409d949ce0b0fbd061e787a5b39a93db7247d3d
0b8dd8cf5e52ad7ae57acd2ce7a584fd83a998be
refs/heads/master
2020-04-03T16:40:16.625651
2018-05-04T12:05:14
2018-05-04T12:05:14
60,255,938
0
1
Apache-2.0
2018-05-04T12:48:26
2016-06-02T10:40:53
Java
UTF-8
Java
false
false
2,894
java
/* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights * Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.redshift.model.transform; import java.util.Map; import java.util.HashMap; import java.util.ArrayList; import java.util.Map.Entry; import javax.xml.stream.events.XMLEvent; import com.amazonaws.services.redshift.model.*; import com.amazonaws.transform.Unmarshaller; import com.amazonaws.transform.MapEntry; import com.amazonaws.transform.StaxUnmarshallerContext; import com.amazonaws.transform.SimpleTypeStaxUnmarshallers.*; /** * DescribeTagsResult StAX Unmarshaller */ public class DescribeTagsResultStaxUnmarshaller implements Unmarshaller<DescribeTagsResult, StaxUnmarshallerContext> { public DescribeTagsResult unmarshall(StaxUnmarshallerContext context) throws Exception { DescribeTagsResult describeTagsResult = new DescribeTagsResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return describeTagsResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("TaggedResources/TaggedResource", targetDepth)) { describeTagsResult .withTaggedResources(TaggedResourceStaxUnmarshaller .getInstance().unmarshall(context)); continue; } if (context.testExpression("Marker", targetDepth)) { describeTagsResult.setMarker(StringStaxUnmarshaller .getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return describeTagsResult; } } } } private static DescribeTagsResultStaxUnmarshaller instance; public static DescribeTagsResultStaxUnmarshaller getInstance() { if (instance == null) instance = new DescribeTagsResultStaxUnmarshaller(); return instance; } }
[ "aws@amazon.com" ]
aws@amazon.com
eb4848b224aacf6fc7c0b6254fd62e89e5bbc0a9
ef8d44db2b46398519ed930583d8671484c52bf2
/src/main/java/com/wmw/crc/manager/ScheduledTasks.java
5b537b8cb647a11d86f266710ba6f4cf50339373
[]
no_license
wnameless/crc-manager
3da2920236c090035b85be9b2891e2610c9573f8
531d9c71dfd73ae30bf5c581767e6cd05b03319f
refs/heads/master
2023-08-17T09:14:50.775622
2022-06-23T01:46:39
2022-06-23T01:46:39
117,639,859
0
0
null
2023-03-04T20:12:16
2018-01-16T06:15:16
Java
UTF-8
Java
false
false
1,852
java
/* * * Copyright 2018 Wei-Ming Wu * * 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.wmw.crc.manager; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import com.github.wnameless.advancedoptional.AdvOpt; import com.wmw.crc.manager.service.VisitService; import com.wmw.crc.manager.service.tsgh.TsghService; import com.wmw.crc.manager.service.tsgh.TsghService.ContraindicationRefreshResult; import lombok.extern.slf4j.Slf4j; @Slf4j @Component public class ScheduledTasks { @Autowired TsghService tsghService; @Autowired VisitService visitService; @Scheduled(cron = "0 0 22 * * *") void refreshMedicines() { AdvOpt<Integer> opt = tsghService.refreshMedicines(); if (opt.isAbsent()) log.warn(opt.getMessage()); } @Scheduled(cron = "0 0 9,14,18 * * *") void refreshContraindications() { AdvOpt<ContraindicationRefreshResult> opt = tsghService.refreshContraindications(); if (opt.get().getFailedCount() != 0) log.warn(opt.getMessage()); } @Scheduled(cron = "0 15 8 * * *") void sendVisitEmails() { visitService.sendVisitEmails(); } @Scheduled(cron = "0 15 9-21 * * *") void sendHourlyVisitEmails() { visitService.sendHourlyVisitEmails(); } }
[ "wnameless@gmail.com" ]
wnameless@gmail.com
5d0dd5a3f3e4945989a7171261173c42cbc77a17
5848bcd14655edc7b5f7a043e2e99a6715f5163a
/nano-ext/nano-ext-concurrent/src/main/java/org/nanoframework/extension/concurrent/scheduler/defaults/monitor/Pointer.java
450fe568712d96c28805724388ebf4c7469b7406
[ "Apache-2.0" ]
permissive
ycmag/nano-framework
d4c11a3088ab310d026f62160b63192509c433eb
768af5e189783a724d9915d958bdc8a4cf5c28e4
refs/heads/master
2021-01-14T08:50:14.077622
2016-08-23T08:48:30
2016-08-23T08:48:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,665
java
/* * Copyright 2015-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.nanoframework.extension.concurrent.scheduler.defaults.monitor; import org.nanoframework.commons.entity.BaseEntity; /** * * @author yanghe * @since 1.3 */ public class Pointer extends BaseEntity { private static final long serialVersionUID = 7350989467756362845L; private String scene; private Long time; private Long tps; public Pointer() { } private Pointer(String scene, long time, long tps) { this.scene = scene; this.time = time; this.tps = tps; } public static final Pointer create(String scene, long time, long tps) { return new Pointer(scene, time, tps); } public String getScene() { return scene; } public void setScene(String scene) { this.scene = scene; } public Long getTime() { return time; } public void setTime(Long time) { this.time = time; } public Long getTps() { return tps; } public void setTps(Long tps) { this.tps = tps; } }
[ "comicme_yanghe@icloud.com" ]
comicme_yanghe@icloud.com
96f4c1118d2437d004c7601a4031cd58899632ca
447520f40e82a060368a0802a391697bc00be96f
/apks/playstore_apps/com_ubercab/source/zc.java
1188f7fb428e53fbf74ae51bb7d46b61db13a5e9
[ "Apache-2.0", "GPL-1.0-or-later" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
395
java
public class zc { public static final int abc_action_bar_embed_tabs = 2131296257; public static final int abc_allow_stacked_button_bar = 2131296258; public static final int abc_config_actionMenuItemAllCaps = 2131296259; public static final int abc_config_closeDialogWhenTouchOutside = 2131296260; public static final int abc_config_showMenuShortcutsWhenKeyboardPresent = 2131296261; }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
ca4a087e9be6577b0cd48c3648becc290eed3037
27511a2f9b0abe76e3fcef6d70e66647dd15da96
/src/com/instagram/creation/photo/edit/surfacecropfilter/g.java
ce24086befc58793a8569daed6582ef2e9939b0d
[]
no_license
biaolv/com.instagram.android
7edde43d5a909ae2563cf104acfc6891f2a39ebe
3fcd3db2c3823a6d29a31ec0f6abcf5ceca995de
refs/heads/master
2022-05-09T15:05:05.412227
2016-07-21T03:48:36
2016-07-21T03:48:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
372
java
package com.instagram.creation.photo.edit.surfacecropfilter; public final class g { public float a; public float b; public float c; public final void a(g paramg) { a = a; b = b; c = c; } } /* Location: * Qualified Name: com.instagram.creation.photo.edit.surfacecropfilter.g * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
443c33640200b17636dbb867603284d2bca0aed7
27454f43781f8bb6d9c97b219f6df2173526416e
/ftpUploadApplet/src/com/image/applet/ui/FileInfoTableModel.java
e70d41db354863b881579ff0e9525cb2de943b8a
[]
no_license
lookskystar/ftpUploadApplet
1ca804f28fab4e05f839db54ec7a83cc3c1adf79
df030dbeca5339ca9623ebb3dce1f8e5501032e9
refs/heads/master
2021-01-10T08:17:54.744291
2016-02-26T03:41:57
2016-02-26T03:41:57
52,576,611
0
0
null
null
null
null
UTF-8
Java
false
false
7,101
java
package com.image.applet.ui; import java.io.File; import java.util.List; import javax.swing.table.AbstractTableModel; import com.image.applet.util.AppletParam; import com.image.applet.util.FileCounter; public class FileInfoTableModel extends AbstractTableModel { private static final long serialVersionUID = -5907430720433588853L; /** * 是否开启数据输出 */ private boolean DEBUG = true; /** * 表格列字段名称 */ private String[] columnNames = { "操作", "文件名", "类型", "图片数量", "视频数量" }; /** * 是否可修改 */ private boolean[] editable = { true, false, false, false, false }; private Object[][] NULLARRAY = new Object[0][]; /** * 表格中的数据 */ private Object[][] data = NULLARRAY; public FileInfoTableModel() { super(); } public FileInfoTableModel(String[] columnNames) { super(); this.columnNames = columnNames; } /** * 增加一条文件信息,成功返回true,失败返回false * * @param file * @return */ public boolean addFile(File file) { if (file == null || fileExists(file) || !acceptFile(file)) { return false; } Object[][] temp = new Object[data.length + 1][]; System.arraycopy(data, 0, temp, 0, data.length); // 构造一条上传文件的信息 int index = 0; // 用索引,方便调整顺序 Object[] info = new Object[6]; info[index++] = false; // 状态,用于将列表中的状态为false的删除掉 info[index++] = file.getName(); // 文件名 info[index++] = file.isFile() ? "文件" : "目录"; long[] count = FileCounter.countFile(file); info[index++] = count[0]; info[index++] = count[1]; info[index++] = file.getAbsolutePath(); // 本地绝对路径 temp[data.length] = info; data = temp; fireTableDataChanged(); return true; } /** * 判断文件是否已存在 * @param file * @return */ private boolean fileExists(File file) { boolean exists = false; for (Object[] d : data) { if (file.getAbsolutePath().equalsIgnoreCase((String)d[5])) { exists = true; break; } } return exists; } /** * 判断是否接受此文件 * * @param file * @return */ protected boolean acceptFile(File file) { boolean accept = false; AppletParam param = AppletParam.getInstance(); if (file.isDirectory() && param.isDirectorySelectionEnabled) { accept = true; } else if (file.isFile() && param.isFileSelectionEnabled) { if (param.useFileExtension()) { String name = file.getName(); int index = name.lastIndexOf("."); String suffix = ""; if (index > 0) { suffix = name.substring(index + 1).toLowerCase(); accept = param.getFileNameExtension().contains(suffix); accept = accept && file.length() < param.maxFileSize; // 判断文件是否超过最大限制 } } else { accept = true; } } return accept; } /** * 添加多个文件,返回实际满足要求的文件数量 * * @param files * @return */ public int addFiles(List<File> files) { int count = 0; if (files != null && files.size() > 0) { for (File file : files) { if (addFile(file)) { count++; } } } return count; } /** * 删除文件信息 * * @param index */ public void removeFile(int index) { if (index >= 0 && index < data.length) { Object[][] temp = new Object[data.length - 1][]; System.arraycopy(data, 0, temp, 0, index); System.arraycopy(data, index + 1, temp, index, data.length - index - 1); data = temp; fireTableDataChanged(); } } /** * 若数组中的“操作”列对应的值是true时,则删除。 */ public void removeFiles() { for (int i = data.length - 1; i >= 0; i--) { if ((Boolean) data[i][0]) { removeFile(i); } } } /** * 删除给定索引的文件信息 * * @param indexes */ public void removeFiles(int[] indexes) { // 先从小到大排序 for (int i = 0; i < indexes.length; i++) { for (int j = indexes.length - 1; j > i; j--) { if (indexes[j] < indexes[j - 1]) { swap(indexes, j, j - 1); } } } // 然后从大到小删除 for (int i = indexes.length - 1; i >= 0; i--) { removeFile(i); } } /** * 交换数组元素,排序使用 * * @param data * @param i * @param j */ public void swap(int[] data, int i, int j) { int temp = data[i]; data[i] = data[j]; data[j] = temp; } /** * 是否有选中的数据 * * @return */ public boolean hasSelectedRow() { boolean state = false; for (int i = 0; i < data.length; i++) { if ((Boolean) data[i][0]) { state = true; break; } } return state; } public int getColumnCount() { return columnNames.length; } public int getRowCount() { return data.length; } public String getColumnName(int col) { return columnNames[col]; } public Object getValueAt(int row, int col) { if (row != -1 && col != -1) { return data[row][col]; } return null; } /* * JTable uses this method to determine the default renderer/ editor for * each cell. If we didn't implement this method, then the last column would * contain text ("true"/"false"), rather than a check box. */ public Class<?> getColumnClass(int c) { return getValueAt(0, c).getClass(); } /* * Don't need to implement this method unless your table's editable. */ public boolean isCellEditable(int row, int col) { // Note that the data/cell address is constant, // no matter where the cell appears onscreen. return editable[col]; } /* * Don't need to implement this method unless your table's data can change. */ public void setValueAt(Object value, int row, int col) { if (row < data.length) { if (DEBUG) { System.out.println("Setting value at " + row + "," + col + " to " + value + " (an instance of " + value.getClass() + ")"); } data[row][col] = value; fireTableCellUpdated(row, col); if (DEBUG) { System.out.println("New value of data:"); printDebugData(); } } else { fireTableDataChanged(); } } private void printDebugData() { int numRows = getRowCount(); int numCols = getColumnCount(); for (int i = 0; i < numRows; i++) { System.out.print(" row " + i + ":"); for (int j = 0; j < numCols; j++) { System.out.print(" " + data[i][j]); } System.out.println(); } System.out.println("--------------------------"); } /** * @return the columnNames */ public String[] getColumnNames() { return columnNames; } /** * @param columnNames * the columnNames to set */ public void setColumnNames(String[] columnNames) { this.columnNames = columnNames; } /** * @return the data */ public Object[][] getData() { return data; } }
[ "lookskystar@163.com" ]
lookskystar@163.com
c7c8b7d526d62eea65b376b9f55e8987744a4d18
1148b6ee683b0c4591981a759481c98433a4d472
/src/main/java/net/opengis/gml/TimeNodeType.java
bfef6a77a760e145a5151e088516f243dccf03ac
[]
no_license
khoeflm/SemNotam_WebApp
78c9f6ea8a640f98c033c94d5dfdfec6f3b35b80
3bbceaebfd6b9534c4fb81664a9d65c37ec156a1
refs/heads/master
2021-01-20T08:25:30.884165
2018-06-19T17:19:39
2018-06-19T17:19:39
90,143,773
0
0
null
null
null
null
ISO-8859-1
Java
false
false
3,733
java
package net.opengis.gml; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Java-Klasse für TimeNodeType complex type. * * <p>Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist. * * <pre> * &lt;complexType name="TimeNodeType"&gt; * &lt;complexContent&gt; * &lt;extension base="{http://www.opengis.net/gml/3.2}AbstractTimeTopologyPrimitiveType"&gt; * &lt;sequence&gt; * &lt;element name="previousEdge" type="{http://www.opengis.net/gml/3.2}TimeEdgePropertyType" maxOccurs="unbounded" minOccurs="0"/&gt; * &lt;element name="nextEdge" type="{http://www.opengis.net/gml/3.2}TimeEdgePropertyType" maxOccurs="unbounded" minOccurs="0"/&gt; * &lt;element name="position" type="{http://www.opengis.net/gml/3.2}TimeInstantPropertyType" minOccurs="0"/&gt; * &lt;/sequence&gt; * &lt;/extension&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "TimeNodeType", propOrder = { "previousEdge", "nextEdge", "position" }) public class TimeNodeType extends AbstractTimeTopologyPrimitiveType { protected List<TimeEdgePropertyType> previousEdge; protected List<TimeEdgePropertyType> nextEdge; protected TimeInstantPropertyType position; /** * Gets the value of the previousEdge property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the previousEdge property. * * <p> * For example, to add a new item, do as follows: * <pre> * getPreviousEdge().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link TimeEdgePropertyType } * * */ public List<TimeEdgePropertyType> getPreviousEdge() { if (previousEdge == null) { previousEdge = new ArrayList<TimeEdgePropertyType>(); } return this.previousEdge; } /** * Gets the value of the nextEdge property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the nextEdge property. * * <p> * For example, to add a new item, do as follows: * <pre> * getNextEdge().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link TimeEdgePropertyType } * * */ public List<TimeEdgePropertyType> getNextEdge() { if (nextEdge == null) { nextEdge = new ArrayList<TimeEdgePropertyType>(); } return this.nextEdge; } /** * Ruft den Wert der position-Eigenschaft ab. * * @return * possible object is * {@link TimeInstantPropertyType } * */ public TimeInstantPropertyType getPosition() { return position; } /** * Legt den Wert der position-Eigenschaft fest. * * @param value * allowed object is * {@link TimeInstantPropertyType } * */ public void setPosition(TimeInstantPropertyType value) { this.position = value; } }
[ "k.hoeflmeier@gmx.at" ]
k.hoeflmeier@gmx.at
bec34d94f2147a82f56f167a4d5fadf7ab9a6932
ebf05b71257f57afd23bf2980e1d4c8d9f473abe
/src/main/java/com/lambkit/plugin/mail/mockhttp/MockHttpServletRequest.java
0754525fc340cda5d599151a281727f6197987ea
[ "Apache-2.0" ]
permissive
gismaker/lambkit-jdk1.7
c71784530d6d83d8ac6e8c50fbaa36043c9e136b
3596a99d79f78d17cde44923a3fb4a716ea4acef
refs/heads/master
2020-05-16T16:45:51.695274
2019-04-24T07:19:22
2019-04-24T07:19:22
183,171,898
1
0
null
null
null
null
UTF-8
Java
false
false
1,500
java
/** * Copyright (c) 2015-2017, Henry Yang 杨勇 (gismail@foxmail.com). * <p> * 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * 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.lambkit.plugin.mail.mockhttp; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.util.Collections; import java.util.HashMap; import java.util.Map; public class MockHttpServletRequest implements InvocationHandler { @SuppressWarnings("rawtypes") private Map dataMap = new HashMap(); @SuppressWarnings("unchecked") public Object invoke(Object o, Method method, Object[] objects) throws Throwable { if ("getAttributeNames".equals(method.getName())) { return Collections.enumeration(dataMap.keySet()); } else if ("setAttribute".equals(method.getName())) { return dataMap.put(objects[0],objects[1]); } else if ("getAttribute".equals(method.getName())) { return dataMap.get(objects[0]); } return null; } }
[ "gismail@foxmail.com" ]
gismail@foxmail.com
c6e72db84d5c0658f6a755a59ba5718124b4caf9
ef6f6770fa99d2851909327700384ff5ae0857d3
/spring-mvc-crud2/src/main/java/com/paralun/app/controller/UserController.java
f4b213204e89a5d61d54e36f9108e120c8d6ace7
[]
no_license
paralun/belajar-spring-mvc
7cad9fcc08f7566dca05a3754a9857cb6be974a2
68f97112c2531d723fc462a78cd490b3b2739aad
refs/heads/master
2021-01-12T06:15:48.263411
2019-03-17T01:01:54
2019-03-17T01:01:54
77,333,316
0
0
null
null
null
null
UTF-8
Java
false
false
4,933
java
/* * Copyright (c) 2017 | James Kusmambang * Source : https://github.com/paralun */ package com.paralun.app.controller; import com.paralun.app.model.User; import com.paralun.app.service.UserService; import com.paralun.app.validation.UserFormValidation; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.annotation.InitBinder; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.servlet.mvc.support.RedirectAttributes; @Controller public class UserController { @Autowired UserFormValidation userFormValidation; @Autowired private UserService service; @InitBinder protected void initBinder(WebDataBinder binder) { binder.setValidator(userFormValidation); } @RequestMapping(value = "/", method = RequestMethod.GET) public String index(Model model) { return "redirect:/user/list"; } @RequestMapping(value = "/user/list", method = RequestMethod.GET) public String findAllUser(Model model) { model.addAttribute("users", service.findAll()); return "list-user"; } @RequestMapping(value = "/user/add", method = RequestMethod.POST) public String saveOrUpdate(@ModelAttribute("userForm") @Validated User user, BindingResult result, Model model, final RedirectAttributes ra) { if (result.hasErrors()) { populateDefaultModel(model); return "user-form"; } else { ra.addFlashAttribute("css", "success"); if (user.isNew()) { ra.addFlashAttribute("msg", "User added successfully!"); } else { ra.addFlashAttribute("msg", "User updated successfully!"); } service.saveOrUpdate(user); return "redirect:/user/list"; } } @RequestMapping(value = "/user/delete/{id}", method = RequestMethod.GET) public String deleteUser(@PathVariable("id") Integer id, final RedirectAttributes ra) { service.delete(id); ra.addFlashAttribute("css", "success"); ra.addFlashAttribute("msg", "User is deleted!"); return "redirect:/user/list"; } @RequestMapping(value = "/user/add", method = RequestMethod.GET) public String addUser(Model model) { model.addAttribute("userForm", new User()); populateDefaultModel(model); return "user-form"; } @RequestMapping(value = "/user/edit/{id}", method = RequestMethod.GET) public String editUser(@PathVariable("id") Integer id, Model model) { User user = service.findById(id); model.addAttribute("userForm", user); populateDefaultModel(model); return "user-form"; } @RequestMapping(value = "/user/find/{id}", method = RequestMethod.GET) public String showUser(@PathVariable("id") Integer id, Model model) { User user = service.findById(id); if (user == null) { model.addAttribute("css", "danger"); model.addAttribute("msg", "User not found"); } model.addAttribute("user", user); return "detail-user"; } private void populateDefaultModel(Model model) { List<String> frameworksList = new ArrayList<>(); frameworksList.add("Spring MVC"); frameworksList.add("Struts 2"); frameworksList.add("JSF 2"); frameworksList.add("GWT"); frameworksList.add("Play"); frameworksList.add("Apache Wicket"); model.addAttribute("frameworkList", frameworksList); Map<String, String> skill = new LinkedHashMap<>(); skill.put("Hibernate", "Hibernate"); skill.put("Spring", "Spring"); skill.put("Struts", "Struts"); skill.put("Groovy", "Groovy"); skill.put("Grails", "Grails"); model.addAttribute("javaSkillList", skill); List<Integer> numbers = new ArrayList<>(); numbers.add(1); numbers.add(2); numbers.add(3); numbers.add(4); numbers.add(5); model.addAttribute("numberList", numbers); Map<String, String> country = new LinkedHashMap<>(); country.put("US", "United Stated"); country.put("CN", "China"); country.put("SG", "Singapore"); country.put("MY", "Malaysia"); model.addAttribute("countryList", country); } }
[ "kusmambang@gmail.com" ]
kusmambang@gmail.com
32197a73ef521235ac556851b0e08bed4360c612
7ebfd7416a0c9ecdda2ea3a75e95f56873b1047d
/es/es-server/src/main/java/org/elasticsearch/common/breaker/CircuitBreaker.java
1d523fac1f8907266dd1ec0456af3e8890b68abe
[ "BSD-3-Clause", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-free-unknown", "LGPL-2.0-or-later", "MIT", "Python-2.0", "ZPL-2.1", "Apache-2.0" ]
permissive
dvorobiov/crate
0aa6bcaf1b797d53298f23b478bb6c4490ad03c8
9145c10ddf03336226132e9f22e160579004dc8d
refs/heads/master
2020-12-27T06:48:27.026623
2020-01-31T10:16:20
2020-01-31T15:01:35
237,799,786
0
0
Apache-2.0
2020-02-03T20:04:34
2020-02-02T16:26:27
null
UTF-8
Java
false
false
4,047
java
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch 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.elasticsearch.common.breaker; import java.util.Locale; /** * Interface for an object that can be incremented, breaking after some * configured limit has been reached. */ public interface CircuitBreaker { /** * The parent breaker is a sum of all the following breakers combined. With * this we allow a single breaker to have a significant amount of memory * available while still having a "total" limit for all breakers. Note that * it's not a "real" breaker in that it cannot be added to or subtracted * from by itself. */ String PARENT = "parent"; /** * The fielddata breaker tracks data used for fielddata (on fields) as well * as the id cached used for parent/child queries. */ String FIELDDATA = "fielddata"; /** * The request breaker tracks memory used for particular requests. This * includes allocations for things like the cardinality aggregation, and * accounting for the number of buckets used in an aggregation request. * Generally the amounts added to this breaker are released after a request * is finished. */ String REQUEST = "request"; /** * The in-flight request breaker tracks bytes allocated for reading and * writing requests on the network layer. */ String IN_FLIGHT_REQUESTS = "in_flight_requests"; /** * The accounting breaker tracks things held in memory that is independent * of the request lifecycle. This includes memory used by Lucene for * segments. */ String ACCOUNTING = "accounting"; enum Type { // A regular or child MemoryCircuitBreaker MEMORY, // A special parent-type for the hierarchy breaker service PARENT, // A breaker where every action is a noop, it never breaks NOOP; public static Type parseValue(String value) { switch(value.toLowerCase(Locale.ROOT)) { case "noop": return Type.NOOP; case "parent": return Type.PARENT; case "memory": return Type.MEMORY; default: throw new IllegalArgumentException("No CircuitBreaker with type: " + value); } } } /** * add bytes to the breaker and maybe trip * @param bytes number of bytes to add * @param label string label describing the bytes being added * @return the number of "used" bytes for the circuit breaker */ double addEstimateBytesAndMaybeBreak(long bytes, String label) throws CircuitBreakingException; /** * Adjust the circuit breaker without tripping */ long addWithoutBreaking(long bytes); /** * @return the currently used bytes the breaker is tracking */ long getUsed(); /** * @return maximum number of bytes the circuit breaker can track before tripping */ long getLimit(); /** * @return overhead of circuit breaker */ double getOverhead(); /** * @return the number of times the circuit breaker has been tripped */ long getTrippedCount(); /** * @return the name of the breaker */ String getName(); }
[ "f.mathias@zignar.net" ]
f.mathias@zignar.net
8a3377348d4814d4c1b21335e99882129df29a9f
6ad42ef83b2b54bed9ee1c9246b06a630c0c3997
/app/src/main/java/com/geekhive/foodeyrestaurant/grocery/beans/groceryorderConfirm/OrderConfirmation.java
cbb33294ae840c7492c7415be54f6716a6e4a6f0
[]
no_license
dprasad554/FoodeyStoreowner
23fb250ea4b67146f606784b17a679e83e06980c
75983eccaed8247425753c7c8d8435858ad7b1bb
refs/heads/master
2023-04-23T19:00:11.492899
2021-05-03T08:53:14
2021-05-03T08:53:14
363,869,923
0
0
null
null
null
null
UTF-8
Java
false
false
425
java
package com.geekhive.foodeyrestaurant.grocery.beans.groceryorderConfirm; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class OrderConfirmation { @SerializedName("message") @Expose private String message; public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } }
[ "rohitkumar.kr92@gmail.com" ]
rohitkumar.kr92@gmail.com
68da84d76985905cea0a6d7ffb28607683172c05
c500b059c40f092eefc288421d5ac9e1cf9ac6a6
/src/test/java/com/illud/freight/repository/search/PricingSearchRepositoryMockConfiguration.java
16d9b66154adb18a3ed75ae98d95ffa91addfa06
[]
no_license
illudtechzone/freight
cdf7e570d398bfc8921ca2f327d08938c2ca0ded
d2b0f3be387fd4931ef02381bb0a0f65e3f8d7c0
refs/heads/master
2022-12-11T10:32:40.108153
2020-02-12T11:05:26
2020-02-12T11:05:26
206,477,015
0
0
null
null
null
null
UTF-8
Java
false
false
444
java
package com.illud.freight.repository.search; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.annotation.Configuration; /** * Configure a Mock version of PricingSearchRepository to test the * application without starting Elasticsearch. */ @Configuration public class PricingSearchRepositoryMockConfiguration { @MockBean private PricingSearchRepository mockPricingSearchRepository; }
[ "prince.k.c@lxisoft.com" ]
prince.k.c@lxisoft.com
8e023e80eb25876df13267fae28c026be3e56c39
1f8609ac4f52e892f9d9045ed9966f759e4dfc08
/app/src/main/java/com/eduschool/eduschoolapp/Attendance/AdapterViewAttndnc.java
8cc22f33c0da0a9663e1ae7a360d575fbf263b87
[]
no_license
mukulraw/eduschoolapp
61963e64fed75a590774c8fbc269c9e4c50a9dfc
01178365e764c2a83b6671326bfd4e3e33bd0403
refs/heads/master
2021-05-16T16:58:21.848721
2018-03-15T09:28:05
2018-03-15T09:28:05
120,094,350
0
1
null
null
null
null
UTF-8
Java
false
false
2,849
java
package com.eduschool.eduschoolapp.Attendance; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.eduschool.eduschoolapp.AttendncDatePOJO.AttendanceDatum; import com.eduschool.eduschoolapp.AttendncDatePOJO.AttendanceList; import com.eduschool.eduschoolapp.R; import java.util.ArrayList; import java.util.List; /** * Created by user on 8/21/2017. */ public class AdapterViewAttndnc extends RecyclerView.Adapter<AdapterViewAttndnc.myviewholder> { Context context; List<AttendanceDatum> list = new ArrayList<>(); public AdapterViewAttndnc(Context context, List<AttendanceDatum> list) { this.context = context; this.list = list; } public void setGridData(List<AttendanceDatum> list) { this.list = list; notifyDataSetChanged(); } @Override public AdapterViewAttndnc.myviewholder onCreateViewHolder(ViewGroup parent, int viewType) { View itemView = LayoutInflater.from(context) .inflate(R.layout.view_attndnc_model, parent, false); return new AdapterViewAttndnc.myviewholder(itemView); } @Override public void onBindViewHolder(final AdapterViewAttndnc.myviewholder holder, int position) { AttendanceDatum item = list.get(position); if (position == list.size() - 1) { holder.line.setVisibility(View.GONE); } else { holder.line.setVisibility(View.VISIBLE); } //loader.displayImage(item.get); holder.name.setText(item.getStudentName()); holder.no.setText(String.valueOf(position + 1)); String i=item.getAttendance(); if (i.equals("1")){ holder.p.setText("P"); holder.p.setBackground(context.getResources().getDrawable(R.drawable.checkbox)); }else if (i.equals("0")){ holder.p.setText("A"); holder.p.setBackground(context.getResources().getDrawable(R.drawable.absentcheckbox)); }else if (i.equals("2")){ holder.p.setText("L"); holder.p.setBackground(context.getResources().getDrawable(R.drawable.leavecheckbox)); } } @Override public int getItemCount() { return list.size(); } public class myviewholder extends RecyclerView.ViewHolder { TextView no, name, p , line; public myviewholder(View itemView) { super(itemView); name = (TextView) itemView.findViewById(R.id.name); no = (TextView) itemView.findViewById(R.id.no); p = (TextView) itemView.findViewById(R.id.p); line = (TextView)itemView.findViewById(R.id.line); } } }
[ "mukulraw199517@gmail.com" ]
mukulraw199517@gmail.com
2bc4b0c71001d1a7b2cfcc86079fd0d24c66133f
77cd5868df1b0f18de6fd75a0db1e44612ab5b0a
/src/main/java/nc/recipe/processor/PressurizerRecipes.java
8d9f71404141ef5328845f33228c5fa21f75582d
[ "CC0-1.0" ]
permissive
sanrom/NuclearCraft
445bc631ad503b4014c828c6ac48176ad384ff3a
c8fc8ab87e8940a95c8de7efe84faac233de07ee
refs/heads/master
2022-12-22T07:22:49.917786
2020-09-26T14:59:40
2020-09-26T14:59:40
274,776,780
3
1
null
2020-07-16T17:46:03
2020-06-24T21:53:53
Java
UTF-8
Java
false
false
2,626
java
package nc.recipe.processor; import java.util.*; import com.google.common.collect.Lists; import nc.init.NCItems; import nc.recipe.ProcessorRecipeHandler; import nc.util.*; import net.minecraft.init.*; import net.minecraftforge.oredict.OreDictionary; public class PressurizerRecipes extends ProcessorRecipeHandler { public PressurizerRecipes() { super("pressurizer", 1, 0, 1, 0); } @Override public void addRecipes() { addRecipe("dustGraphite", "coal", 1D, 1D); addRecipe("ingotGraphite", "ingotPyrolyticCarbon", 1D, 1D); addRecipe("dustDiamond", "gemDiamond", 1D, 1D); addRecipe("dustRhodochrosite", "gemRhodochrosite", 1D, 1D); addRecipe(Lists.newArrayList("dustQuartz", "dustNetherQuartz"), "gemQuartz", 1D, 1D); addRecipe(oreStack("dustObsidian", 4), Blocks.OBSIDIAN, 1.5D, 1.5D); addRecipe("dustBoronNitride", "gemBoronNitride", 1D, 1D); addRecipe("dustFluorite", "gemFluorite", 1D, 1D); addRecipe("dustVilliaumite", "gemVilliaumite", 1D, 1D); addRecipe("dustCarobbiite", "gemCarobbiite", 1D, 1D); addRecipe(oreStackList(Lists.newArrayList("dustWheat", "foodFlour"), 2), NCItems.graham_cracker, 0.25D, 0.5D); // IC2 addRecipe(oreStack("dustClay", 4), "dustSiliconDioxide", 1D, 1D); // Tech Reborn addRecipe(RegistryHelper.itemStackFromRegistry("techreborn:part:34"), RegistryHelper.itemStackFromRegistry("techreborn:plates:2"), 1D, 1D); // AE2 addRecipe("dustEnder", Items.ENDER_PEARL, 1D, 1D); addPlatePressingRecipes(); } private static final List<String> PLATE_BLACKLIST = Lists.newArrayList("Graphite"); public void addPlatePressingRecipes() { for (String ore : OreDictionary.getOreNames()) { if (ore.startsWith("plate")) { String type = ore.substring(5); if (PLATE_BLACKLIST.contains(type)) { continue; } String ingot = "ingot" + type, gem = "gem" + type; if (OreDictHelper.oreExists(ingot)) { addRecipe(ingot, ore, 1D, 1D); } else if (OreDictHelper.oreExists(gem)) { addRecipe(gem, ore, 1D, 1D); } } if (ore.startsWith("plateDense")) { String plate = "plate" + ore.substring(10); if (OreDictHelper.oreExists(plate)) { addRecipe(oreStack(plate, 9), ore, 2D, 2D); } } } } @Override public List fixExtras(List extras) { List fixed = new ArrayList(3); fixed.add(extras.size() > 0 && extras.get(0) instanceof Double ? (double) extras.get(0) : 1D); fixed.add(extras.size() > 1 && extras.get(1) instanceof Double ? (double) extras.get(1) : 1D); fixed.add(extras.size() > 2 && extras.get(2) instanceof Double ? (double) extras.get(2) : 0D); return fixed; } }
[ "joedodd35@gmail.com" ]
joedodd35@gmail.com
7af2e412b9c2520b027a166c8547d83c2e7b95bf
447520f40e82a060368a0802a391697bc00be96f
/apks/obfuscation_and_logging/ro_ing_mobile_banking_android_activity/source/ґ.java
ed1e51739726de8823886da288abcecbd3b67414
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
1,516
java
import android.content.ComponentName; import android.content.ServiceConnection; import android.os.IBinder; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; public final class ґ implements ServiceConnection { private boolean zzfkp = false; private final BlockingQueue<IBinder> zzfkq = new LinkedBlockingQueue(); public ґ() {} public final void onServiceConnected(ComponentName paramComponentName, IBinder paramIBinder) { this.zzfkq.add(paramIBinder); } public final void onServiceDisconnected(ComponentName paramComponentName) {} public final IBinder zza(long paramLong, TimeUnit paramTimeUnit) { ʅ.zzgn("BlockingServiceConnection.getServiceWithTimeout() called on main thread"); if (this.zzfkp) { throw new IllegalStateException("Cannot call get on this connection more than once"); } this.zzfkp = true; paramTimeUnit = (IBinder)this.zzfkq.poll(10000L, paramTimeUnit); if (paramTimeUnit == null) { throw new TimeoutException("Timed out waiting for the service connection"); } return paramTimeUnit; } public final IBinder zzafw() { ʅ.zzgn("BlockingServiceConnection.getService() called on main thread"); if (this.zzfkp) { throw new IllegalStateException("Cannot call get on this connection more than once"); } this.zzfkp = true; return (IBinder)this.zzfkq.take(); } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
dc7cf04edfbdd91b2a769a5dba9064e0f9ecb9eb
15344b166880617bcea4e8d72f095254bf46960c
/src/Gof/iterator/College.java
c85037e6bed2c3221fa4d8e3c31af66d73927a25
[]
no_license
allinin/datasource
4f68c6b047ecff5194c4f6a469700693e97948f2
e81114db280931b8012d56289699f263cfa17810
refs/heads/master
2023-04-14T02:49:11.717970
2023-04-09T08:57:49
2023-04-09T08:57:49
200,470,016
2
0
null
null
null
null
UTF-8
Java
false
false
180
java
package Gof.iterator; public interface College { public String getName(); public Iterator createIterator(); public void addDepartment(String name,String desc); }
[ "813321674@qq.com" ]
813321674@qq.com
19fc7031c385416f043b595a8a0a51ee89f22ff7
fe84c36175f39f240e79d44ffef7a459eab0b2d5
/src/main/java/com/bytatech/ayoos/patient/avro/Patient.java
d7035c01dde62f5b755802318f53da10bdc09d6a
[]
no_license
BYTA-TECH/patient-service
c5de764786b2da706e8fcc4f550c6416bc7ce3a7
ed912046232a119322bd567101500c3e11aa13eb
refs/heads/master
2022-12-23T05:03:22.701743
2020-03-16T04:46:31
2020-03-16T04:46:31
230,374,161
0
0
null
null
null
null
UTF-8
Java
false
false
7,632
java
/** * Autogenerated by Avro * * DO NOT EDIT DIRECTLY */ package com.bytatech.ayoos.patient.avro; import org.apache.avro.specific.SpecificData; import org.apache.avro.message.BinaryMessageEncoder; import org.apache.avro.message.BinaryMessageDecoder; import org.apache.avro.message.SchemaStore; @SuppressWarnings("all") @org.apache.avro.specific.AvroGenerated public class Patient extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord { private static final long serialVersionUID = -9122485174436532761L; public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"Patient\",\"namespace\":\"com.bytatech.ayoos.patient.avro\",\"fields\":[{\"name\":\"name\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null}]}"); public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; } private static SpecificData MODEL$ = new SpecificData(); private static final BinaryMessageEncoder<Patient> ENCODER = new BinaryMessageEncoder<Patient>(MODEL$, SCHEMA$); private static final BinaryMessageDecoder<Patient> DECODER = new BinaryMessageDecoder<Patient>(MODEL$, SCHEMA$); /** * Return the BinaryMessageDecoder instance used by this class. */ public static BinaryMessageDecoder<Patient> getDecoder() { return DECODER; } /** * Create a new BinaryMessageDecoder instance for this class that uses the specified {@link SchemaStore}. * @param resolver a {@link SchemaStore} used to find schemas by fingerprint */ public static BinaryMessageDecoder<Patient> createDecoder(SchemaStore resolver) { return new BinaryMessageDecoder<Patient>(MODEL$, SCHEMA$, resolver); } /** Serializes this Patient to a ByteBuffer. */ public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException { return ENCODER.encode(this); } /** Deserializes a Patient from a ByteBuffer. */ public static Patient fromByteBuffer( java.nio.ByteBuffer b) throws java.io.IOException { return DECODER.decode(b); } @Deprecated public java.lang.String name; /** * Default constructor. Note that this does not initialize fields * to their default values from the schema. If that is desired then * one should use <code>newBuilder()</code>. */ public Patient() {} /** * All-args constructor. * @param name The new value for name */ public Patient(java.lang.String name) { this.name = name; } public org.apache.avro.Schema getSchema() { return SCHEMA$; } // Used by DatumWriter. Applications should not call. public java.lang.Object get(int field$) { switch (field$) { case 0: return name; default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } // Used by DatumReader. Applications should not call. @SuppressWarnings(value="unchecked") public void put(int field$, java.lang.Object value$) { switch (field$) { case 0: name = (java.lang.String)value$; break; default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } /** * Gets the value of the 'name' field. * @return The value of the 'name' field. */ public java.lang.String getName() { return name; } /** * Sets the value of the 'name' field. * @param value the value to set. */ public void setName(java.lang.String value) { this.name = value; } /** * Creates a new Patient RecordBuilder. * @return A new Patient RecordBuilder */ public static com.bytatech.ayoos.patient.avro.Patient.Builder newBuilder() { return new com.bytatech.ayoos.patient.avro.Patient.Builder(); } /** * Creates a new Patient RecordBuilder by copying an existing Builder. * @param other The existing builder to copy. * @return A new Patient RecordBuilder */ public static com.bytatech.ayoos.patient.avro.Patient.Builder newBuilder(com.bytatech.ayoos.patient.avro.Patient.Builder other) { return new com.bytatech.ayoos.patient.avro.Patient.Builder(other); } /** * Creates a new Patient RecordBuilder by copying an existing Patient instance. * @param other The existing instance to copy. * @return A new Patient RecordBuilder */ public static com.bytatech.ayoos.patient.avro.Patient.Builder newBuilder(com.bytatech.ayoos.patient.avro.Patient other) { return new com.bytatech.ayoos.patient.avro.Patient.Builder(other); } /** * RecordBuilder for Patient instances. */ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<Patient> implements org.apache.avro.data.RecordBuilder<Patient> { private java.lang.String name; /** Creates a new Builder */ private Builder() { super(SCHEMA$); } /** * Creates a Builder by copying an existing Builder. * @param other The existing Builder to copy. */ private Builder(com.bytatech.ayoos.patient.avro.Patient.Builder other) { super(other); if (isValidValue(fields()[0], other.name)) { this.name = data().deepCopy(fields()[0].schema(), other.name); fieldSetFlags()[0] = true; } } /** * Creates a Builder by copying an existing Patient instance * @param other The existing instance to copy. */ private Builder(com.bytatech.ayoos.patient.avro.Patient other) { super(SCHEMA$); if (isValidValue(fields()[0], other.name)) { this.name = data().deepCopy(fields()[0].schema(), other.name); fieldSetFlags()[0] = true; } } /** * Gets the value of the 'name' field. * @return The value. */ public java.lang.String getName() { return name; } /** * Sets the value of the 'name' field. * @param value The value of 'name'. * @return This builder. */ public com.bytatech.ayoos.patient.avro.Patient.Builder setName(java.lang.String value) { validate(fields()[0], value); this.name = value; fieldSetFlags()[0] = true; return this; } /** * Checks whether the 'name' field has been set. * @return True if the 'name' field has been set, false otherwise. */ public boolean hasName() { return fieldSetFlags()[0]; } /** * Clears the value of the 'name' field. * @return This builder. */ public com.bytatech.ayoos.patient.avro.Patient.Builder clearName() { name = null; fieldSetFlags()[0] = false; return this; } @Override @SuppressWarnings("unchecked") public Patient build() { try { Patient record = new Patient(); record.name = fieldSetFlags()[0] ? this.name : (java.lang.String) defaultValue(fields()[0]); return record; } catch (java.lang.Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } } @SuppressWarnings("unchecked") private static final org.apache.avro.io.DatumWriter<Patient> WRITER$ = (org.apache.avro.io.DatumWriter<Patient>)MODEL$.createDatumWriter(SCHEMA$); @Override public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException { WRITER$.write(this, SpecificData.getEncoder(out)); } @SuppressWarnings("unchecked") private static final org.apache.avro.io.DatumReader<Patient> READER$ = (org.apache.avro.io.DatumReader<Patient>)MODEL$.createDatumReader(SCHEMA$); @Override public void readExternal(java.io.ObjectInput in) throws java.io.IOException { READER$.read(this, SpecificData.getDecoder(in)); } }
[ "abdul.rafeek@lxisoft.com" ]
abdul.rafeek@lxisoft.com
08cc86871e2101f67fef46f7b24100fcca36e97a
306d6a7aa91f3f93465f5466a7843c2171a0bbfa
/notification-service/src/main/java/cm/g2s/notification/service/broker/service/consumer/NotificationEventConsumerService.java
f4a2982eb583f84cfb6d840fa82378985da6453b
[]
no_license
briceamk/gmoney-ms
9ce45f86261f9c725b5ce7d741f2155607801f8e
bae4ee696317792ad28614380843b4ca29fca2d8
refs/heads/master
2023-01-14T18:49:24.087676
2020-11-19T16:54:03
2020-11-19T16:54:03
262,711,838
0
0
null
null
null
null
UTF-8
Java
false
false
431
java
package cm.g2s.notification.service.broker.service.consumer; import cm.g2s.notification.service.broker.payload.CreateSendMoneySuccessEmailRequest; import cm.g2s.notification.service.broker.payload.JobRequest; public interface NotificationEventConsumerService { void observeCreateEmailRequest(CreateSendMoneySuccessEmailRequest createSendMoneySuccessEmailRequest); void observeSendEmailRequest(JobRequest jobRequest); }
[ "ambiandji@gmail.com" ]
ambiandji@gmail.com
c43669517be674974eeafbf4518c93cbba0f3d3f
b7b7c90c9f1baf3eff992b1e9d228cc4299d67c6
/src/main/java/io/github/app/application/config/DateTimeFormatConfiguration.java
de334fe22f6c00475e8a35bb12187f8ef5e7d49f
[]
no_license
JackDrinnan/app
df219a602a7684a302fd1577f727ede59fe77d0b
d8a547e2597eb8f4a6281c471274de8ca7a84f94
refs/heads/master
2020-03-26T18:44:59.988389
2018-08-18T14:52:46
2018-08-18T14:52:46
145,228,528
0
0
null
null
null
null
UTF-8
Java
false
false
652
java
package io.github.app.application.config; import org.springframework.context.annotation.Configuration; import org.springframework.format.FormatterRegistry; import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @Configuration public class DateTimeFormatConfiguration implements WebMvcConfigurer { @Override public void addFormatters(FormatterRegistry registry) { DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar(); registrar.setUseIsoFormat(true); registrar.registerFormatters(registry); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
a9bdbe84821e8c64a8c43dfed6d1d9c10811e66d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/8/8_2011dbf2a41205e11df8d487ca14b5eecc1dff04/MyGdxGameController/8_2011dbf2a41205e11df8d487ca14b5eecc1dff04_MyGdxGameController_t.java
db08f6ad474e93d13a2fd9b9b40e9d6df672c48c
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,713
java
package com.dat255_group3.controller; import com.badlogic.gdx.Game; import com.badlogic.gdx.Gdx; import com.dat255_group3.model.MyGdxGame; import com.dat255_group3.screen.GameOverScreen; import com.dat255_group3.screen.LevelScreen; import com.dat255_group3.screen.PauseScreen; import com.dat255_group3.screen.StartScreen; import com.dat255_group3.screen.UnlockedScreen; import com.dat255_group3.utils.CoordinateConverter; public class MyGdxGameController extends Game { private MyGdxGame myGdxGame; private InGameController inGameController; private PlayerController playerController; private StartScreen startScreen; private LevelScreen levelScreen; private GameOverScreen gameOverScreen; private PauseScreen pauseScreen; private UnlockedScreen unlockedScreen; private SoundController soundController; private static boolean soundEffectsOn = true; @Override public void create() { // create other the scenes and the player and the gameModel this.myGdxGame = new MyGdxGame(); this.playerController = new PlayerController(); this.inGameController = new InGameController(this); this.startScreen = new StartScreen(this); this.levelScreen = new LevelScreen(this); this.gameOverScreen = new GameOverScreen(this); this.pauseScreen = new PauseScreen(this); this.unlockedScreen = new UnlockedScreen(this); this.soundController = new SoundController(); soundController.playBackgroundMusic(); // go to the first screen setScreen(startScreen); } @Override public void dispose() { super.dispose(); inGameController.dispose(); } @Override public void resize(int width, int height) { } @Override public void pause() { } @Override public void resume() { } public MyGdxGame getMyGdxGame() { return myGdxGame; } public InGameController getInGameController() { return inGameController; } public PlayerController getPlayerController() { return this.playerController; } public StartScreen getStartScreen() { return startScreen; } public LevelScreen getLevelScreen() { return this.levelScreen; } public PauseScreen getPauseScreen() { return this.pauseScreen; } public GameOverScreen getGameOverScreen() { return this.gameOverScreen; } public UnlockedScreen getUnlockedScreen() { return unlockedScreen; } public void soundEffectsOn(boolean soundOn) { soundEffectsOn = soundOn; } public static boolean soundEffectsOn() { return soundEffectsOn; } public void save() { inGameController.save(); Gdx.app.log("MyGdx", "Save"); } public SoundController getSoundController() { return soundController; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
ba1e3bd3631fb61732befad2eee046f7dabfcd4a
d6b6abe73a0c82656b04875135b4888c644d2557
/sources/com/google/android/gms/common/internal/ValidateAccountRequest.java
74b9808318942469d54f66b584407249a57790d2
[]
no_license
chanyaz/and_unimed
4344d1a8ce8cb13b6880ca86199de674d770304b
fb74c460f8c536c16cca4900da561c78c7035972
refs/heads/master
2020-03-29T09:07:09.224595
2018-08-30T06:29:32
2018-08-30T06:29:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,085
java
package com.google.android.gms.common.internal; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; import com.google.android.gms.common.internal.safeparcel.SafeParcelable.Class; import com.google.android.gms.common.internal.safeparcel.SafeParcelable.Constructor; import com.google.android.gms.common.internal.safeparcel.SafeParcelable.Param; import com.google.android.gms.common.internal.safeparcel.SafeParcelable.VersionField; import com.google.android.gms.common.internal.safeparcel.a; @Class(creator = "ValidateAccountRequestCreator") @Deprecated public class ValidateAccountRequest extends AbstractSafeParcelable { public static final Creator<ValidateAccountRequest> CREATOR = new ay(); @VersionField(id = 1) private final int a; @Constructor ValidateAccountRequest(@Param(id = 1) int i) { this.a = i; } public void writeToParcel(Parcel parcel, int i) { int a = a.a(parcel); a.a(parcel, 1, this.a); a.a(parcel, a); } }
[ "khairilirfanlbs@gmail.com" ]
khairilirfanlbs@gmail.com
1156f06c2507e04f3341f0c84fdda0f55d224b8e
78a1d9bde2883bda74e4e6886cceb3af63e00e28
/DLEBUY/DLEBUY/src/com/yang/admin/adminServlet/AdminCategoryServlet.java
6c754c41ca5ebbe1f5b2688b5df7f4b5e6aa6d7d
[]
no_license
yangge7777/GitAAAA
d57d07f8d25c965322eed9b9803c5212c9384c6b
4243c341e5c20ee022e6df01baff3f66ef645682
refs/heads/master
2020-03-22T23:10:52.093245
2018-09-02T10:38:30
2018-09-02T10:38:30
140,793,735
0
0
null
null
null
null
UTF-8
Java
false
false
5,425
java
package com.yang.admin.adminServlet; import com.lanou.commons.CommonUtils; import com.yang.book.bean.BookBean; import com.yang.book.service.BookServiceImpl; import com.yang.category.bean.CategoryBean; import com.yang.category.service.CategoryServiceImpl; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.List; /** * Created by dllo on 18/6/25. * ░░░░░░░░░░░░░░░░░░░░░░░░▄░░ * ░░░░░░░░░▐█░░░░░░░░░░░▄▀▒▌░ * ░░░░░░░░▐▀▒█░░░░░░░░▄▀▒▒▒▐ * ░░░░░░░▐▄▀▒▒▀▀▀▀▄▄▄▀▒▒▒▒▒▐ * ░░░░░▄▄▀▒░▒▒▒▒▒▒▒▒▒█▒▒▄█▒▐ * ░░░▄▀▒▒▒░░░▒▒▒░░░▒▒▒▀██▀▒▌ * ░░▐▒▒▒▄▄▒▒▒▒░░░▒▒▒▒▒▒▒▀▄▒▒ * ░░▌░░▌█▀▒▒▒▒▒▄▀█▄▒▒▒▒▒▒▒█▒▐ * ░▐░░░▒▒▒▒▒▒▒▒▌██▀▒▒░░░▒▒▒▀▄ * ░▌░▒▄██▄▒▒▒▒▒▒▒▒▒░░░░░░▒▒▒▒ * ▀▒▀▐▄█▄█▌▄░▀▒▒░░░░░░░░░░▒▒▒ * My Dear Taoism's Friend .Please SitDown. */ @WebServlet(name = "AdminCategoryServlet",urlPatterns = "/adminCategoryServlet") public class AdminCategoryServlet extends HttpServlet { CategoryServiceImpl categroyservice =new CategoryServiceImpl(); BookServiceImpl bookService =new BookServiceImpl(); protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { this.doGet(request,response); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String method = request.getParameter("method"); switch (method){ case "queryAll": queryAllCategory(request, response); break; case "mod" : modCategory(request, response); break; case "del": delCategory(request, response); break; case "add": addCategory(request, response); } } private void queryAllCategory(HttpServletRequest request, HttpServletResponse response) { List<CategoryBean> categoryBeanList= categroyservice.queryCategory(); request.getSession().setAttribute("CategoryBeanList",categoryBeanList); try { request.getRequestDispatcher("/adminjsps/admin/category/list.jsp").forward(request,response); } catch (ServletException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } private void modCategory(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String cid = request.getParameter("cid"); String cname = request.getParameter("cname"); //test! System.out.println(cname); //flag true 成功 boolean flag = categroyservice.updatecategorycnameBycid(cid,cname); if (flag){ request.setAttribute("msg","修改成功") ; request.getRequestDispatcher("/adminjsps/msg.jsp").forward(request, response); }else { request.setAttribute("msg","修改失败") ; request.getRequestDispatcher("/adminjsps/msg.jsp").forward(request, response); } } private void delCategory(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String cid = request.getParameter("cid"); String cname = request.getParameter("cname"); List<BookBean> bookBeanList = bookService.cidBook(cid); if (bookBeanList==null||bookBeanList.isEmpty()){ boolean flag = categroyservice.delcategoryBycid(cid); if (flag){ request.setAttribute("msg","修改成功") ; request.getRequestDispatcher("/adminjsps/msg.jsp").forward(request, response); }else { request.setAttribute("msg","修改失败") ; request.getRequestDispatcher("/adminjsps/msg.jsp").forward(request, response); } }else { request.setAttribute("msg","需先清空分类中的图书"); request.getRequestDispatcher("/adminjsps/admin/category/del.jsp").forward(request,response); } } private void addCategory(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String cname = request.getParameter("cname"); String uid = CommonUtils.uuid(); boolean flag = categroyservice.addcategory(uid,cname); if (flag){ request.setAttribute("msg","添加成功") ; request.getRequestDispatcher("/adminjsps/msg.jsp").forward(request, response); }else { request.setAttribute("msg","添加失败") ; request.getRequestDispatcher("/adminjsps/msg.jsp").forward(request, response); } } }
[ "111111" ]
111111
9a6b02c22d58c7772252fa597c58f2500866e53b
dd3eec242deb434f76d26b4dc0e3c9509c951ce7
/2018-work/jiuy-biz/jiuy-biz-core/src/main/java/com/admin/common/constant/dictmap/base/AbstractDictMap.java
e840fd4e4b55fcabd83f3ee143c09244f8a55583
[]
no_license
github4n/other_workplace
1091e6368abc51153b4c7ebbb3742c35fb6a0f4a
7c07e0d078518bb70399e50b35e9f9ca859ba2df
refs/heads/master
2020-05-31T10:12:37.160922
2019-05-25T15:48:54
2019-05-25T15:48:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,264
java
package com.admin.common.constant.dictmap.base; import java.util.HashMap; /** * 字典映射抽象类 * * @author fengshuonan * @date 2017-05-06 14:58 */ public abstract class AbstractDictMap { protected HashMap<String, String> dictory = new HashMap<>(); protected HashMap<String, String> fieldWarpperDictory = new HashMap<>(); public AbstractDictMap(){ put("id","主键id"); init(); initBeWrapped(); } /** * 初始化字段英文名称和中文名称对应的字典 * * @author jiuyuan * @Date 2017/5/9 19:39 */ public abstract void init(); /** * 初始化需要被包装的字段(例如:性别为1:男,2:女,需要被包装为汉字) * * @author jiuyuan * @Date 2017/5/9 19:35 */ protected abstract void initBeWrapped(); public String get(String key) { return this.dictory.get(key); } public void put(String key, String value) { this.dictory.put(key, value); } public String getFieldWarpperMethodName(String key){ return this.fieldWarpperDictory.get(key); } public void putFieldWrapperMethodName(String key,String methodName){ this.fieldWarpperDictory.put(key,methodName); } }
[ "nessary@foxmail.com" ]
nessary@foxmail.com
4413ac6c161a5227b86e27e27271559ee8908a9a
9bac6b22d956192ba16d154fca68308c75052cbb
/icmsint-ejb/src/main/java/hk/judiciary/icmsint/model/sysinf/inf/gfpij2d/DefendantHearingV10CT.java
0ecbf9256dac828c2647c4f1970bd53c5e11e277
[]
no_license
peterso05168/icmsint
9d4723781a6666cae8b72d42713467614699b66d
79461c4dc34c41b2533587ea3815d6275731a0a8
refs/heads/master
2020-06-25T07:32:54.932397
2017-07-13T10:54:56
2017-07-13T10:54:56
96,960,773
0
0
null
null
null
null
GB18030
Java
false
false
3,634
java
// // 此文件是由 JavaTM Architecture for XML Binding (JAXB) 引用实现 v2.2.8-b130911.1802 生成的 // 请访问 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // 在重新编译源模式时, 对此文件的所有修改都将丢失。 // 生成时间: 2017.07.11 时间 05:59:54 PM CST // package hk.judiciary.icmsint.model.sysinf.inf.gfpij2d; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * defendant hearing details consists of * a) CaseNo Object * b) Hearing Internal Number * c) Hearing Result * * * <p>DefendantHearing.V1.0.CT complex type的 Java 类。 * * <p>以下模式片段指定包含在此类中的预期内容。 * * <pre> * &lt;complexType name="DefendantHearing.V1.0.CT"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="CaseNumber" type="{}CaseNumber.V1.0.CT"/> * &lt;element name="HearingInternalNumber" type="{}HearingInternalNumber.V1.0.CT"/> * &lt;element name="HearingOutcome" type="{}HearingOutcome.V1.0.CT" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "DefendantHearing.V1.0.CT", propOrder = { "caseNumber", "hearingInternalNumber", "hearingOutcome" }) public class DefendantHearingV10CT { @XmlElement(name = "CaseNumber", required = true) protected CaseNumberV10CT caseNumber; @XmlElement(name = "HearingInternalNumber", required = true) protected HearingInternalNumberV10CT hearingInternalNumber; @XmlElement(name = "HearingOutcome") protected HearingOutcomeV10CT hearingOutcome; /** * 获取caseNumber属性的值。 * * @return * possible object is * {@link CaseNumberV10CT } * */ public CaseNumberV10CT getCaseNumber() { return caseNumber; } /** * 设置caseNumber属性的值。 * * @param value * allowed object is * {@link CaseNumberV10CT } * */ public void setCaseNumber(CaseNumberV10CT value) { this.caseNumber = value; } /** * 获取hearingInternalNumber属性的值。 * * @return * possible object is * {@link HearingInternalNumberV10CT } * */ public HearingInternalNumberV10CT getHearingInternalNumber() { return hearingInternalNumber; } /** * 设置hearingInternalNumber属性的值。 * * @param value * allowed object is * {@link HearingInternalNumberV10CT } * */ public void setHearingInternalNumber(HearingInternalNumberV10CT value) { this.hearingInternalNumber = value; } /** * 获取hearingOutcome属性的值。 * * @return * possible object is * {@link HearingOutcomeV10CT } * */ public HearingOutcomeV10CT getHearingOutcome() { return hearingOutcome; } /** * 设置hearingOutcome属性的值。 * * @param value * allowed object is * {@link HearingOutcomeV10CT } * */ public void setHearingOutcome(HearingOutcomeV10CT value) { this.hearingOutcome = value; } }
[ "chiu.cheukman@gmail.com" ]
chiu.cheukman@gmail.com
f1c0dfb078e693d46dff874f3e127c6bd2e1b8ae
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/2/org/jfree/chart/StandardChartTheme_equals_1692.java
0c9f2a2d5e877228b0b4d9f57c53908c1e629b31
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
4,748
java
org jfree chart implement link chart theme chartthem implement collect bunch chart attribut mimic manual process appli attribut object free chart jfreechart instanc eleg code work standard chart theme standardchartthem chart theme chartthem cloneabl test theme equal arbitrari object param obj object code code permit equal object obj obj obj standard chart theme standardchartthem standard chart theme standardchartthem standard chart theme standardchartthem obj equal extra larg font extralargefont equal extra larg font extralargefont larg font largefont equal larg font largefont regular font regularfont equal regular font regularfont small font smallfont equal small font smallfont paint util paintutil equal titl paint titlepaint titl paint titlepaint paint util paintutil equal subtitl paint subtitlepaint subtitl paint subtitlepaint paint util paintutil equal chart background paint chartbackgroundpaint chart background paint chartbackgroundpaint paint util paintutil equal legend background paint legendbackgroundpaint legend background paint legendbackgroundpaint paint util paintutil equal legend item paint legenditempaint legend item paint legenditempaint draw supplier drawingsuppli equal draw supplier drawingsuppli paint util paintutil equal plot background paint plotbackgroundpaint plot background paint plotbackgroundpaint paint util paintutil equal plot outlin paint plotoutlinepaint plot outlin paint plotoutlinepaint label link style labellinkstyl equal label link style labellinkstyl paint util paintutil equal label link paint labellinkpaint label link paint labellinkpaint paint util paintutil equal domain gridlin paint domaingridlinepaint domain gridlin paint domaingridlinepaint paint util paintutil equal rang gridlin paint rangegridlinepaint rang gridlin paint rangegridlinepaint paint util paintutil equal crosshair paint crosshairpaint crosshair paint crosshairpaint axi offset axisoffset equal axi offset axisoffset paint util paintutil equal axi label paint axislabelpaint axi label paint axislabelpaint paint util paintutil equal tick label paint ticklabelpaint tick label paint ticklabelpaint paint util paintutil equal item label paint itemlabelpaint item label paint itemlabelpaint shadow visibl shadowvis shadow visibl shadowvis paint util paintutil equal shadow paint shadowpaint shadow paint shadowpaint bar painter barpaint equal bar painter barpaint bar painter xybarpaint equal bar painter xybarpaint paint util paintutil equal thermomet paint thermometerpaint thermomet paint thermometerpaint paint util paintutil equal wall paint wallpaint wall paint wallpaint paint util paintutil equal error indic paint errorindicatorpaint error indic paint errorindicatorpaint paint util paintutil equal grid band paint gridbandpaint grid band paint gridbandpaint paint util paintutil equal grid band altern paint gridbandalternatepaint grid band altern paint gridbandalternatepaint
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
34f30855942301e26a13beba4b3201c8df083df7
81eaf21c6aada1f1bce244bcf7f42ca57efbc072
/src/java/com/camick/TextPrompt.java
7461ea9f77b3caed74759d543ed8fcf174fba2a6
[ "Unlicense", "LicenseRef-scancode-public-domain" ]
permissive
Immortalin/Nightcode
384c70ab245c106a67a2dddb91286e5144b0887c
d77ab19a3973d55e7b8e1ceab7d763b2e3fc897f
refs/heads/master
2020-05-29T12:36:24.404408
2015-07-29T08:11:27
2015-07-29T08:11:27
34,264,140
1
0
null
2015-07-29T08:11:27
2015-04-20T14:08:22
Clojure
UTF-8
Java
false
false
5,315
java
package com.camick; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.border.*; import javax.swing.event.*; import javax.swing.text.*; /** * The TextPrompt class will display a prompt over top of a text component when * the Document of the text field is empty. The Show property is used to * determine the visibility of the prompt. * * The Font and foreground Color of the prompt will default to those properties * of the parent text component. You are free to change the properties after * class construction. */ public class TextPrompt extends JLabel implements FocusListener, DocumentListener { public enum Show { ALWAYS, FOCUS_GAINED, FOCUS_LOST; } private JTextComponent component; private Document document; private Show show; private boolean showPromptOnce; private int focusLost; public TextPrompt(String text, JTextComponent component) { this(text, component, Show.ALWAYS); } public TextPrompt(String text, JTextComponent component, Show show) { this.component = component; setShow( show ); document = component.getDocument(); setText( text ); setFont( component.getFont() ); setForeground( component.getForeground() ); setBorder( new EmptyBorder(component.getInsets()) ); setHorizontalAlignment(JLabel.LEADING); component.addFocusListener( this ); document.addDocumentListener( this ); component.setLayout( new BorderLayout() ); component.add( this ); checkForPrompt(); } /** * Convenience method to change the alpha value of the current foreground * Color to the specifice value. * * @param alpha value in the range of 0 - 1.0. */ public void changeAlpha(float alpha) { changeAlpha( (int)(alpha * 255) ); } /** * Convenience method to change the alpha value of the current foreground * Color to the specifice value. * * @param alpha value in the range of 0 - 255. */ public void changeAlpha(int alpha) { alpha = alpha > 255 ? 255 : alpha < 0 ? 0 : alpha; Color foreground = getForeground(); int red = foreground.getRed(); int green = foreground.getGreen(); int blue = foreground.getBlue(); Color withAlpha = new Color(red, green, blue, alpha); super.setForeground( withAlpha ); } /** * Convenience method to change the style of the current Font. The style * values are found in the Font class. Common values might be: * Font.BOLD, Font.ITALIC and Font.BOLD + Font.ITALIC. * * @param style value representing the the new style of the Font. */ public void changeStyle(int style) { setFont( getFont().deriveFont( style ) ); } /** * Get the Show property * * @return the Show property. */ public Show getShow() { return show; } /** * Set the prompt Show property to control when the promt is shown. * Valid values are: * * Show.AWLAYS (default) - always show the prompt * Show.Focus_GAINED - show the prompt when the component gains focus * (and hide the prompt when focus is lost) * Show.Focus_LOST - show the prompt when the component loses focus * (and hide the prompt when focus is gained) * * @param show a valid Show enum */ public void setShow(Show show) { this.show = show; } /** * Get the showPromptOnce property * * @return the showPromptOnce property. */ public boolean getShowPromptOnce() { return showPromptOnce; } /** * Show the prompt once. Once the component has gained/lost focus * once, the prompt will not be shown again. * * @param showPromptOnce when true the prompt will only be shown once, * otherwise it will be shown repeatedly. */ public void setShowPromptOnce(boolean showPromptOnce) { this.showPromptOnce = showPromptOnce; } /** * Check whether the prompt should be visible or not. The visibility * will change on updates to the Document and on focus changes. */ private void checkForPrompt() { // Text has been entered, remove the prompt if (document.getLength() > 0) { setVisible( false ); return; } // Prompt has already been shown once, remove it if (showPromptOnce && focusLost > 0) { setVisible(false); return; } // Check the Show property and component focus to determine if the // prompt should be displayed. if (component.hasFocus()) { if (show == Show.ALWAYS || show == Show.FOCUS_GAINED) setVisible( true ); else setVisible( false ); } else { if (show == Show.ALWAYS || show == Show.FOCUS_LOST) setVisible( true ); else setVisible( false ); } } // Implement FocusListener public void focusGained(FocusEvent e) { checkForPrompt(); } public void focusLost(FocusEvent e) { focusLost++; checkForPrompt(); } // Implement DocumentListener public void insertUpdate(DocumentEvent e) { checkForPrompt(); } public void removeUpdate(DocumentEvent e) { checkForPrompt(); } public void changedUpdate(DocumentEvent e) {} }
[ "zsoakes@gmail.com" ]
zsoakes@gmail.com
e70f4490a1d98b0543efe27a989b4409911fe8ea
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/ui/AbstractTabChildPreference.java
31129c1c5823c676817019a238d12a35239ca181
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
3,390
java
package com.tencent.mm.ui; import android.os.Bundle; import android.view.KeyEvent; import com.tencent.mm.sdk.platformtools.ab; import com.tencent.mm.ui.base.preference.MMPreferenceFragment; public abstract class AbstractTabChildPreference extends MMPreferenceFragment implements m { private Bundle rnR; private boolean ydY; private boolean ydZ; private boolean yea; private boolean yeb; protected boolean yec = false; protected boolean yed = false; protected boolean yee; private void dwk() { if (this.ydZ) { dvY(); this.ydZ = false; } while (true) { return; if (this.ydY) { dwd(); dvY(); ab.v("MicroMsg.INIT", "KEVIN tab onRecreate "); this.ydY = false; } } } protected abstract void dvY(); protected abstract void dvZ(); protected abstract void dwa(); protected abstract void dwb(); protected abstract void dwc(); protected abstract void dwd(); public final void dwh() { dwf(); this.yea = true; } public final void dwj() { this.yed = true; } public final void dwl() { if (!this.yec); while (true) { return; dwk(); long l = System.currentTimeMillis(); if (this.yea) { dwg(); this.yea = false; } dAE(); dvZ(); ab.d("MicroMsg.INIT", "KEVIN " + toString() + " OnTabResume last : " + (System.currentTimeMillis() - l)); this.yeb = true; this.yec = false; } } public void onActivityCreated(Bundle paramBundle) { super.onActivityCreated(paramBundle); this.rnR = paramBundle; this.ydZ = true; } public void onDestroy() { dwd(); super.onDestroy(); } public boolean onKeyDown(int paramInt, KeyEvent paramKeyEvent) { if ((paramInt == 4) && (paramKeyEvent.getAction() == 0)); for (boolean bool = false; ; bool = super.onKeyDown(paramInt, paramKeyEvent)) return bool; } public void onPause() { super.onPause(); this.yee = true; if (this.yee) if (this.yeb) break label29; for (this.yee = false; ; this.yee = false) { return; label29: long l = System.currentTimeMillis(); dwb(); ab.d("MicroMsg.INIT", "KEVIN " + toString() + " onTabPause last : " + (System.currentTimeMillis() - l)); this.yeb = false; } } public void onResume() { super.onResume(); dwi(); LauncherUI localLauncherUI = LauncherUI.getInstance(); if ((localLauncherUI == null) || (!localLauncherUI.yjM)); while (true) { return; this.yec = true; if (this.yed) { dwl(); this.yed = false; } } } public void onStart() { super.onStart(); LauncherUI localLauncherUI = LauncherUI.getInstance(); if ((localLauncherUI == null) || (!localLauncherUI.yjM)); while (true) { return; dwa(); } } public void onStop() { super.onStop(); dwc(); } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes-dex2jar.jar * Qualified Name: com.tencent.mm.ui.AbstractTabChildPreference * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
b215693435481b73223a1d1e35e62ba076d116f7
d7c5121237c705b5847e374974b39f47fae13e10
/airspan.netspan/src/main/java/Netspan/NBI_16_5/FaultManagement/AlarmRelease.java
c929b8fa4c77f74f9471e2305c75792f6fdd31ad
[]
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
2,137
java
package Netspan.NBI_16_5.FaultManagement; import java.math.BigInteger; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlSchemaType; 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> * &lt;complexType&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element name="AlarmID" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" maxOccurs="unbounded" minOccurs="0"/&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "alarmID" }) @XmlRootElement(name = "AlarmRelease") public class AlarmRelease { @XmlElement(name = "AlarmID") @XmlSchemaType(name = "unsignedLong") protected List<BigInteger> alarmID; /** * Gets the value of the alarmID property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the alarmID property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAlarmID().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link BigInteger } * * */ public List<BigInteger> getAlarmID() { if (alarmID == null) { alarmID = new ArrayList<BigInteger>(); } return this.alarmID; } }
[ "ggrunwald@ASIL-GGRUNWALD.airspan.com" ]
ggrunwald@ASIL-GGRUNWALD.airspan.com
464e04e16dabca4bf909e67281ac13463459b18a
5ad061d507683448b78215dbf7df0b509078f74f
/7sy/后端/src/main/java/com/hirain/qsy/shaft/service/impl/RoleMenuServiceImpl.java
ea75694d786320aa531214df19588202e7369887
[]
no_license
zheng-chang-wei/myproject
221bf2b3b646435b962d4d921fa20867c1cac2f3
49be8c6e6048c299ed844eb99ea112166a4b4d2e
refs/heads/master
2022-12-13T19:15:39.464928
2020-07-20T11:28:16
2020-07-20T11:28:16
232,452,539
0
1
null
2022-12-06T00:34:29
2020-01-08T01:38:10
Java
UTF-8
Java
false
false
977
java
package com.hirain.qsy.shaft.service.impl; import java.util.Arrays; import java.util.List; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import com.hirain.qsy.shaft.model.RoleMenu; import com.hirain.qsy.shaft.service.RoleMenuServie; @Service("roleMenuService") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class RoleMenuServiceImpl extends BaseService<RoleMenu> implements RoleMenuServie { @Override @Transactional public void deleteRoleMenusByRoleId(String roleIds) { List<String> list = Arrays.asList(roleIds.split(",")); this.batchDelete(list, "roleId", RoleMenu.class); } @Override @Transactional public void deleteRoleMenusByMenuId(String menuIds) { List<String> list = Arrays.asList(menuIds.split(",")); this.batchDelete(list, "menuId", RoleMenu.class); } }
[ "49865501+zheng-chang-wei@users.noreply.github.com" ]
49865501+zheng-chang-wei@users.noreply.github.com
d08ae22528a29e123bdf4b0a7a671b0d84c54f18
7948afb1af34de7a773f7f97357e1b1904263420
/notification-core/src/main/java/fr/sii/notification/core/builder/TemplateParserBuilder.java
48b3d3c88a12d667602ca3e6eea99c209baa163d
[]
no_license
wei20024/notification-module
4a229323b2ea971eafa8e538995940a12fa428f9
2399cfb5b148a3a16ff2ae9d94e23c49503adeaa
refs/heads/master
2021-01-18T16:11:51.594740
2015-05-28T17:03:27
2015-05-28T17:03:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,062
java
package fr.sii.notification.core.builder; import fr.sii.notification.core.template.parser.TemplateParser; import fr.sii.notification.core.template.resolver.TemplateResolver; /** * Define a builder for a template engine implementation. It provides general * methods for all template engines. It helps to construct the object using a * fluent interface. * * @author Aurélien Baudet * */ public interface TemplateParserBuilder extends Builder<TemplateParser> { /** * Set the prefix for template lookup. This prefix is used for all lookup * methods. The aim is to define only the name of the template (or a subset) * and the system will find it for you. It avoids to explicitly write the * whole path and let you change the lookup method easily. * * For example: * <ul> * <li>You you have one template located into * /notification/template/createAccount.html</li> * <li>You you have one template located into * /notification/template/resetPassword.html</li> * </ul> * * So you can set the prefix to * <pre>/notification/template/</pre> and then reference * the templates using the file name: * <ul> * <li>createAccount.html</li> * <li>resetPassword.html</li> * </ul> * * @param prefix * the prefix for template resolution * @return The current builder for fluent use */ public TemplateParserBuilder withPrefix(String prefix); /** * Set the suffix for template lookup. This suffix is used for all lookup * methods. The aim is to define only the name of the template (or a subset) * and the system will find it for you. It avoids to explicitly write the * whole path and let you change the lookup method easily. * * For example: * <ul> * <li>You you have one template located into * /notification/template/createAccount.html</li> * <li>You you have one template located into * /notification/template/resetPassword.html</li> * </ul> * * So you can set the prefix to * <pre>/notification/template/</pre>, the suffix to <pre>.html</pre> and then reference * the templates using the file name: * <ul> * <li>createAccount</li> * <li>resetPassword</li> * </ul> * * @param suffix * the suffix for template resolution * @return The current builder for fluent use */ public TemplateParserBuilder withSuffix(String suffix); /** * Register a lookup resolver. The lookup is like JNDI lookup. It indicates * using a simple string how to handle the provided path or URL. * * For example: * <ul> * <li><pre>"classpath:/notification"</pre> indicates that the provided * path represents a classpath entry.</li> * <li><pre>"file:/tmp"</pre> indicates that the provided path represents * a file located on the system.</li> * </ul> * * @param lookup * the lookup name (without the : character) * @param resolver * the resolver implementation * @return The current builder for fluent use */ public TemplateParserBuilder withLookupResolver(String lookup, TemplateResolver resolver); }
[ "abaudet@sii.fr" ]
abaudet@sii.fr
72b78b56858cd404947bb403430779905cddb397
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/java-design-patterns/learning/3360/QueryServiceImpl.java
714699bc0c6fbda9ac83b1e030de2dac8bfa14fb
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,102
java
/** * The MIT License * Copyright (c) 2014 Ilkka Seppälä * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.iluwatar.cqrs.queries; import java.math.BigInteger; import java.util.List; import org.hibernate.SQLQuery;import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.transform.Transformers; import com.iluwatar.cqrs.dto.Author; import com.iluwatar.cqrs.dto.Book; import com.iluwatar.cqrs.util.HibernateUtil; /** * This class is an implementation of {@link IQueryService}. It uses Hibernate native queries to return DTOs from the * database. * */ public class QueryServiceImpl implements IQueryService { private SessionFactory sessionFactory = HibernateUtil.getSessionFactory(); @Override public Author getAuthorByUsername(String username) { Author authorDTo = null; try (Session session = sessionFactory.openSession()) { SQLQuery sqlQuery = session .createSQLQuery("SELECT a.username as \"username\", a.name as \"name\", a.email as \"email\"" + "FROM Author a where a.username=:username"); sqlQuery.setParameter("username", username); authorDTo = (Author) sqlQuery.setResultTransformer(Transformers.aliasToBean(Author.class)).uniqueResult(); } return authorDTo; } @Override public Book getBook(String title) { Book bookDTo = null; try (Session session = sessionFactory.openSession()) { SQLQuery sqlQuery = session .createSQLQuery("SELECT b.title as \"title\", b.price as \"price\"" + " FROM Book b where b.title=:title"); sqlQuery.setParameter("title", title); bookDTo = (Book) sqlQuery.setResultTransformer(Transformers.aliasToBean(Book.class)).uniqueResult(); } return bookDTo; } @Override public List<Book> getAuthorBooks(String username) { List<Book> bookDTos = null; try (Session session = sessionFactory.openSession()) { SQLQuery sqlQuery = session.createSQLQuery("SELECT b.title as \"title\", b.price as \"price\"" + " FROM Author a , Book b where b.author_id = a.id and a.username=:username"); sqlQuery.setParameter("username", username); bookDTos = sqlQuery.setResultTransformer(Transformers.aliasToBean(Book.class)).list(); } return bookDTos; } @Override public BigInteger getAuthorBooksCount(String username) { BigInteger bookcount = null; try (Session session = sessionFactory.openSession()) { SQLQuery sqlQuery = session.createSQLQuery( "SELECT count(b.title)" + " FROM Book b, Author a where b.author_id = a.id and a.username=:username"); sqlQuery.setParameter("username", username); bookcount = (BigInteger) sqlQuery.uniqueResult(); } return bookcount; } @Override public BigInteger getAuthorsCount() { BigInteger authorcount = null; try (Session session = sessionFactory.openSession()) { SQLQuery sqlQuery = session.createSQLQuery("SELECT count(id) from Author"); authorcount = (BigInteger) sqlQuery.uniqueResult(); } return authorcount; } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
003d12d887998d41fcae0d8659cded1bdb617556
ab0e13ca5c940cfb459324d8cc3751af9270d93c
/src/test/java/ua/tifoha/maven/MergerMojoTest.java
3a82198985f223ec33ebaf4465384fd43baa9077
[]
no_license
tifoha/property-merger-maven-plugin
d5046b1885e9c0ee83670d93ed37dd387c0298b7
544da015cf4b9c022a230ed0c28f7998959af244
refs/heads/master
2021-01-12T06:18:13.909221
2017-02-10T11:11:49
2017-02-10T11:11:49
77,338,138
0
0
null
null
null
null
UTF-8
Java
false
false
252
java
package ua.tifoha.maven; //import org.apache.maven.it.Verifier; import org.junit.Test; /** * Created by Vitaliy Sereda on 25.12.16. */ public class MergerMojoTest { // @Test // public void shouldFillUpParams() throws Exception { // Veri // // } }
[ "tifoha@gmail.com" ]
tifoha@gmail.com
93d361517ed5008fb7899ce6e2389439d9cfd15f
99b2878b8215bbbe1aad542334c1628f0fb3c57f
/gmall-ums/src/main/java/com/atguigu/gmall/ums/entity/MemberLevelEntity.java
bc4af98f59f6b327f8a57f8c75d2a18b2b65a964
[ "Apache-2.0" ]
permissive
ShangBaiShuYao/gmall
a78060764ec45408905ef9dd74ac0e14e22c4b0c
16876593176851856bc4ba4eb8777393cc35805e
refs/heads/master
2022-12-22T21:58:33.626881
2021-03-19T17:57:32
2021-03-19T17:57:32
218,497,070
3
0
Apache-2.0
2022-12-16T14:50:45
2019-10-30T10:04:21
JavaScript
UTF-8
Java
false
false
2,010
java
package com.atguigu.gmall.ums.entity; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.io.Serializable; import java.util.Date; import lombok.Data; /** * 会员等级 * * @author lixianfeng * @email lxf@atguigu.com * @date 2019-10-30 18:42:38 */ @ApiModel @Data @TableName("ums_member_level") public class MemberLevelEntity implements Serializable { private static final long serialVersionUID = 1L; /** * id */ @TableId @ApiModelProperty(name = "id",value = "id") private Long id; /** * 等级名称 */ @ApiModelProperty(name = "name",value = "等级名称") private String name; /** * 等级需要的成长值 */ @ApiModelProperty(name = "growthPoint",value = "等级需要的成长值") private Integer growthPoint; /** * 是否为默认等级[0->不是;1->是] */ @ApiModelProperty(name = "defaultStatus",value = "是否为默认等级[0->不是;1->是]") private Integer defaultStatus; /** * 免运费标准 */ @ApiModelProperty(name = "freeFreightPoint",value = "免运费标准") private BigDecimal freeFreightPoint; /** * 每次评价获取的成长值 */ @ApiModelProperty(name = "commentGrowthPoint",value = "每次评价获取的成长值") private Integer commentGrowthPoint; /** * 是否有免邮特权 */ @ApiModelProperty(name = "priviledgeFreeFreight",value = "是否有免邮特权") private Integer priviledgeFreeFreight; /** * 是否有会员价格特权 */ @ApiModelProperty(name = "priviledgeMemberPrice",value = "是否有会员价格特权") private Integer priviledgeMemberPrice; /** * 是否有生日特权 */ @ApiModelProperty(name = "priviledgeBirthday",value = "是否有生日特权") private Integer priviledgeBirthday; /** * 备注 */ @ApiModelProperty(name = "note",value = "备注") private String note; }
[ "shangbaishuyao@163.com" ]
shangbaishuyao@163.com
c67884557c2901862a7742418ccb650a1c1e382d
25794ddb68c322d6e7210f03b070b5fd12521598
/01_java-basic/src/day17/Exam01.java
27901e436f44dae1dc95eda32367de08274e67a9
[]
no_license
hojohe/bit-java
0b0251071df6f76c0fd9802144151d64ea0b14ee
6050d544c046f5b37f1271d380efef69b56a6d71
refs/heads/master
2021-01-11T17:40:46.463857
2018-01-18T02:42:08
2018-01-18T02:42:08
79,817,516
0
0
null
null
null
null
UTF-8
Java
false
false
2,066
java
package day17; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.FileInputStream; import java.io.FileOutputStream; import javax.swing.plaf.synth.SynthSplitPaneUI; public class Exam01 { public static void dataCheck(String file1, String file2) throws Exception { // 구현하세요~ --------------------------------------------------- // 비교 대상 파일인 file1 과 file2 에는 문자열 데이터의 라인수가 같다고 가정합니다~!! // -------------------------------------------------------------- try (FileInputStream fis = new FileInputStream(file1); FileOutputStream fos = new FileOutputStream(file2); ) { int ch = 0; String low = ""; while ((ch = fis.read()) != -1) { Character c = (char) ch; if (Character.isAlphabetic(c)) { low += c.toString(); } else { if ('\n' == (char) ch) low += ":"; else if (' ' == (char) ch) low += " "; } } String[] arrLow = new String[4]; String[] resultLow = new String[4]; arrLow = low.split(":"); resultLow[0] = arrLow[0].replace(" ", ""); resultLow[1] = arrLow[1].substring(0, 1).toLowerCase() + arrLow[1].substring(1, arrLow[1].length()); resultLow[2] = arrLow[2].substring(0, 1).toLowerCase() + arrLow[2].substring(1, 3) + arrLow[2].substring(3, 4).toUpperCase() + arrLow[2].substring(4, arrLow[2].length()); resultLow[3] = arrLow[3] + "!"; for(int i = 0; i < arrLow.length; i++) { fos.write(resultLow[i].getBytes()); fos.write('\r'); fos.write('\n'); String rsl = ""; if(resultLow[i].equalsIgnoreCase(arrLow[i])) { rsl = "Equal"; }else { rsl = "Not Equal"; } System.out.println("LINE " + (i+1) + " : " + rsl); } } catch (Exception e) { e.printStackTrace(); } } // main 메서드는 수정하지 마세요. public static void main(String[] args) throws Exception { try { dataCheck("data/data1.txt", "data/data2.txt"); } catch (Exception e) { e.printStackTrace(); } } }
[ "hojohe@nate.com" ]
hojohe@nate.com
203b0688f9eeb090389c766a1dcad90e757f0391
44484399babad4fab7999f53e51b1f27f39d94b0
/.history/src/main/java/fr/kevindvz/App_20201028164152.java
8cfe101c7257087e57b5c02abc934ff67cc2ca11
[]
no_license
KevinDvZ/TicTacTobjet
d35a04087f60e1ecd08323aad9260eed3dee1c4c
fe40b117308169f52d7f9773a24b120656f24fe3
refs/heads/main
2023-01-08T12:11:41.155335
2020-11-08T22:30:36
2020-11-08T22:30:36
310,458,104
0
0
null
null
null
null
UTF-8
Java
false
false
292
java
package fr.kevindvz; /** * Hello world! */ public final class App { private App() { } /** * Says hello to the world. * @param args The arguments of the program. */ public static void main(String[] args) { System.out.println("Hello World!"); } }
[ "kevin.deveza@gmail.com" ]
kevin.deveza@gmail.com
be55e3f8c8fed1e3e6aabef731f0408125067e00
bbfa56cfc81b7145553de55829ca92f3a97fce87
/plugins/raas.experiments.jaxbased.webserviceclient.topdown/src/raas/experiments/jaxbased/webservice/CreateDerivedUnderClassE2.java
65617ffc2da82387740702177557babca14965a9
[]
no_license
patins1/raas4emf
9e24517d786a1225344a97344777f717a568fdbe
33395d018bc7ad17a0576033779dbdf70fa8f090
refs/heads/master
2021-08-16T00:27:12.859374
2021-07-30T13:01:48
2021-07-30T13:01:48
87,889,951
1
0
null
null
null
null
UTF-8
Java
false
false
1,532
java
package raas.experiments.jaxbased.webservice; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for CreateDerivedUnderClassE2 complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="CreateDerivedUnderClassE2"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="arg0" type="{http://webservice.jaxbased.experiments.raas/}DerivedUnderClassE2" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "CreateDerivedUnderClassE2", propOrder = { "arg0" }) public class CreateDerivedUnderClassE2 { protected DerivedUnderClassE2 arg0; /** * Gets the value of the arg0 property. * * @return * possible object is * {@link DerivedUnderClassE2 } * */ public DerivedUnderClassE2 getArg0() { return arg0; } /** * Sets the value of the arg0 property. * * @param value * allowed object is * {@link DerivedUnderClassE2 } * */ public void setArg0(DerivedUnderClassE2 value) { this.arg0 = value; } }
[ "patins@f81cfaeb-dc96-476f-bd6d-b0d16e38694e" ]
patins@f81cfaeb-dc96-476f-bd6d-b0d16e38694e
d654f07964e62ab289e84e183b2708628d69e5c4
2088303ad9939663f5f8180f316b0319a54bc1a6
/src/main/java/com/lottery/lottype/gd11x5/Gd11x5DZ3.java
87e10d50fbe0d62324b8184b10aa1470ab750119
[]
no_license
lichaoliu/lottery
f8afc33ccc70dd5da19c620250d14814df766095
7796650e5b851c90fce7fd0a56f994f613078e10
refs/heads/master
2022-12-23T05:30:22.666503
2019-06-10T13:46:38
2019-06-10T13:46:38
141,867,129
7
1
null
2022-12-16T10:52:50
2018-07-22T04:59:44
Java
UTF-8
Java
false
false
2,320
java
package com.lottery.lottype.gd11x5; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.lottery.common.contains.ErrorCode; import com.lottery.common.contains.lottery.LotteryDrawPrizeAwarder; import com.lottery.common.exception.LotteryException; import com.lottery.common.util.MathUtils; import com.lottery.lottype.SplitedLot; public class Gd11x5DZ3 extends Gd11x5X{ @Override public String caculatePrizeLevel(String betcode, String wincode, int oneAmount) { betcode = betcode.split("\\-")[1].replace("^", ""); String dan = betcode.split("\\#")[0]; String tuo = betcode.split("\\#")[1]; wincode = wincode.replace(" ", ""); if(totalHits(dan, wincode.substring(0, 8))==dan.length()/2&&totalHits(tuo, wincode.substring(0, 8))==3-dan.length()/2) { return LotteryDrawPrizeAwarder.GD11X5_Z3.value; } return LotteryDrawPrizeAwarder.NOT_WIN.value; } @Override public long getSingleBetAmount(String betcode, BigDecimal beishu, int oneAmount) { if(!betcode.matches(DZ3)) { throw new LotteryException(ErrorCode.betamount_error, ErrorCode.betamount_error.memo); } if(isBetcodeDuplication(betcode.split("\\-")[1].replace("^", "").replace("#", ","))) { throw new LotteryException(ErrorCode.betamount_error, ErrorCode.betamount_error.memo); } int dan = betcode.split("\\-")[1].split("\\#")[0].split(",").length; int tuo = betcode.split("\\-")[1].split("\\#")[1].split(",").length; long zhushu = MathUtils.combine(tuo, 3-dan); return zhushu*200*beishu.longValue(); } @Override public List<SplitedLot> splitByType(String betcode, int lotmulti, int oneAmount) { List<SplitedLot> list = new ArrayList<SplitedLot>(); long amt = getSingleBetAmount(betcode,new BigDecimal(lotmulti),oneAmount); if(!SplitedLot.isToBeSplit99(lotmulti,amt)) { list.add(new SplitedLot(betcode,lotmulti,amt,lotterytype)); }else { int amtSingle = (int) (amt / lotmulti); int permissionLotmulti = 2000000 / amtSingle; if(permissionLotmulti > 99) { permissionLotmulti = 99; } list.addAll(SplitedLot.splitToPermissionMulti(betcode, lotmulti, permissionLotmulti,lotterytype)); for(SplitedLot s:list) { s.setAmt(getSingleBetAmount(s.getBetcode(),new BigDecimal(s.getLotMulti()),oneAmount)); } } return list; } }
[ "1147149597@qq.com" ]
1147149597@qq.com
bbe1ac173a9d7799876ce85415293e43acdace34
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/org/apache/hadoop/yarn/server/nodemanager/security/TestNMTokenSecretManagerInNM.java
181e4cbbdbd3e59caad8ac77a4462a993e3b2383
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
6,519
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.yarn.server.nodemanager.security; import YarnConfiguration.NM_RECOVERY_ENABLED; import java.io.IOException; import org.apache.hadoop.security.token.SecretManager.InvalidToken; import org.apache.hadoop.yarn.api.records.ApplicationAttemptId; import org.apache.hadoop.yarn.api.records.ApplicationId; import org.apache.hadoop.yarn.api.records.NodeId; import org.apache.hadoop.yarn.conf.YarnConfiguration; import org.apache.hadoop.yarn.security.NMTokenIdentifier; import org.apache.hadoop.yarn.server.api.records.MasterKey; import org.apache.hadoop.yarn.server.nodemanager.recovery.NMMemoryStateStoreService; import org.apache.hadoop.yarn.server.security.BaseNMTokenSecretManager; import org.junit.Assert; import org.junit.Test; public class TestNMTokenSecretManagerInNM { @Test public void testRecovery() throws IOException { YarnConfiguration conf = new YarnConfiguration(); conf.setBoolean(NM_RECOVERY_ENABLED, true); final NodeId nodeId = NodeId.newInstance("somehost", 1234); final ApplicationAttemptId attempt1 = ApplicationAttemptId.newInstance(ApplicationId.newInstance(1, 1), 1); final ApplicationAttemptId attempt2 = ApplicationAttemptId.newInstance(ApplicationId.newInstance(2, 2), 2); TestNMTokenSecretManagerInNM.NMTokenKeyGeneratorForTest keygen = new TestNMTokenSecretManagerInNM.NMTokenKeyGeneratorForTest(); NMMemoryStateStoreService stateStore = new NMMemoryStateStoreService(); stateStore.init(conf); start(); NMTokenSecretManagerInNM secretMgr = new NMTokenSecretManagerInNM(stateStore); secretMgr.setNodeId(nodeId); MasterKey currentKey = keygen.generateKey(); secretMgr.setMasterKey(currentKey); NMTokenIdentifier attemptToken1 = getNMTokenId(secretMgr.createNMToken(attempt1, nodeId, "user1")); NMTokenIdentifier attemptToken2 = getNMTokenId(secretMgr.createNMToken(attempt2, nodeId, "user2")); secretMgr.appAttemptStartContainer(attemptToken1); secretMgr.appAttemptStartContainer(attemptToken2); Assert.assertTrue(secretMgr.isAppAttemptNMTokenKeyPresent(attempt1)); Assert.assertTrue(secretMgr.isAppAttemptNMTokenKeyPresent(attempt2)); Assert.assertNotNull(secretMgr.retrievePassword(attemptToken1)); Assert.assertNotNull(secretMgr.retrievePassword(attemptToken2)); // restart and verify key is still there and token still valid secretMgr = new NMTokenSecretManagerInNM(stateStore); secretMgr.recover(); secretMgr.setNodeId(nodeId); Assert.assertEquals(currentKey, secretMgr.getCurrentKey()); Assert.assertTrue(secretMgr.isAppAttemptNMTokenKeyPresent(attempt1)); Assert.assertTrue(secretMgr.isAppAttemptNMTokenKeyPresent(attempt2)); Assert.assertNotNull(secretMgr.retrievePassword(attemptToken1)); Assert.assertNotNull(secretMgr.retrievePassword(attemptToken2)); // roll master key and remove an app currentKey = keygen.generateKey(); secretMgr.setMasterKey(currentKey); secretMgr.appFinished(attempt1.getApplicationId()); // restart and verify attempt1 key is still valid due to prev key persist secretMgr = new NMTokenSecretManagerInNM(stateStore); secretMgr.recover(); secretMgr.setNodeId(nodeId); Assert.assertEquals(currentKey, secretMgr.getCurrentKey()); Assert.assertFalse(secretMgr.isAppAttemptNMTokenKeyPresent(attempt1)); Assert.assertTrue(secretMgr.isAppAttemptNMTokenKeyPresent(attempt2)); Assert.assertNotNull(secretMgr.retrievePassword(attemptToken1)); Assert.assertNotNull(secretMgr.retrievePassword(attemptToken2)); // roll master key again, restart, and verify attempt1 key is bad but // attempt2 is still good due to app key persist currentKey = keygen.generateKey(); secretMgr.setMasterKey(currentKey); secretMgr = new NMTokenSecretManagerInNM(stateStore); secretMgr.recover(); secretMgr.setNodeId(nodeId); Assert.assertEquals(currentKey, secretMgr.getCurrentKey()); Assert.assertFalse(secretMgr.isAppAttemptNMTokenKeyPresent(attempt1)); Assert.assertTrue(secretMgr.isAppAttemptNMTokenKeyPresent(attempt2)); try { secretMgr.retrievePassword(attemptToken1); Assert.fail("attempt token should not still be valid"); } catch (InvalidToken e) { // expected } Assert.assertNotNull(secretMgr.retrievePassword(attemptToken2)); // remove last attempt, restart, verify both tokens are now bad secretMgr.appFinished(attempt2.getApplicationId()); secretMgr = new NMTokenSecretManagerInNM(stateStore); secretMgr.recover(); secretMgr.setNodeId(nodeId); Assert.assertEquals(currentKey, secretMgr.getCurrentKey()); Assert.assertFalse(secretMgr.isAppAttemptNMTokenKeyPresent(attempt1)); Assert.assertFalse(secretMgr.isAppAttemptNMTokenKeyPresent(attempt2)); try { secretMgr.retrievePassword(attemptToken1); Assert.fail("attempt token should not still be valid"); } catch (InvalidToken e) { // expected } try { secretMgr.retrievePassword(attemptToken2); Assert.fail("attempt token should not still be valid"); } catch (InvalidToken e) { // expected } close(); } private static class NMTokenKeyGeneratorForTest extends BaseNMTokenSecretManager { public MasterKey generateKey() { return createNewMasterKey().getMasterKey(); } } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
c76251332f7c3b5971efffee63c3beca921da91d
4ed9ad072957b9d6c723884115f292701ff49816
/app/src/main/java/com/example/broadcastreceiver28042021/MyBroadCastReceiver.java
2817e7d5a45a3c2ed3b999d7974a1dfe880edca0
[]
no_license
phamtanphat/BroadCastReceiver28042021
6036778c0ea3e8cc95efdc2cf3262da3f43d49e5
9bb8f1856146091de4abbf55a14c55ebb6f55291
refs/heads/master
2023-06-27T02:33:31.836023
2021-07-30T14:19:24
2021-07-30T14:19:24
391,083,442
0
0
null
null
null
null
UTF-8
Java
false
false
967
java
package com.example.broadcastreceiver28042021; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.Build; import android.widget.Toast; public class MyBroadCastReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { ConnectivityManager connectivityManager = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE); if (connectivityManager.getActiveNetwork() != null){ if(connectivityManager.getActiveNetworkInfo().getState() == NetworkInfo.State.CONNECTED){ //we are connected to a network Toast.makeText(context, "Có internet", Toast.LENGTH_SHORT).show(); } }else{ Toast.makeText(context, "Mất internet", Toast.LENGTH_SHORT).show(); } } }
[ "phatdroid94@gmail.com" ]
phatdroid94@gmail.com
9b16dfaf0aa0d4f343edb9685fa517e8499e31fa
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/4/org/jfree/chart/plot/CategoryPlot_isRangeZoomable_4593.java
a7e85471ad5ce1d89145b95f01a868b55dd1baca
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
5,389
java
org jfree chart plot gener plot data link categori dataset categorydataset render data item link categori item render categoryitemrender categori plot categoryplot plot axi plot valueaxisplot pannabl return code code rang ax zoomabl domain zoomabl isdomainzoom rang zoomabl israngezoom
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
1412cd7628accc7332cc1c6027025703caa92419
ae6bad780c436d7d20711e53a36cfab72ce63c72
/src/main/java/org/openpbr/web/rest/PlanningUnitGroupResource.java
3acaea982d0b30c6af1acdbeac7be0ad8f609d36
[]
no_license
chrismelky/openpbr
ac48e4a6ea3ae75ccffb6d0513cd0b7c0cb8d077
7ae13b4986fc05eb98e0591f7f252fbebc12f7e5
refs/heads/master
2020-05-20T20:48:32.978897
2019-05-09T07:22:04
2019-05-09T07:22:04
185,748,074
0
0
null
null
null
null
UTF-8
Java
false
false
7,742
java
package org.openpbr.web.rest; import org.openpbr.domain.PlanningUnitGroup; import org.openpbr.service.PlanningUnitGroupService; import org.openpbr.web.rest.errors.BadRequestAlertException; import org.openpbr.web.rest.util.HeaderUtil; import org.openpbr.web.rest.util.PaginationUtil; import org.openpbr.service.dto.PlanningUnitGroupCriteria; import org.openpbr.service.PlanningUnitGroupQueryService; 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 javax.validation.Valid; import java.net.URI; import java.net.URISyntaxException; import java.util.List; import java.util.Optional; import java.util.stream.StreamSupport; import static org.elasticsearch.index.query.QueryBuilders.*; /** * REST controller for managing PlanningUnitGroup. */ @RestController @RequestMapping("/api") public class PlanningUnitGroupResource { private final Logger log = LoggerFactory.getLogger(PlanningUnitGroupResource.class); private static final String ENTITY_NAME = "planningUnitGroup"; private final PlanningUnitGroupService planningUnitGroupService; private final PlanningUnitGroupQueryService planningUnitGroupQueryService; public PlanningUnitGroupResource(PlanningUnitGroupService planningUnitGroupService, PlanningUnitGroupQueryService planningUnitGroupQueryService) { this.planningUnitGroupService = planningUnitGroupService; this.planningUnitGroupQueryService = planningUnitGroupQueryService; } /** * POST /planning-unit-groups : Create a new planningUnitGroup. * * @param planningUnitGroup the planningUnitGroup to create * @return the ResponseEntity with status 201 (Created) and with body the new planningUnitGroup, or with status 400 (Bad Request) if the planningUnitGroup has already an ID * @throws URISyntaxException if the Location URI syntax is incorrect */ @PostMapping("/planning-unit-groups") public ResponseEntity<PlanningUnitGroup> createPlanningUnitGroup(@Valid @RequestBody PlanningUnitGroup planningUnitGroup) throws URISyntaxException { log.debug("REST request to save PlanningUnitGroup : {}", planningUnitGroup); if (planningUnitGroup.getId() != null) { throw new BadRequestAlertException("A new planningUnitGroup cannot already have an ID", ENTITY_NAME, "idexists"); } PlanningUnitGroup result = planningUnitGroupService.save(planningUnitGroup); return ResponseEntity.created(new URI("/api/planning-unit-groups/" + result.getId())) .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString())) .body(result); } /** * PUT /planning-unit-groups : Updates an existing planningUnitGroup. * * @param planningUnitGroup the planningUnitGroup to update * @return the ResponseEntity with status 200 (OK) and with body the updated planningUnitGroup, * or with status 400 (Bad Request) if the planningUnitGroup is not valid, * or with status 500 (Internal Server Error) if the planningUnitGroup couldn't be updated * @throws URISyntaxException if the Location URI syntax is incorrect */ @PutMapping("/planning-unit-groups") public ResponseEntity<PlanningUnitGroup> updatePlanningUnitGroup(@Valid @RequestBody PlanningUnitGroup planningUnitGroup) throws URISyntaxException { log.debug("REST request to update PlanningUnitGroup : {}", planningUnitGroup); if (planningUnitGroup.getId() == null) { throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull"); } PlanningUnitGroup result = planningUnitGroupService.save(planningUnitGroup); return ResponseEntity.ok() .headers(HeaderUtil.createEntityUpdateAlert(ENTITY_NAME, planningUnitGroup.getId().toString())) .body(result); } /** * GET /planning-unit-groups : get all the planningUnitGroups. * * @param pageable the pagination information * @param criteria the criterias which the requested entities should match * @return the ResponseEntity with status 200 (OK) and the list of planningUnitGroups in body */ @GetMapping("/planning-unit-groups") public ResponseEntity<List<PlanningUnitGroup>> getAllPlanningUnitGroups(PlanningUnitGroupCriteria criteria, Pageable pageable) { log.debug("REST request to get PlanningUnitGroups by criteria: {}", criteria); Page<PlanningUnitGroup> page = planningUnitGroupQueryService.findByCriteria(criteria, pageable); HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/planning-unit-groups"); return ResponseEntity.ok().headers(headers).body(page.getContent()); } /** * GET /planning-unit-groups/count : count all the planningUnitGroups. * * @param criteria the criterias which the requested entities should match * @return the ResponseEntity with status 200 (OK) and the count in body */ @GetMapping("/planning-unit-groups/count") public ResponseEntity<Long> countPlanningUnitGroups(PlanningUnitGroupCriteria criteria) { log.debug("REST request to count PlanningUnitGroups by criteria: {}", criteria); return ResponseEntity.ok().body(planningUnitGroupQueryService.countByCriteria(criteria)); } /** * GET /planning-unit-groups/:id : get the "id" planningUnitGroup. * * @param id the id of the planningUnitGroup to retrieve * @return the ResponseEntity with status 200 (OK) and with body the planningUnitGroup, or with status 404 (Not Found) */ @GetMapping("/planning-unit-groups/{id}") public ResponseEntity<PlanningUnitGroup> getPlanningUnitGroup(@PathVariable Long id) { log.debug("REST request to get PlanningUnitGroup : {}", id); Optional<PlanningUnitGroup> planningUnitGroup = planningUnitGroupService.findOne(id); return ResponseUtil.wrapOrNotFound(planningUnitGroup); } /** * DELETE /planning-unit-groups/:id : delete the "id" planningUnitGroup. * * @param id the id of the planningUnitGroup to delete * @return the ResponseEntity with status 200 (OK) */ @DeleteMapping("/planning-unit-groups/{id}") public ResponseEntity<Void> deletePlanningUnitGroup(@PathVariable Long id) { log.debug("REST request to delete PlanningUnitGroup : {}", id); planningUnitGroupService.delete(id); return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build(); } /** * SEARCH /_search/planning-unit-groups?query=:query : search for the planningUnitGroup corresponding * to the query. * * @param query the query of the planningUnitGroup search * @param pageable the pagination information * @return the result of the search */ @GetMapping("/_search/planning-unit-groups") public ResponseEntity<List<PlanningUnitGroup>> searchPlanningUnitGroups(@RequestParam String query, Pageable pageable) { log.debug("REST request to search for a page of PlanningUnitGroups for query {}", query); Page<PlanningUnitGroup> page = planningUnitGroupService.search(query, pageable); HttpHeaders headers = PaginationUtil.generateSearchPaginationHttpHeaders(query, page, "/api/_search/planning-unit-groups"); return ResponseEntity.ok().headers(headers).body(page.getContent()); } }
[ "chrismelky05@gmail.com" ]
chrismelky05@gmail.com
9e393383035d41eab3e4ff1304f87efbba8386a2
04fd715987e5b20bf766348dc0c51a5fd928d78c
/src/main/java/com/futengwl/TemplateConfig.java
9116e2af34a01fb3bb24cdf27943c422d9cd3926
[]
no_license
JackMou/ftshop
d5ea5ca86e2179322f2bbf050615b02261c7d717
7285d9a5e5f7f687c70aff8611cb9e86c652564a
refs/heads/master
2020-03-30T03:53:43.160258
2018-09-07T08:12:07
2018-09-07T08:15:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,726
java
/* * Copyright 2008-2018 futengwl.com. All rights reserved. * Support: http://www.futengwl.com * License: http://www.futengwl.com/license * FileId: VYx6d962clA3ONMv0rHyHW28WGNNT4fc */ package com.futengwl; import java.io.Serializable; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; /** * 模板配置 * * @author FTSHOP Team * @version 6.0 */ public class TemplateConfig implements Serializable { private static final long serialVersionUID = -517540800437045215L; /** * 缓存名称 */ public static final String CACHE_NAME = "templateConfig"; /** * 类型 */ public enum Type { /** * 页面模板 */ PAGE, /** * 打印模板 */ PRINT, /** * 邮件模板 */ MAIL, /** * 短信模板 */ SMS } /** * ID */ private String id; /** * 类型 */ private TemplateConfig.Type type; /** * 名称 */ private String name; /** * 模板文件路径 */ private String templatePath; /** * 描述 */ private String description; /** * 获取ID * * @return ID */ public String getId() { return id; } /** * 设置ID * * @param id * ID */ public void setId(String id) { this.id = id; } /** * 获取类型 * * @return 类型 */ public TemplateConfig.Type getType() { return type; } /** * 设置类型 * * @param type * 类型 */ public void setType(TemplateConfig.Type type) { this.type = type; } /** * 获取名称 * * @return 名称 */ public String getName() { return name; } /** * 设置名称 * * @param name * 名称 */ public void setName(String name) { this.name = name; } /** * 获取模板文件路径 * * @return 模板文件路径 */ public String getTemplatePath() { return templatePath; } /** * 设置模板文件路径 * * @param templatePath * 模板文件路径 */ public void setTemplatePath(String templatePath) { this.templatePath = templatePath; } /** * 获取描述 * * @return 描述 */ public String getDescription() { return description; } /** * 设置描述 * * @param description * 描述 */ public void setDescription(String description) { this.description = description; } /** * 重写equals方法 * * @param obj * 对象 * @return 是否相等 */ @Override public boolean equals(Object obj) { return EqualsBuilder.reflectionEquals(this, obj); } /** * 重写hashCode方法 * * @return HashCode */ @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } }
[ "40753518+SniperCoco@users.noreply.github.com" ]
40753518+SniperCoco@users.noreply.github.com
1821e6277816d54444ce86f2bb6e2023f27f1a73
674b10a0a3e2628e177f676d297799e585fe0eb6
/src/main/java/com/google/android/gms/common/api/internal/TaskApiCall.java
157e55bf7a38f1d4e0f27714ef1340acf6d02b5c
[]
no_license
Rune-Status/open-osrs-osrs-android
091792f375f1ea118da4ad341c07cb73f76b3e03
551b86ab331af94f66fe0dcb3adc8242bf3f472f
refs/heads/master
2020-08-08T03:32:10.802605
2019-10-08T15:50:18
2019-10-08T15:50:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,512
java
package com.google.android.gms.common.api.internal; import android.os.RemoteException; import androidx.annotation.Nullable; import com.google.android.gms.common.Feature; import com.google.android.gms.common.annotation.KeepForSdk; import com.google.android.gms.common.api.Api$AnyClient; import com.google.android.gms.common.internal.Preconditions; import com.google.android.gms.common.util.BiConsumer; import com.google.android.gms.tasks.TaskCompletionSource; @KeepForSdk public abstract class TaskApiCall { @KeepForSdk public class Builder { private Feature[] zakd; private boolean zakk; private RemoteCall zakl; Builder(zaci arg1) { this(); } private Builder() { super(); this.zakk = true; } @KeepForSdk public TaskApiCall build() { boolean v0 = this.zakl != null ? true : false; Preconditions.checkArgument(v0, "execute parameter required"); return new zack(this, this.zakd, this.zakk); } @KeepForSdk @Deprecated public Builder execute(BiConsumer arg2) { this.zakl = new zacj(arg2); return this; } @KeepForSdk public Builder run(RemoteCall arg1) { this.zakl = arg1; return this; } @KeepForSdk public Builder setAutoResolveMissingFeatures(boolean arg1) { this.zakk = arg1; return this; } @KeepForSdk public Builder setFeatures(Feature[] arg1) { this.zakd = arg1; return this; } static RemoteCall zaa(Builder arg0) { return arg0.zakl; } } private final Feature[] zakd; private final boolean zakk; @KeepForSdk @Deprecated public TaskApiCall() { super(); this.zakd = null; this.zakk = false; } @KeepForSdk private TaskApiCall(Feature[] arg1, boolean arg2) { super(); this.zakd = arg1; this.zakk = arg2; } TaskApiCall(Feature[] arg1, boolean arg2, zaci arg3) { this(arg1, arg2); } @KeepForSdk public static Builder builder() { return new Builder(null); } @KeepForSdk protected abstract void doExecute(AnyClient arg1, TaskCompletionSource arg2) throws RemoteException; @KeepForSdk public boolean shouldAutoResolveMissingFeatures() { return this.zakk; } @Nullable public final Feature[] zabt() { return this.zakd; } }
[ "kslrtips@gmail.com" ]
kslrtips@gmail.com
fb94764f06df2ab094e3d6b1fac6b0c0596a4660
ed5159d056e98d6715357d0d14a9b3f20b764f89
/src/irvine/oeis/a069/A069695.java
e761cfc32b6ebbd172e81ad303977fd40bc50a95
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
348
java
package irvine.oeis.a069; import irvine.oeis.FiniteSequence; /** * A069695 Triangular numbers with internal digits 3. * @author Georg Fischer */ public class A069695 extends FiniteSequence { /** Construct the sequence. */ public A069695() { super(0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 136, 231, 435, 630, 333336); } }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
75443f8540c57fe56e3165b91f7dd0515a6b9e16
2699db9c90f758b9200604f2e61f4ef507d6256a
/app/src/main/java/com/example/jh/bookreader/ui/adapter/FindAdapter.java
8daa1d74c40be133ea54e78fee68e86984c58dfc
[]
no_license
jinhuizxc/BookReader
168afb75bc73c2063ac387be4b82c5ce2625e876
82b18a360b5321cbf3c3e0bc67bce2b0eeb031e3
refs/heads/master
2021-01-19T23:12:45.959625
2017-04-28T01:57:22
2017-04-28T01:57:25
88,948,242
0
0
null
null
null
null
UTF-8
Java
false
false
1,308
java
package com.example.jh.bookreader.ui.adapter; import android.content.Context; import android.view.View; import com.example.jh.bookreader.R; import com.example.jh.bookreader.bean.support.FindBean; import com.example.jh.bookreader.common.OnRvItemClickListener; import com.example.jh.easyadapterlibrary.recyclerview.EasyRVAdapter; import com.example.jh.easyadapterlibrary.recyclerview.EasyRVHolder; import java.util.List; /** * Created by jinhui on 2017/4/25 * 邮箱: 1004260403@qq.com */ public class FindAdapter extends EasyRVAdapter<FindBean> { private OnRvItemClickListener itemClickListener; public FindAdapter(Context context, List<FindBean> list, OnRvItemClickListener listener) { super(context, list, R.layout.item_find); this.itemClickListener = listener; } @Override protected void onBindData(final EasyRVHolder holder, final int position, final FindBean item) { holder.setText(R.id.tvTitle, item.getTitle()); holder.setImageResource(R.id.ivIcon,item.getIconResId()); holder.setOnItemViewClickListener(new View.OnClickListener() { @Override public void onClick(View v) { itemClickListener.onItemClick(holder.getItemView(), position, item); } }); } }
[ "hui.jin@boatchina.net" ]
hui.jin@boatchina.net
93c331f64f6380cd75fe8b2cdfc608f3861313de
c297bfc1dfcb344190525a19fda435b2e23e8c26
/impexp-core/src/main/java/org/citydb/citygml/importer/concurrent/FeatureReaderWorker.java
a9ec967dfc640c88fbdff786f5dc97e85533d0ba
[ "Apache-2.0", "LGPL-3.0-only" ]
permissive
StOriJimmy/importer-exporter
c4777c3d5942ba4820ef7f2dd6a344456072ebb0
f7ac9d33447a61aae0ab499d2b704246e91a9b36
refs/heads/master
2020-05-17T18:51:51.057815
2019-05-12T02:01:47
2019-05-12T02:01:47
183,896,422
0
0
Apache-2.0
2019-05-12T02:01:47
2019-04-28T10:58:21
Java
UTF-8
Java
false
false
3,592
java
/* * 3D City Database - The Open Source CityGML Database * http://www.3dcitydb.org/ * * Copyright 2013 - 2019 * Chair of Geoinformatics * Technical University of Munich, Germany * https://www.gis.bgu.tum.de/ * * The 3D City Database is jointly developed with the following * cooperation partners: * * virtualcitySYSTEMS GmbH, Berlin <http://www.virtualcitysystems.de/> * M.O.S.S. Computer Grafik Systeme GmbH, Taufkirchen <http://www.moss.de/> * * 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.citydb.citygml.importer.concurrent; import java.util.concurrent.locks.ReentrantLock; import org.citydb.concurrent.Worker; import org.citydb.concurrent.WorkerPool; import org.citydb.config.Config; import org.citydb.config.project.global.LogLevel; import org.citydb.event.EventDispatcher; import org.citydb.event.global.InterruptEvent; import org.citydb.log.Logger; import org.citygml4j.model.citygml.CityGML; import org.citygml4j.xml.io.reader.MissingADESchemaException; import org.citygml4j.xml.io.reader.UnmarshalException; import org.citygml4j.xml.io.reader.XMLChunk; public class FeatureReaderWorker extends Worker<XMLChunk> { private final Logger LOG = Logger.getInstance(); private final ReentrantLock runLock = new ReentrantLock(); private volatile boolean shouldRun = true; private final WorkerPool<CityGML> dbWorkerPool; private final EventDispatcher eventDispatcher; private final boolean useValidation; public FeatureReaderWorker(WorkerPool<CityGML> dbWorkerPool, Config config, EventDispatcher eventDispatcher) { this.dbWorkerPool = dbWorkerPool; this.eventDispatcher = eventDispatcher; useValidation = config.getProject().getImporter().getXMLValidation().isSetUseXMLValidation(); } @Override public void interrupt() { shouldRun = false; } @Override public void run() { if (firstWork != null) { doWork(firstWork); firstWork = null; } while (shouldRun) { try { XMLChunk work = workQueue.take(); doWork(work); } catch (InterruptedException ie) { // re-check state } } } private void doWork(XMLChunk work) { final ReentrantLock runLock = this.runLock; runLock.lock(); try { try { CityGML cityGML = work.unmarshal(); if (!useValidation || work.hasPassedXMLValidation()) dbWorkerPool.addWork(cityGML); } catch (UnmarshalException e) { if (!useValidation || work.hasPassedXMLValidation()) { StringBuilder msg = new StringBuilder(); msg.append("Failed to unmarshal XML chunk: ").append(e.getMessage()); LOG.error(msg.toString()); } } catch (MissingADESchemaException e) { eventDispatcher.triggerEvent(new InterruptEvent("Failed to read an ADE XML Schema.", LogLevel.ERROR, e, eventChannel, this)); } catch (Exception e) { // this is to catch general exceptions that may occur during the import eventDispatcher.triggerEvent(new InterruptEvent("Aborting due to an unexpected " + e.getClass().getName() + " error.", LogLevel.ERROR, e, eventChannel, this)); } } finally { runLock.unlock(); } } }
[ "cnagel@virtualcitysystems.de" ]
cnagel@virtualcitysystems.de
0f3ac6cc0bdbf892c464dbe90d3af39c3d21ec1d
b755a269f733bc56f511bac6feb20992a1626d70
/model/model-util/src/main/java/com/qiyun/tools/BeanTools.java
ec67d0448d5bdcd7ca952281182d050e43a38baa
[]
no_license
yysStar/dubbo-zookeeper-SSM
55df313b58c78ab2eaa3d021e5bb201f3eee6235
e3f85dea824159fb4c29207cc5c9ccaecf381516
refs/heads/master
2022-12-21T22:50:33.405116
2020-05-09T09:20:41
2020-05-09T09:20:41
125,301,362
2
0
null
2022-12-16T10:51:09
2018-03-15T02:27:17
Java
UTF-8
Java
false
false
4,436
java
package com.qiyun.tools; import com.qiyun.intface.CompareCallBack; import com.qiyun.util.LogUtil; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; public class BeanTools { /** * 比较两个对象的某些属性进行比较,根据比较结果判定是否调用回调方法。 * 注意当obj1属性不为null,obj2属性为null时判断结果为不需调用回调方法。 * @param obj1 * @param obj2 * @param compareFieldNames * @param callBack * @return 是否调用过回调方法 */ public static Boolean compareBean(Object obj1, Object obj2, String[] compareFieldNames,Boolean isNotFillWithNull, CompareCallBack callBack) { Class c1 = obj1.getClass(); Class c2 = obj2.getClass(); boolean isCallBack=false; if (!c1.getName().equals(c2.getName())) { throw new RuntimeException("Object class is different"); } if (compareFieldNames == null || compareFieldNames.length == 0) compareFieldNames = converterListToArray(getAllFieldNames(obj1)); for (String fieldName : compareFieldNames) { //当属性值不一致时需进行回调 boolean isNeedCallBack=!compareField(c1, obj1, obj2, fieldName,isNotFillWithNull); isCallBack=isCallBack|isNeedCallBack; if (isNeedCallBack) { callBack.callBack(obj1, obj2, fieldName); } } return isCallBack; } public static Boolean compareBean(Object obj1, Object obj2, String[] compareFieldNames, CompareCallBack callBack) { return compareBean(obj1, obj2,compareFieldNames,true, callBack); } /** * * @param obj * @return */ public static List<String> getAllFieldNames(Object obj) { Class c1 = obj.getClass(); return getClassFieldName(c1); } public static List<String> getClassFieldName(Class clz) { List<String> fieldNames = getFieldNames(clz.getDeclaredFields()); if (clz.getSuperclass() != null) { fieldNames.addAll(getClassFieldName(clz.getSuperclass())); } return fieldNames; } public static List<String> getFieldNames(Field[] fields) { List<String> fieldsNameList = new ArrayList<String>(); for (Field tempField : fields) { fieldsNameList.add(tempField.getName()); } return fieldsNameList; } /** * * 转换器ListToArray * * @param list * @return */ public static String[] converterListToArray(List<String> list) { String[] array = null; if (list.size() >= 1) { array = new String[list.size()]; list.toArray(array); } return array; } /** * * @param obj1 * @param obj2 * @param fieldName * @return */ public static boolean compareField(Class c1, Object obj1, Object obj2, String fieldName) { return compareField(c1, obj1, obj2, fieldName,true); } /** * * @param obj1 * @param obj2 * @param fieldName * @return */ public static boolean compareField(Class c1, Object obj1, Object obj2, String fieldName,Boolean isNotFillWithNull ) { Field field; try { field = c1.getDeclaredField(fieldName); field.setAccessible(true); Object v1 = field.get(obj1); Object v2 = field.get(obj2); //与null进行比较, if(isNotFillWithNull&&v2==null){ return true; } if (v1 == null) { return false; } return v1.equals(v2); } catch (SecurityException e) { LogUtil.error(e); } catch (NoSuchFieldException e) { if (c1.getSuperclass() != null) { return compareField(c1.getSuperclass(), obj1, obj2, fieldName,isNotFillWithNull); } else { LogUtil.error(e); } } catch (IllegalArgumentException e) { LogUtil.error(e); } catch (IllegalAccessException e) { LogUtil.error(e); } return true; } public static Object compareBean(Object obj1, Object obj2, CompareCallBack callBack) { return compareBean(obj1, obj2, null, callBack); } public static Boolean compareBeanExcluFile(Object obj1, Object obj2, String[] excluNames,Boolean isNotFillWithNull, CompareCallBack callBack) { List<String> allFieldNames = getAllFieldNames(obj1); for (String excliFieldName : excluNames) { int index = allFieldNames.indexOf(excliFieldName); if (index != -1) { allFieldNames.remove(index); } } return compareBean(obj1, obj2, converterListToArray(allFieldNames),isNotFillWithNull, callBack); } public static Boolean compareBeanExcluFile(Object obj1, Object obj2, String[] excluNames, CompareCallBack callBack) { return compareBeanExcluFile(obj1, obj2, excluNames, true, callBack); } }
[ "qawsed1231010@126.com" ]
qawsed1231010@126.com
a716a56b45862787e33f58d9c908e0c74acb1f39
cc0458b38bf6d7bac7411a9c6fec9bc3b8282d3f
/thirdParty/CSharpParser/src/csmc/javacc/generated/syntaxtree/ConstructorModifierUnsafe.java
6951e54521c7039105cb1d24d078c0847814df9d
[]
no_license
RinatGumarov/Code-metrics
62f99c25b072dd56e9c953d40dac7076a4376180
2005b6671c174e09e6ea06431d4711993a33ecb6
refs/heads/master
2020-07-12T04:01:47.007860
2017-08-08T07:19:26
2017-08-08T07:19:26
94,275,456
1
0
null
null
null
null
UTF-8
Java
false
false
839
java
// // Generated by JTB 1.3.2 // package csmc.javacc.generated.syntaxtree; /** * Grammar production: * f0 -> <UNSAFE> */ public class ConstructorModifierUnsafe implements Node { public NodeToken f0; public ConstructorModifierUnsafe(NodeToken n0) { f0 = n0; } public ConstructorModifierUnsafe() { f0 = new NodeToken("unsafe"); } public void accept(csmc.javacc.generated.visitor.Visitor v) { v.visit(this); } public <R,A> R accept(csmc.javacc.generated.visitor.GJVisitor<R,A> v, A argu) { return v.visit(this,argu); } public <R> R accept(csmc.javacc.generated.visitor.GJNoArguVisitor<R> v) { return v.visit(this); } public <A> void accept(csmc.javacc.generated.visitor.GJVoidVisitor<A> v, A argu) { v.visit(this,argu); } }
[ "tiran678@icloud.com" ]
tiran678@icloud.com
d560585865b322926fa873c75b82877de7262dc4
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module0992_public/tests/more/src/java/module0992_public_tests_more/a/Foo3.java
aab2ea36df0d928105dcd4ae195b5d4152910eea
[ "BSD-3-Clause" ]
permissive
salesforce/bazel-ls-demo-project
5cc6ef749d65d6626080f3a94239b6a509ef145a
948ed278f87338edd7e40af68b8690ae4f73ebf0
refs/heads/master
2023-06-24T08:06:06.084651
2023-03-14T11:54:29
2023-03-14T11:54:29
241,489,944
0
5
BSD-3-Clause
2023-03-27T11:28:14
2020-02-18T23:30:47
Java
UTF-8
Java
false
false
1,659
java
package module0992_public_tests_more.a; import javax.lang.model.*; import javax.management.*; import javax.naming.directory.*; /** * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut * labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. * Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. * * @see java.nio.file.FileStore * @see java.sql.Array * @see java.util.logging.Filter */ @SuppressWarnings("all") public abstract class Foo3<D> extends module0992_public_tests_more.a.Foo2<D> implements module0992_public_tests_more.a.IFoo3<D> { java.util.zip.Deflater f0 = null; javax.annotation.processing.Completion f1 = null; javax.lang.model.AnnotatedConstruct f2 = null; public D element; public static Foo3 instance; public static Foo3 getInstance() { return instance; } public static <T> T create(java.util.List<T> input) { return module0992_public_tests_more.a.Foo2.create(input); } public String getName() { return module0992_public_tests_more.a.Foo2.getInstance().getName(); } public void setName(String string) { module0992_public_tests_more.a.Foo2.getInstance().setName(getName()); return; } public D get() { return (D)module0992_public_tests_more.a.Foo2.getInstance().get(); } public void set(Object element) { this.element = (D)element; module0992_public_tests_more.a.Foo2.getInstance().set(this.element); } public D call() throws Exception { return (D)module0992_public_tests_more.a.Foo2.getInstance().call(); } }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
07f0327bba415d0b743de57f84e41b9345def44f
af81db1ed7fff1b1ce92472a54fe987883b8174c
/chapter5-1-5/src/main/java/com/goat/chapter515/config/WebConfig.java
44760860cbed2a71f41d80a878f7c7d53d1ad168
[ "Apache-2.0" ]
permissive
xd1810232299/spring-5.1.x
e14f000caa6c62f5706b16453981e92b6596664d
9aa43536793aa40db671d6ce6071e3e35bf29996
refs/heads/master
2023-05-09T15:20:49.500578
2021-06-03T03:22:00
2021-06-03T03:22:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
472
java
package com.goat.chapter515.config; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.EnableWebMvc; /** * Created by 64274 on 2019/8/14. * * @ Description: TODO * @ author 山羊来了 * @ date 2019/8/14---10:14 */ @Configuration @EnableWebMvc @ComponentScan(basePackages = "com.goat.chapter515.controller") public class WebConfig{ }
[ "34465021+jwfl724168@users.noreply.github.com" ]
34465021+jwfl724168@users.noreply.github.com
56c69cd5299d376c3234ec2f4b92d1e13875c6b1
5ecd15baa833422572480fad3946e0e16a389000
/framework/Synergetics-Open/subsystems/old-cache/main/api/java/com/volantis/synergetics/cache/FutureResultFactory.java
85c149bfb5b7162aa585ef0d26bc16a036ffac9a
[]
no_license
jabley/volmobserverce
4c5db36ef72c3bb7ef20fb81855e18e9b53823b9
6d760f27ac5917533eca6708f389ed9347c7016d
refs/heads/master
2021-01-01T05:31:21.902535
2009-02-04T02:29:06
2009-02-04T02:29:06
38,675,289
0
1
null
null
null
null
UTF-8
Java
false
false
6,181
java
/* This file is part of Volantis Mobility Server. Volantis Mobility Server is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Volantis Mobility Server is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Volantis Mobility Server.  If not, see <http://www.gnu.org/licenses/>. */ /* ---------------------------------------------------------------------------- * (c) Volantis Systems Ltd 2005. * ---------------------------------------------------------------------------- */ package com.volantis.synergetics.cache; /** * Implementaions of this class are used to produce The ReadThroughFutureResult * objects used to populate the ReadThroughCache. Implementors should extend * the this and implement the getDataAccessor method. * * @deprecated Use {@link com.volantis.cache.Cache} instead. */ public abstract class FutureResultFactory { /** * This is the default timeout value that will be applied to objects * generated by this factory. Access to it is not synchronized and * therefore changes to it are only guarenteed to be seen "promptly" by * other threads. */ private volatile int timeout = -1; /** * Create the factory with a default timeout value. */ protected FutureResultFactory() { } /** * @return the timeout that has been set for this FutureResultFactory. */ public int getTimeout() { return timeout; } /** * Set the timeout associated with this factory. * * @param timeout the timeout to set. */ public void setTimeout(int timeout) { this.timeout = timeout; } /** * Create a future result object that will be placed in the * ReadThroughCache. This future result will always return null when asked * for its value. * * @param key the key that is to be used to populate the cache * entry * @param timeToLive the time to live for this cache object. * @return A FutureResult object that will be placed in the cache. */ public final ReadThroughFutureResult createNullFutureResult(Object key, int timeToLive) { ReadThroughFutureResult result = new NullFutureResult(key, timeToLive); return initialiseFutureResult(result, timeToLive); } /** * Create a future result object that will be placed in the * ReadThroughCache. This future result value allows a value to be set when * you create it. It then returns that value until its reset method is * called. * * @param key the key that is to be used to populate the cache * entry. * @param value the value to assign to this future result object. * @param timeToLive the time to live for this cache object. * @return A FutureResult object that will be placed in the cache. * * @deprecated This is only here for backwards compatibility. It is used by * the deprecated put() methods. */ final ReadThroughFutureResult createDirectValueFutureResult(Object key, Object value, int timeToLive) { ReadThroughFutureResult result = new DirectValueFutureResult(key, value, timeToLive); return initialiseFutureResult(result, timeToLive); } /** * Create a FutureResult to be put into the cache. * * @param key The key for the FutureResult. * @param timeToLive The timeToLive for the CacheObject. then the * createDataAccessor method will be called to obtain a * value. */ final ReadThroughFutureResult createFutureResult(Object key, int timeToLive) { ReadThroughFutureResult result = createCustomFutureResult(key, timeToLive); return result == null ? null : initialiseFutureResult(result, timeToLive); } /** * Common routine for initialising some aspects * * @param fr The ReadThroughFutureResult object to initialize * @param timeToLive * @return the initialized FutureResultObject. */ private ReadThroughFutureResult initialiseFutureResult( ReadThroughFutureResult fr, int timeToLive) { if (timeToLive == GenericCacheConfiguration.FOREVER && getTimeout() != -1) { fr.setTimeToLive(getTimeout()); } else { fr.setTimeToLive(timeToLive); } return fr; } /** * Override this method to return the FutureResult imlpementation to be * used to populate the cache. * * @param key the key used to get the data. * @return an object that can be used to populate a FutureResultObject. */ protected abstract ReadThroughFutureResult createCustomFutureResult(Object key, int timeToLive); } /* =========================================================================== Change History =========================================================================== $Log$ 14-Feb-05 397/1 matthew VBM:2005020308 Implement CachingPluggableHTTPManager 14-Feb-05 391/3 matthew VBM:2005020308 More minor changes 09-Feb-05 391/1 matthew VBM:2005020308 Make cache implementation slightly more flexible 03-Feb-05 379/4 matthew VBM:2005012601 Change the caching implemenation to be (hopefully) more performant 02-Feb-05 379/1 matthew VBM:2005012601 Change the caching implemenation to be (hopefully) more performant =========================================================================== */
[ "iwilloug@b642a0b7-b348-0410-9912-e4a34d632523" ]
iwilloug@b642a0b7-b348-0410-9912-e4a34d632523
5208e53c785b65b7523f97d6eb782e6bbbf5883d
4d161fbfd8370f64b9b671cef3521c60529ee3b2
/src/main/java/EnterpriseTransactionManagement/domain/Reply.java
dd958491ab51b6a9331eb8853fb2a6631e110e1e
[]
no_license
xdCao/SpringBootDemo
b720e6c6ffddf66ca0fd390dc4f1e36b8659d6ff
0b8db8364eeb5f584badebfdd27303cbbd9e050a
refs/heads/master
2021-01-20T06:38:23.927378
2017-05-03T08:14:57
2017-05-03T08:14:57
89,903,885
0
0
null
null
null
null
UTF-8
Java
false
false
2,409
java
package EnterpriseTransactionManagement.domain; import javax.persistence.*; import java.sql.Timestamp; import java.util.Date; /** * Created by xdcao on 2017/5/1. */ @Entity public class Reply { private int id; private String replyContent; private Date replyTime; private Employ employByEmployId; private Message messageByMessageId; @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id", nullable = false) public int getId() { return id; } public void setId(int id) { this.id = id; } @Basic @Column(name = "replyContent", nullable = false, length = 255) public String getReplyContent() { return replyContent; } public void setReplyContent(String replyContent) { this.replyContent = replyContent; } @Basic @Column(name = "replyTime", nullable = false) public Date getReplyTime() { return replyTime; } public void setReplyTime(Date replyTime) { this.replyTime = replyTime; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Reply reply = (Reply) o; if (id != reply.id) return false; if (replyContent != null ? !replyContent.equals(reply.replyContent) : reply.replyContent != null) return false; if (replyTime != null ? !replyTime.equals(reply.replyTime) : reply.replyTime != null) return false; return true; } @Override public int hashCode() { int result = id; result = 31 * result + (replyContent != null ? replyContent.hashCode() : 0); result = 31 * result + (replyTime != null ? replyTime.hashCode() : 0); return result; } @ManyToOne @JoinColumn(name = "employId", referencedColumnName = "id", nullable = false) public Employ getEmployByEmployId() { return employByEmployId; } public void setEmployByEmployId(Employ employByEmployId) { this.employByEmployId = employByEmployId; } @ManyToOne @JoinColumn(name = "messageId", referencedColumnName = "id", nullable = false) public Message getMessageByMessageId() { return messageByMessageId; } public void setMessageByMessageId(Message messageByMessageId) { this.messageByMessageId = messageByMessageId; } }
[ "705083979@qq.com" ]
705083979@qq.com
245a204754b5b0a5cd524b587a025671eda05a7b
e9dc4e9b5046322b02c54e6a035f6620f0abbc89
/lian_hjy_project/src/main/java/com/zhanghp/service/base/FyReceiptSubService.java
70f2ce723f0af34263d475fa42eef582c38b4f74
[]
no_license
zhp1221/hjy
333003784ca8c97b0ef2e5af6d7b8843c2c6eeb7
88db8f0aca84e0b837de6dc8ebb43de3f0cf8e85
refs/heads/master
2023-08-28T04:02:54.552694
2021-10-31T11:24:21
2021-10-31T11:24:21
406,342,462
2
0
null
null
null
null
UTF-8
Java
false
false
318
java
package com.zhanghp.service.base; import com.zhanghp.bean.FyReceiptSub; import com.baomidou.mybatisplus.extension.service.IService; /** * <p> * 收款单子单 服务类 * </p> * * @author zhanghp * @since 2021-09-12 */ public interface FyReceiptSubService extends IService<FyReceiptSub> { }
[ "zhanghp1221@126.com" ]
zhanghp1221@126.com
ce78bebdf0ae6ef68708730500c9070a70883187
d28614de0d2c74c9bb93ec99c684cc69d66d6d86
/com.cash.spring.common/cash.aop.plugin/src/main/java/com/cash/spring/aop/plugin/plugin/Execution.java
64c168d8df66722d1b46887f25e1b508fab51fb0
[]
no_license
shouyinsun/aop-plugin
4567bb099f8b58b825e0d3b55a60df525ffa53bb
9a63f7d0824d9a4526b60611fc2a39b5f082a6b3
refs/heads/master
2021-09-16T11:08:58.111847
2018-06-20T02:41:11
2018-06-20T02:41:11
106,697,212
1
0
null
null
null
null
UTF-8
Java
false
false
334
java
package com.cash.spring.aop.plugin.plugin; /** * 执行方式 * author cash * create 2017-10-09-20:11 **/ public enum Execution { REPLACE(0), BEFORE(1), AFTER(2); private final int value; Execution(int value) { this.value = value; } public int value() { return this.value; } }
[ "442620332@qq.com" ]
442620332@qq.com
8bcf5afd266e8a54206c18b85268baa9733470dc
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_6c3bd07997f592f418ff4223e77fbad3dac0b1e8/TruncatingTextView/9_6c3bd07997f592f418ff4223e77fbad3dac0b1e8_TruncatingTextView_t.java
1825984908560d5c57425165e22e7c132eee8cf5
[]
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,068
java
package edu.mit.mitmobile2; import android.content.Context; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Typeface; import android.text.Layout; import android.text.StaticLayout; import android.text.TextPaint; import android.text.TextUtils; import android.util.AttributeSet; import android.widget.TextView; public class TruncatingTextView extends TextView { private int mPaddingTop; private int mPaddingBottom; private TextPaint mTextPaint; private StaticLayout mStaticLayout; private int mWidth; private int mHeight; public TruncatingTextView(Context context, AttributeSet attrs) { this(context, attrs, 0); } public TruncatingTextView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); // TODO Auto-generated constructor stub mPaddingTop = getCompoundPaddingTop(); mPaddingBottom = getCompoundPaddingBottom(); initTextView(getTextColors().getDefaultColor(), getTextSize()); } private void initTextView(int color, float textSize) { mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); mTextPaint.setColor(color); mTextPaint.setTypeface(Typeface.defaultFromStyle(0)); mTextPaint.setTextSize(textSize); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { // TODO Auto-generated method stub int height = MeasureSpec.getSize(heightMeasureSpec); mWidth = MeasureSpec.getSize(widthMeasureSpec); height -= mPaddingTop + mPaddingBottom; mStaticLayout = null; mHeight = mPaddingTop + mPaddingBottom; if (height > 0) { mStaticLayout = new StaticLayout(getText(), mTextPaint, mWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false); if (mStaticLayout.getHeight() > height) { int charsUpperLimit = getText().length(); int charsLowerLimit = 0; while (charsUpperLimit > charsLowerLimit + 1) { int charsCount = (charsUpperLimit + charsLowerLimit) / 2; String text = getText().toString().substring(0, charsCount).trim() + "\u2026"; mStaticLayout = new StaticLayout(text, mTextPaint, mWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 1.0f, false); if (mStaticLayout.getHeight() > height) { charsUpperLimit = charsCount; } else { charsLowerLimit = charsCount; } } int charsThatFit = charsLowerLimit; if (charsThatFit > 0) { String text = getText().toString().substring(0, charsThatFit).trim() + "\u2026"; mStaticLayout = new StaticLayout(text, mTextPaint, mWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 1.0f, false); } else { mStaticLayout = null; } } } if (mStaticLayout != null) { mHeight += mStaticLayout.getHeight(); } setMeasuredDimension(mWidth, mHeight); } @Override protected void onDraw(Canvas canvas) { if (mStaticLayout != null) { canvas.save(); if (mPaddingTop > 0) { canvas.translate(0, mPaddingTop); } mStaticLayout.draw(canvas); canvas.restore(); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
53099acecea2f3763ad766813f831de4a5e27f1a
2c7bbc8139c4695180852ed29b229bb5a0f038d7
/com/google/android/gms/common/zzc$zzcg.java
8af5c5038b2fb75fddd03b62ba9bed5fc989a895
[]
no_license
suliyu/evolucionNetflix
6126cae17d1f7ea0bc769ee4669e64f3792cdd2f
ac767b81e72ca5ad636ec0d471595bca7331384a
refs/heads/master
2020-04-27T05:55:47.314928
2017-05-08T17:08:22
2017-05-08T17:08:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
480
java
// // Decompiled by Procyon v0.5.30 // package com.google.android.gms.common; final class zzc$zzcg { static final zzc$zza[] zzaak; static { zzaak = new zzc$zza[] { new zzc$zzcg$1(zzc$zza.zzbX("0\u0082\u0003·0\u0082\u0002\u009f \u0003\u0002\u0001\u0002\u0002\t\u0000\u00fa\u0098¶\u00f9$,\u00c2\u00c20")), new zzc$zzcg$2(zzc$zza.zzbX("0\u0082\u0003·0\u0082\u0002\u009f \u0003\u0002\u0001\u0002\u0002\t\u0000\u00ceL\u000e\u00c9´W[\u00970")) }; } }
[ "sy.velasquez10@uniandes.edu.co" ]
sy.velasquez10@uniandes.edu.co