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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3945bb602d162152fc3b970f0b937ab2a245aa00 | 4be61634117a0aa988f33246d0f425047c027f4c | /zkredis-app/src/jdk6/com/sun/corba/se/spi/activation/InvalidORBidHelper.java | da4d00b752fde3cdbaad0ad8b7f1e3e06183d819 | [] | no_license | oldshipmaster/zkredis | c02e84719f663cd620f1a76fba38e4452d755a0c | 3ec53d6904a47a5ec79bc7768b1ca6324facb395 | refs/heads/master | 2022-12-27T01:31:23.786539 | 2020-08-12T01:22:07 | 2020-08-12T01:22:07 | 34,658,942 | 1 | 3 | null | 2022-12-16T04:32:34 | 2015-04-27T09:55:48 | Java | UTF-8 | Java | false | false | 2,247 | java | package com.sun.corba.se.spi.activation;
/**
* com/sun/corba/se/spi/activation/InvalidORBidHelper.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from ../../../../src/share/classes/com/sun/corba/se/spi/activation/activation.idl
* Sunday, October 11, 2009 1:27:26 AM GMT-08:00
*/
abstract public class InvalidORBidHelper
{
private static String _id = "IDL:activation/InvalidORBid:1.0";
public static void insert (org.omg.CORBA.Any a, com.sun.corba.se.spi.activation.InvalidORBid that)
{
org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
a.type (type ());
write (out, that);
a.read_value (out.create_input_stream (), type ());
}
public static com.sun.corba.se.spi.activation.InvalidORBid extract (org.omg.CORBA.Any a)
{
return read (a.create_input_stream ());
}
private static org.omg.CORBA.TypeCode __typeCode = null;
private static boolean __active = false;
synchronized public static org.omg.CORBA.TypeCode type ()
{
if (__typeCode == null)
{
synchronized (org.omg.CORBA.TypeCode.class)
{
if (__typeCode == null)
{
if (__active)
{
return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
}
__active = true;
org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [0];
org.omg.CORBA.TypeCode _tcOf_members0 = null;
__typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (com.sun.corba.se.spi.activation.InvalidORBidHelper.id (), "InvalidORBid", _members0);
__active = false;
}
}
}
return __typeCode;
}
public static String id ()
{
return _id;
}
public static com.sun.corba.se.spi.activation.InvalidORBid read (org.omg.CORBA.portable.InputStream istream)
{
com.sun.corba.se.spi.activation.InvalidORBid value = new com.sun.corba.se.spi.activation.InvalidORBid ();
// read and discard the repository ID
istream.read_string ();
return value;
}
public static void write (org.omg.CORBA.portable.OutputStream ostream, com.sun.corba.se.spi.activation.InvalidORBid value)
{
// write the repository ID
ostream.write_string (id ());
}
}
| [
"oldshipmaster@163.com"
] | oldshipmaster@163.com |
40d441f42007a5d6e65903e2b1532140a52c650b | 87f420a0e7b23aefe65623ceeaa0021fb0c40c56 | /oauth/oauth-module-system/oauth-module-system-biz/src/main/java/cn/iocoder/oauth/module/system/controller/admin/oauth2/vo/client/OAuth2ClientCreateReqVO.java | 2837f41a1b768e93cf9a57165e32fe445bdf4a2c | [] | no_license | xioxu-web/xioxu-web | 0361a292b675d8209578d99451598bf4a56f9b08 | 7fe3f9539e3679e1de9f5f614f3f9b7f41a28491 | refs/heads/master | 2023-05-05T01:59:43.228816 | 2023-04-28T07:44:58 | 2023-04-28T07:44:58 | 367,005,744 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 460 | java | package cn.iocoder.oauth.module.system.controller.admin.oauth2.vo.client;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
/**
* @author xiaoxu123
*/
@ApiModel("管理后台 - OAuth2 客户端创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class OAuth2ClientCreateReqVO extends OAuth2ClientBaseVO {
}
| [
"xb01049438@alibaba-inc.com"
] | xb01049438@alibaba-inc.com |
10b535e4ead8449b6220b21d6629277d3aa0623d | 2474744df850fd4d170a65ef78e1202aea89d8b8 | /jehc-web/src/main/java/jehc/bmodules/bweb/BInvoiceController.java | e4cbac3450b2efc2f2e437b04cb1a1de178673d8 | [] | no_license | cgb-extjs-gwt/jehc | 073c98ba8d25c8cf0ffa769bf09788e01bae375b | 69112cc9b79c96bb258fc472f22c946f8c5a2008 | refs/heads/master | 2023-04-27T08:04:06.440924 | 2018-08-24T08:53:24 | 2018-08-24T08:53:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,348 | java | package jehc.bmodules.bweb;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.github.pagehelper.PageInfo;
import jehc.bmodules.bmodel.BInvoice;
import jehc.bmodules.bservice.BInvoiceService;
import jehc.xtmodules.xtcore.base.BaseAction;
import jehc.xtmodules.xtcore.base.BaseSearch;
import jehc.xtmodules.xtcore.util.CommonUtils;
import jehc.xtmodules.xtcore.util.UUID;
import jehc.xtmodules.xtcore.util.excel.poi.ExportExcel;
/**
* 基础发票
* 2016-02-22 14:35:28 邓纯杰
*/
@Controller
@RequestMapping("/bInvoiceController")
public class BInvoiceController extends BaseAction{
@Autowired
private BInvoiceService bInvoiceService;
/**
* 载入初始化页面
* @param b_invoice
* @param request
* @return
*/
@RequestMapping(value="/loadBInvoice",method={RequestMethod.POST,RequestMethod.GET})
public ModelAndView loadBInvoice(String b_member_id,BInvoice b_Invoice,HttpServletRequest request){
request.setAttribute("b_member_id", b_member_id);
return new ModelAndView("pc/b-view/b-invoice/b-invoice-list");
}
/**
* 加载初始化列表数据并分页
* @param b_invoice
* @param request
*/
@ResponseBody
@RequestMapping(value="/getBInvoiceListByCondition",method={RequestMethod.POST,RequestMethod.GET})
public String getBInvoiceListByCondition(String b_member_id,BInvoice b_Invoice,BaseSearch baseSearch,HttpServletRequest request){
Map<String, Object> condition = baseSearch.convert();
condition.put("b_member_id", b_member_id);
commonHPager(condition,request);
List<BInvoice> b_InvoiceList = bInvoiceService.getBInvoiceListByCondition(condition);
PageInfo<BInvoice> page = new PageInfo<BInvoice>(b_InvoiceList);
return outPageStr(page,request);
}
/**
* 获取对象
* @param b_invoice_id
* @param request
*/
@ResponseBody
@RequestMapping(value="/getBInvoiceById",method={RequestMethod.POST,RequestMethod.GET})
public String getBInvoiceById(String b_invoice_id,HttpServletRequest request){
BInvoice b_Invoice = bInvoiceService.getBInvoiceById(b_invoice_id);
return outDataStr(b_Invoice);
}
/**
* 添加
* @param b_invoice
* @param request
*/
@ResponseBody
@RequestMapping(value="/addBInvoice",method={RequestMethod.POST,RequestMethod.GET})
public String addBInvoice(BInvoice b_Invoice,HttpServletRequest request){
int i = 0;
if(null != b_Invoice && !"".equals(b_Invoice)){
b_Invoice.setB_invoice_id(UUID.toUUID());
b_Invoice.setB_invoice_ctime(CommonUtils.getSimpleDateFormat());
i=bInvoiceService.addBInvoice(b_Invoice);
}
if(i>0){
return outAudStr(true);
}else{
return outAudStr(false);
}
}
/**
* 修改
* @param b_invoice
* @param request
*/
@ResponseBody
@RequestMapping(value="/updateBInvoice",method={RequestMethod.POST,RequestMethod.GET})
public String updateBInvoice(BInvoice b_Invoice,HttpServletRequest request){
int i = 0;
if(null != b_Invoice && !"".equals(b_Invoice)){
b_Invoice.setB_invoice_mtime(CommonUtils.getSimpleDateFormat());
i=bInvoiceService.updateBInvoice(b_Invoice);
}
if(i>0){
return outAudStr(true);
}else{
return outAudStr(false);
}
}
/**
* 删除
* @param b_invoice_id
* @param request
*/
@ResponseBody
@RequestMapping(value="/delBInvoice",method={RequestMethod.POST,RequestMethod.GET})
public String delBInvoice(String b_invoice_id,HttpServletRequest request){
int i = 0;
if(null != b_invoice_id && !"".equals(b_invoice_id)){
Map<String, Object> condition = new HashMap<String, Object>();
condition.put("b_invoice_id",b_invoice_id.split(","));
i=bInvoiceService.delBInvoice(condition);
}
if(i>0){
return outAudStr(true);
}else{
return outAudStr(false);
}
}
/**
* 复制一行并生成记录
* @param b_invoice_id
* @param request
*/
@ResponseBody
@RequestMapping(value="/copyBInvoice",method={RequestMethod.POST,RequestMethod.GET})
public String copyBInvoice(String b_invoice_id,HttpServletRequest request){
int i = 0;
BInvoice b_Invoice = bInvoiceService.getBInvoiceById(b_invoice_id);
if(null != b_Invoice && !"".equals(b_Invoice)){
b_Invoice.setB_invoice_id(UUID.toUUID());
i=bInvoiceService.addBInvoice(b_Invoice);
}
if(i>0){
return outAudStr(true);
}else{
return outAudStr(false);
}
}
/**
* 导出
* @param excleData
* @param excleHeader
* @param excleText
* @param request
* @param request
*/
@RequestMapping(value="/exportBInvoice",method={RequestMethod.POST,RequestMethod.GET})
public void exportBInvoice(String excleData,String excleHeader,String excleText,HttpServletRequest request,HttpServletResponse response){
ExportExcel exportExcel = new ExportExcel();
exportExcel.exportExcel(excleData, excleHeader,excleText,response);
}
}
| [
"244831954@qq.com"
] | 244831954@qq.com |
9f95c870b454b66e7fcfa7053485bd1a4d2cffa5 | 3ef55e152decb43bdd90e3de821ffea1a2ec8f75 | /large/module1014/src/java/module1014/a/Foo2.java | 898c07d1e7038b2df46ab69650d05047ac109761 | [
"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,456 | java | package module1014.a;
import javax.annotation.processing.*;
import javax.lang.model.*;
import javax.management.*;
/**
* 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.io.File
* @see java.rmi.Remote
* @see java.nio.file.FileStore
*/
@SuppressWarnings("all")
public abstract class Foo2<C> extends module1014.a.Foo0<C> implements module1014.a.IFoo2<C> {
java.sql.Array f0 = null;
java.util.logging.Filter f1 = null;
java.util.zip.Deflater f2 = null;
public C element;
public static Foo2 instance;
public static Foo2 getInstance() {
return instance;
}
public static <T> T create(java.util.List<T> input) {
return module1014.a.Foo0.create(input);
}
public String getName() {
return module1014.a.Foo0.getInstance().getName();
}
public void setName(String string) {
module1014.a.Foo0.getInstance().setName(getName());
return;
}
public C get() {
return (C)module1014.a.Foo0.getInstance().get();
}
public void set(Object element) {
this.element = (C)element;
module1014.a.Foo0.getInstance().set(this.element);
}
public C call() throws Exception {
return (C)module1014.a.Foo0.getInstance().call();
}
}
| [
"gwagenknecht@salesforce.com"
] | gwagenknecht@salesforce.com |
c1044f5c02b63e4ff427810a37dc0188f6e308cc | 3dd35c0681b374ce31dbb255b87df077387405ff | /generated/productmodel/GL7Y2KCompuReltdAndOtherElectrProbLmtdCovOption.java | fb031aebc83109b870cfb526dca08c65eb056223 | [] | no_license | walisashwini/SBTBackup | 58b635a358e8992339db8f2cc06978326fed1b99 | 4d4de43576ec483bc031f3213389f02a92ad7528 | refs/heads/master | 2023-01-11T09:09:10.205139 | 2020-11-18T12:11:45 | 2020-11-18T12:11:45 | 311,884,817 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,415 | java | package productmodel;
@gw.lang.SimplePropertyProcessing
@javax.annotation.Generated(comments = "config/resources/productmodel/policylinepatterns/GL7Line/coveragepatterns/GL7Y2KCompuReltdAndOtherElectrProbLmtdCovOption.xml", date = "", value = "com.guidewire.pc.productmodel.codegen.ProductModelCodegen")
public class GL7Y2KCompuReltdAndOtherElectrProbLmtdCovOption extends entity.GL7SublineTypeSchedExcl {
protected GL7Y2KCompuReltdAndOtherElectrProbLmtdCovOption() {
super((java.lang.Void)null);
}
public GL7Y2KCompuReltdAndOtherElectrProbLmtdCovOption(entity.PolicyPeriod branch) {
super(branch, "GL7Y2KCompuReltdAndOtherElectrProbLmtdCovOption");
}
public GL7Y2KCompuReltdAndOtherElectrProbLmtdCovOption(entity.PolicyPeriod branch, java.util.Date effectiveDate, java.util.Date expirationDate) {
super(branch, effectiveDate, expirationDate, "GL7Y2KCompuReltdAndOtherElectrProbLmtdCovOption");
}
static {
com.guidewire._generated.productmodel.GL7Y2KCompuReltdAndOtherElectrProbLmtdCovOptionInternalAccess.FRIEND_ACCESSOR.init(new com.guidewire.pc.domain.productmodel.ProductModelFriendAccess<productmodel.GL7Y2KCompuReltdAndOtherElectrProbLmtdCovOption>() {
public productmodel.GL7Y2KCompuReltdAndOtherElectrProbLmtdCovOption newEmptyInstance() {
return new productmodel.GL7Y2KCompuReltdAndOtherElectrProbLmtdCovOption();
}
});
}
} | [
"ashwini@cruxxtechnologies.com"
] | ashwini@cruxxtechnologies.com |
bbda703b6b400f11efe4394a9bab9452017e1e25 | fc5f16c7dd1cd7aee2d2ca0eb414860b5ad6d384 | /base/minecraft (decompiled)/net/minecraft/src/RenderSpider.java | 3008ccfd2ad5c1fca3d439b16c83f6958fd97c70 | [] | no_license | Nickorama21/Minecraft--TI-Nspire-CX-Port | 44eeca7a742d199e223d712866352a9e12b3290c | 95acc13c310f519ed8d4ed5a755ef70712da532f | refs/heads/master | 2020-05-17T11:31:43.456900 | 2012-09-01T17:24:47 | 2012-09-01T17:24:52 | 5,623,326 | 4 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,133 | java | package net.minecraft.src;
import org.lwjgl.opengl.GL11;
public class RenderSpider extends RenderLiving
{
public RenderSpider()
{
super(new ModelSpider(), 1.0F);
this.setRenderPassModel(new ModelSpider());
}
protected float setSpiderDeathMaxRotation(EntitySpider par1EntitySpider)
{
return 180.0F;
}
/**
* Sets the spider's glowing eyes
*/
protected int setSpiderEyeBrightness(EntitySpider par1EntitySpider, int par2, float par3)
{
if (par2 != 0)
{
return -1;
}
else
{
this.loadTexture("/mob/spider_eyes.png");
float var4 = 1.0F;
GL11.glEnable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
char var5 = 61680;
int var6 = var5 % 65536;
int var7 = var5 / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)var6 / 1.0F, (float)var7 / 1.0F);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glColor4f(1.0F, 1.0F, 1.0F, var4);
return 1;
}
}
protected void scaleSpider(EntitySpider par1EntitySpider, float par2)
{
float var3 = par1EntitySpider.spiderScaleAmount();
GL11.glScalef(var3, var3, var3);
}
/**
* Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
* entityLiving, partialTickTime
*/
protected void preRenderCallback(EntityLiving par1EntityLiving, float par2)
{
this.scaleSpider((EntitySpider)par1EntityLiving, par2);
}
protected float getDeathMaxRotation(EntityLiving par1EntityLiving)
{
return this.setSpiderDeathMaxRotation((EntitySpider)par1EntityLiving);
}
/**
* Queries whether should render the specified pass or not.
*/
protected int shouldRenderPass(EntityLiving par1EntityLiving, int par2, float par3)
{
return this.setSpiderEyeBrightness((EntitySpider)par1EntityLiving, par2, par3);
}
}
| [
"nickparker.stl@gmail.com"
] | nickparker.stl@gmail.com |
e263f32caea31638bea0e4dc9ced616a862be34f | 5c52ad5c2dbccc649fe27cb3749b3e12d9ad70a3 | /src/main/java/com/zea7ot/lc/lvl3/lc0379/SolutionApproach0SegmentTree.java | f5cea484a84b5983a0bbac08ffef843b3b8a836d | [] | no_license | XizheSun0914/lc-java-zea7ot | c14c378a099a34cbfa1714820134b145f591a280 | d548827ae2ba343904464cac1d3f40420d75c0ec | refs/heads/master | 2022-11-25T03:09:56.218685 | 2020-07-20T22:47:04 | 2020-07-20T22:47:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 319 | java | /**
* https://leetcode.com/problems/design-phone-directory/
*
* Time Complexity: O()
* Space Complexity: O()
*
* References:
* https://leetcode.com/problems/design-phone-directory/discuss/166524/Strict-O(1)-Java
*/
package com.zea7ot.lc.lvl3.lc0379;
public class SolutionApproach0SegmentTree {
} | [
"yanglyu.leon.7@gmail.com"
] | yanglyu.leon.7@gmail.com |
1cb3a0ed25424e4298f82862777a46d7c2a64dc3 | 52370789b63b959b9e73e652dac172e1e9906201 | /Workspace/Eu1-34-44/src/com/noel/Main.java | a99cb34f95d76dca8e972a0a436bf529c0d67ca1 | [] | no_license | jasonthorne/OCA_JavaProgrammer | 3905cb2a3cbe1e501db99205f9cdbe7380c63377 | 6f12d90886e8c06440a97e72f73d3cdd5da1c26a | refs/heads/master | 2021-07-06T02:45:24.049338 | 2020-09-23T21:05:07 | 2020-09-23T21:05:07 | 177,753,950 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 265 | java | package com.noel;
public class Main {
static public void main(String[]args){
// Questions.q35();
//can also access variables of a interface here
// System.out.println(Behaviour.beInt);
Questions.q37();
//Questions .q40();
//Questions.q42();
}
}
| [
"jasonthorne@live.ie"
] | jasonthorne@live.ie |
0625957716b91cccbb67caa229b4a2c9aaf0cf25 | a23b277bd41edbf569437bdfedad22c2d7733dbe | /projecteuler/P138.java | b79cf3fe666d30533c6e67e0a2cb8c76cbeef2b1 | [] | no_license | alexandrofernando/java | 155ed38df33ae8dae641d327be3c6c355b28082a | a783407eaba29a88123152dd5b2febe10eb7bf1d | refs/heads/master | 2021-01-17T06:49:57.241130 | 2019-07-19T11:34:44 | 2019-07-19T11:34:44 | 52,783,678 | 1 | 0 | null | 2017-07-03T21:46:00 | 2016-02-29T10:38:28 | Java | UTF-8 | Java | false | false | 634 | java | public class P138 {
public static void main(String args[]) {
Irrational base = new Irrational(2, 1);
Irrational number = new Irrational(1, 0);
long sum = 0;
for (int i = 1; i <= 12 * 2 + 1; i++) {
number.multiply(base);
if (i % 2 == 1 && i != 1) {
sum += number.y;
}
}
System.out.println(sum);
}
}
class Irrational { // z + y * sqrt(5)
long z;
long y;
Irrational(long Z, long Y) {
this.z = Z;
this.y = Y;
}
void multiply(Irrational another) {
long newZ = this.z * another.z + this.y * another.y * 5;
long newY = this.z * another.y + this.y * another.z;
this.z = newZ;
this.y = newY;
}
} | [
"alexandrofernando@gmail.com"
] | alexandrofernando@gmail.com |
60d582f43796f088b9f585d437b47ab5060e34d5 | 2dce1d353d064b9f4c6765a4b6460c38b8d20264 | /src/fractalzoomer/functions/root_finding_methods/durand_kerner/DurandKernerGeneralized8.java | 64ab618f036366952e413603d043034e7053395e | [] | no_license | hrkalona/Fractal-Zoomer | 1fa30c531c46e4b25f8bfb33f70888f3b366771c | bcc3e1298b13e84b0730c67ffd6332e4e6575353 | refs/heads/master | 2023-08-30T08:54:46.594168 | 2023-08-15T11:41:26 | 2023-08-15T11:41:26 | 2,676,588 | 17 | 3 | null | 2023-08-15T11:41:27 | 2011-10-30T19:18:07 | Java | UTF-8 | Java | false | false | 4,921 | java | /*
* Copyright (C) 2020 hrkalona2
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package fractalzoomer.functions.root_finding_methods.durand_kerner;
import fractalzoomer.core.Complex;
import fractalzoomer.main.MainWindow;
import fractalzoomer.main.app_settings.OrbitTrapSettings;
import fractalzoomer.main.app_settings.StatisticsSettings;
import java.util.ArrayList;
/**
*
* @author hrkalona2
*/
public class DurandKernerGeneralized8 extends DurandKernerRootFindingMethod {
public DurandKernerGeneralized8(double xCenter, double yCenter, double size, int max_iterations, int out_coloring_algorithm, int user_out_coloring_algorithm, String outcoloring_formula, String[] user_outcoloring_conditions, String[] user_outcoloring_condition_formula, int in_coloring_algorithm, int user_in_coloring_algorithm, String incoloring_formula, String[] user_incoloring_conditions, String[] user_incoloring_condition_formula, boolean smoothing, int plane_type, double[] rotation_vals, double[] rotation_center, String user_plane, int user_plane_algorithm, String[] user_plane_conditions, String[] user_plane_condition_formula, double[] plane_transform_center, double plane_transform_angle, double plane_transform_radius, double[] plane_transform_scales, double[] plane_transform_wavelength, int waveType, double plane_transform_angle2, int plane_transform_sides, double plane_transform_amount, int converging_smooth_algorithm, OrbitTrapSettings ots, StatisticsSettings sts) {
super(xCenter, yCenter, size, max_iterations, plane_type, rotation_vals, rotation_center, user_plane, user_plane_algorithm, user_plane_conditions, user_plane_condition_formula, plane_transform_center, plane_transform_angle, plane_transform_radius, plane_transform_scales, plane_transform_wavelength, waveType, plane_transform_angle2, plane_transform_sides, plane_transform_amount, ots, 8);
switch (out_coloring_algorithm) {
case MainWindow.BINARY_DECOMPOSITION:
convergent_bailout = 1E-9;
break;
case MainWindow.BINARY_DECOMPOSITION2:
convergent_bailout = 1E-9;
break;
case MainWindow.USER_OUTCOLORING_ALGORITHM:
convergent_bailout = 1E-7;
break;
}
OutColoringAlgorithmFactory(out_coloring_algorithm, smoothing, converging_smooth_algorithm, user_out_coloring_algorithm, outcoloring_formula, user_outcoloring_conditions, user_outcoloring_condition_formula, plane_transform_center);
InColoringAlgorithmFactory(in_coloring_algorithm, user_in_coloring_algorithm, incoloring_formula, user_incoloring_conditions, user_incoloring_condition_formula, plane_transform_center);
if (sts.statistic) {
StatisticFactory(sts, plane_transform_center);
}
}
//orbit
public DurandKernerGeneralized8(double xCenter, double yCenter, double size, int max_iterations, ArrayList<Complex> complex_orbit, int plane_type, double[] rotation_vals, double[] rotation_center, String user_plane, int user_plane_algorithm, String[] user_plane_conditions, String[] user_plane_condition_formula, double[] plane_transform_center, double plane_transform_angle, double plane_transform_radius, double[] plane_transform_scales, double[] plane_transform_wavelength, int waveType, double plane_transform_angle2, int plane_transform_sides, double plane_transform_amount) {
super(xCenter, yCenter, size, max_iterations, complex_orbit, plane_type, rotation_vals, rotation_center, user_plane, user_plane_algorithm, user_plane_conditions, user_plane_condition_formula, plane_transform_center, plane_transform_angle, plane_transform_radius, plane_transform_scales, plane_transform_wavelength, waveType, plane_transform_angle2, plane_transform_sides, plane_transform_amount, 8);
}
@Override
public void function(Complex[] complex) {
for(int i = 0; i < degree; i++) {
fz[i] = complex[i].eighth().plus_mutable(complex[i].fourth().times_mutable(15)).sub_mutable(16);
}
durandKernerMethod(complex, fz);
}
@Override
public Complex evaluateFunction(Complex z, Complex c) {
return z.eighth().plus_mutable(z.fourth().times_mutable(15)).sub_mutable(16);
}
}
| [
"hrkalona@gmail.com"
] | hrkalona@gmail.com |
68291ac80d3e3ffcfc5a256f4525540052b3e28e | 5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1 | /Code Snippet Repository/Spring/Spring14204.java | 166e96dba6c7054cb93a57c82bae0b2acb2256c5 | [] | no_license | saber13812002/DeepCRM | 3336a244d4852a364800af3181e03e868cf6f9f5 | be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9 | refs/heads/master | 2023-03-16T00:08:06.473699 | 2018-04-18T05:29:50 | 2018-04-18T05:29:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,013 | java | @Test
public void fallbackAfterTimeout() throws Exception {
TaskScheduler scheduler = mock(TaskScheduler.class);
Runnable sessionCleanupTask = mock(Runnable.class);
DefaultTransportRequest request1 = createTransportRequest(this.webSocketTransport, TransportType.WEBSOCKET);
DefaultTransportRequest request2 = createTransportRequest(this.xhrTransport, TransportType.XHR_STREAMING);
request1.setFallbackRequest(request2);
request1.setTimeoutScheduler(scheduler);
request1.addTimeoutTask(sessionCleanupTask);
request1.connect(null, this.connectFuture);
assertTrue(this.webSocketTransport.invoked());
assertFalse(this.xhrTransport.invoked());
// Get and invoke the scheduled timeout task
ArgumentCaptor<Runnable> taskCaptor = ArgumentCaptor.forClass(Runnable.class);
verify(scheduler).schedule(taskCaptor.capture(), any(Date.class));
verifyNoMoreInteractions(scheduler);
taskCaptor.getValue().run();
assertTrue(this.xhrTransport.invoked());
verify(sessionCleanupTask).run();
}
| [
"Qing.Mi@my.cityu.edu.hk"
] | Qing.Mi@my.cityu.edu.hk |
4d2a83aa81987697c40b9660d9802e6c9eaf6f3b | ec5ee0c75640206efcb7f7bc4a3f46f0a55b7652 | /src/main/java/com/bitmovin/api/sdk/model/InputFactorBitrate.java | 63b39d1428cb856c9f1764be4e4a92d3c5560f82 | [
"MIT"
] | permissive | mcherif/bitmovinexp | eb831c18b041c9c86f6d9520b1028dc9b2ea72f6 | d4d746794f26c8e9692c834e63d5d19503693bbf | refs/heads/main | 2023-04-30T08:14:33.171375 | 2021-05-11T11:19:04 | 2021-05-11T11:19:04 | 368,218,598 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,037 | java | package com.bitmovin.api.sdk.model;
import java.util.Objects;
import java.util.Arrays;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
/**
* InputFactorBitrate
*/
public class InputFactorBitrate {
@JsonProperty("value")
private Long value;
@JsonProperty("factor")
private BigDecimal factor;
/**
* Get value
* @return value
*/
public Long getValue() {
return value;
}
/**
* Set value
*
* @param value
*/
public void setValue(Long value) {
this.value = value;
}
/**
* Get factor
* @return factor
*/
public BigDecimal getFactor() {
return factor;
}
/**
* Set factor
*
* @param factor
*/
public void setFactor(BigDecimal factor) {
this.factor = factor;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InputFactorBitrate inputFactorBitrate = (InputFactorBitrate) o;
return Objects.equals(this.value, inputFactorBitrate.value) &&
Objects.equals(this.factor, inputFactorBitrate.factor);
}
@Override
public int hashCode() {
return Objects.hash(value, factor);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InputFactorBitrate {\n");
sb.append(" value: ").append(toIndentedString(value)).append("\n");
sb.append(" factor: ").append(toIndentedString(factor)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"openapi@bitmovin.com"
] | openapi@bitmovin.com |
771708dc3b09077b7a59a75cf8e7c038c9923edd | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/com/tencent/mapsdk/internal/rc$b.java | c206d97b509763596197a59ded6803b7912b4ad9 | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 1,345 | java | package com.tencent.mapsdk.internal;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import com.tencent.matrix.trace.core.AppMethodBeat;
import java.lang.ref.WeakReference;
final class rc$b
extends Handler
{
WeakReference<rc> a;
public rc$b(rc paramrc)
{
super(Looper.myLooper());
AppMethodBeat.i(222588);
this.a = new WeakReference(paramrc);
AppMethodBeat.o(222588);
}
public final void handleMessage(Message paramMessage)
{
AppMethodBeat.i(222601);
super.handleMessage(paramMessage);
rc localrc = (rc)this.a.get();
if ((localrc != null) && (paramMessage.what != 0))
{
String str = (String)paramMessage.obj;
int i = paramMessage.arg2;
if (paramMessage.arg1 > 0)
{
if (i > 0)
{
kh.b("TDL", "循环刷新[" + str + "]次数[" + i + "]");
rc.a(localrc, str);
}
paramMessage.arg2 = (i + 1);
paramMessage = Message.obtain(paramMessage);
sendMessageDelayed(paramMessage, paramMessage.arg1);
}
}
AppMethodBeat.o(222601);
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes10.jar
* Qualified Name: com.tencent.mapsdk.internal.rc.b
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
470d434140bbf063fcb4a63cd9063405728de083 | 3b6a37e4ce71f79ae44d4b141764138604a0f2b9 | /phloc-commons/src/main/java/com/phloc/commons/text/resolve/IEnumTextResolver.java | 994c0b4c7143c2f8a8f2ace162190ef1ccf7663f | [
"Apache-2.0"
] | permissive | lsimons/phloc-schematron-standalone | b787367085c32e40d9a4bc314ac9d7927a5b83f1 | c52cb04109bdeba5f1e10913aede7a855c2e9453 | refs/heads/master | 2021-01-10T21:26:13.317628 | 2013-09-13T12:18:02 | 2013-09-13T12:18:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,345 | java | /**
* Copyright (C) 2006-2013 phloc systems
* http://www.phloc.com
* office[at]phloc[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.phloc.commons.text.resolve;
import java.util.Locale;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.phloc.commons.text.ITextProvider;
/**
* Base interface for an enum-based text resolver.
*
* @author Philip Helger
*/
public interface IEnumTextResolver
{
/**
* Get the text of an enumeration item.
*
* @param aEnum
* The enumeration item to get the unique ID of. May not be
* <code>null</code>.
* @param aTP
* The text provider containing the text. May not be <code>null</code>.
* @param aContentLocale
* The locale to be used. May not be <code>null</code>.
* @return <code>null</code> if no text could be resolved.
*/
@Nullable
String getText (@Nonnull Enum <?> aEnum, @Nonnull ITextProvider aTP, @Nonnull Locale aContentLocale);
/**
* Get the text of an enumeration item with placeholder texts being replaced.
*
* @param aEnum
* The enumeration item to get the unique ID of. May not be
* <code>null</code>.
* @param aTP
* The text provider containing the text. May not be <code>null</code>.
* @param aContentLocale
* The locale to be used. May not be <code>null</code>.
* @param aArgs
* The arguments to be added into the string. May be <code>null</code>
* but this makes no sense.
* @return <code>null</code> if no text could be resolved.
*/
@Nullable
String getTextWithArgs (@Nonnull Enum <?> aEnum,
@Nonnull ITextProvider aTP,
@Nonnull Locale aContentLocale,
@Nullable Object... aArgs);
}
| [
"mail@leosimons.com"
] | mail@leosimons.com |
a5ce8d43b8c8c68d40f2afcc73479e4f351f27a2 | 3be48e98cb9166a59ea27f9fee476971c9a1d561 | /dunwu-tool/dunwu-tool-core/src/main/java/io/github/dunwu/tool/bean/copier/ValueProvider.java | 70d37448f936345e257e3e0ebe868594f88a597b | [
"Apache-2.0"
] | permissive | zm79287/dunwu | 1f2978f24b2aa03d217261e59b1da7f4181e8d8c | 2f603a786b082ea7eb29b164469f2ce0c13021aa | refs/heads/master | 2020-11-26T19:50:29.242259 | 2019-12-12T12:43:05 | 2019-12-12T12:43:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,237 | java | package io.github.dunwu.tool.bean.copier;
import io.github.dunwu.tool.convert.Convert;
import java.lang.reflect.Type;
/**
* 值提供者,用于提供Bean注入时参数对应值得抽象接口<br> 继承或匿名实例化此接口<br> 在Bean注入过程中,Bean获得字段名,通过外部方式根据这个字段名查找相应的字段值,然后注入Bean<br>
*
* @param <T> KEY类型,一般情况下为 {@link String}
* @author Looly
*/
public interface ValueProvider<T> {
/**
* 获取值<br> 返回值一般需要匹配被注入类型,如果不匹配会调用默认转换 {@link Convert#convert(Type, Object)}实现转换
*
* @param key Bean对象中参数名
* @param valueType 被注入的值得类型
* @return 对应参数名的值
*/
Object value(T key, Type valueType);
/**
* 是否包含指定KEY,如果不包含则忽略注入<br> 此接口方法单独需要实现的意义在于:有些值提供者(比如Map)key是存在的,但是value为null,此时如果需要注入这个null,需要根据此方法判断
*
* @param key Bean对象中参数名
* @return 是否包含指定KEY
*/
boolean containsKey(T key);
}
| [
"forbreak@163.com"
] | forbreak@163.com |
eba879d0d16945b180d55cc4e326035c329e00ce | 2deb74d5bf569bdbe637846d93fac47c01b278a4 | /org/apache/http/client/NonRepeatableRequestException.java | 3b3e692bbc6c7d0cbb687461093946e9b9a20810 | [] | no_license | isabella232/android-sdk-sources-for-api-level-11 | 8aefeff38cbc0bbe7cfbbd04a940f8c4aa319772 | d772b816a1e388a5f8022d4bc47adc9016195600 | refs/heads/master | 2023-03-16T14:08:07.661845 | 2015-07-03T11:17:32 | 2015-07-03T11:17:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 595 | java | /* */ package org.apache.http.client;
/* */
/* */ import org.apache.http.ProtocolException;
/* */
/* */ public class NonRepeatableRequestException extends ProtocolException
/* */ {
/* */ public NonRepeatableRequestException()
/* */ {
/* 5 */ throw new RuntimeException("Stub!"); }
/* 6 */ public NonRepeatableRequestException(String message) { throw new RuntimeException("Stub!");
/* */ }
/* */ }
/* Location: D:\xyh\Android_3.0\android.jar
* Qualified Name: org.apache.http.client.NonRepeatableRequestException
* JD-Core Version: 0.6.0
*/ | [
"root@ifeegoo.com"
] | root@ifeegoo.com |
5f2b2466208bef63bb1808617b0537716724ec89 | a859faf58d6dd481c6bea6e49779a25feb99b4da | /src/info/guardianproject/bouncycastle/crypto/ExtendedDigest.java | 578783b32c441dd1a4810d83a0d3dff5c2bd1c43 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | gsathya/Gibberbot | 9d27ca0b4ec0e2e7e031f8c0ed00f20d77b36377 | cec5514e7a9902b01e0d28674b4bbe2a2433ece0 | refs/heads/master | 2021-01-16T20:13:53.350841 | 2011-03-17T00:26:14 | 2011-03-17T00:26:14 | 1,422,149 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 333 | java | package info.guardianproject.bouncycastle.crypto;
public interface ExtendedDigest
extends Digest
{
/**
* Return the size in bytes of the internal buffer the digest applies it's compression
* function to.
*
* @return byte length of the digests internal buffer.
*/
public int getByteLength();
}
| [
"nathan@freitas.net"
] | nathan@freitas.net |
8f0911ef207ea51aafd7524656f0906ecbfeeefd | 227d2fd22d00a259b6997cd38e9eabeed829fd71 | /mPOS/src/main/java/com/synature/mpos/datasource/table/ProgramFeatureTable.java | f6393ed39c5a1a8bec324c0cc572b03a99d61814 | [] | no_license | Synature-Jitthapong/myrepo_m_v1 | 7b51703b372c67c0954652197ecacc92fd4a2070 | 622284aff2965e52b4a55a030a09d2539469335f | refs/heads/master | 2020-05-21T22:28:24.403403 | 2016-07-21T02:23:34 | 2016-07-21T02:23:34 | 30,963,282 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,077 | java | package com.synature.mpos.datasource.table;
import android.database.sqlite.SQLiteDatabase;
public class ProgramFeatureTable {
public static final String PROGRAM_FEATURE_TABLE = "ProgramFeature";
public static final String COLUMN_FEATURE_ID = "feature_id";
public static final String COLUMN_FEATURE_NAME = "feature_name";
public static final String COLUMN_FEATURE_VALUE = "feature_value";
public static final String COLUMN_FEATURE_TEXT = "feature_text";
public static final String COLUMN_FEATURE_DESC = "feature_desc";
private static final String SQL_CREATE =
"create table " + PROGRAM_FEATURE_TABLE + " ("
+ COLUMN_FEATURE_ID + " integer, "
+ COLUMN_FEATURE_NAME + " text, "
+ COLUMN_FEATURE_VALUE + " integer default 0, "
+ COLUMN_FEATURE_TEXT + " text, "
+ COLUMN_FEATURE_DESC + " text);";
public static void onCreate(SQLiteDatabase db) {
db.execSQL(SQL_CREATE);
}
public static void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("drop table if exists " + PROGRAM_FEATURE_TABLE);
onCreate(db);
}
}
| [
"jitthapong@synaturegroup.com"
] | jitthapong@synaturegroup.com |
a264fceb0beaba75de1325a0310a01742d8c7bf2 | ff5bf30242ff444d41cfeb257d4914bb38905b2e | /rule-api/src/main/java/com/android/ide/common/api/Rect.java | 88c04a6971ce991ed24acedc17f3e5c8730bea03 | [
"Apache-2.0"
] | permissive | yydcdut/android_tools_base | 3163a50a163072a7d16b284c1acadd3825e9f3a2 | 6e2ee9ad8a0aeff3231f9937e46cc663aa2a64c5 | refs/heads/mm | 2020-12-11T06:13:32.955263 | 2015-10-20T02:05:33 | 2015-10-20T02:05:33 | 53,823,438 | 12 | 3 | null | 2016-03-14T03:16:15 | 2016-03-14T03:16:15 | null | UTF-8 | Java | false | false | 6,796 | java | /*
* Copyright (C) 2009 The Android Open Source Project
*
* Licensed under the Eclipse Public License, Version 1.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.eclipse.org/org/documents/epl-v10.php
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.ide.common.api;
import com.android.annotations.NonNull;
import com.android.annotations.Nullable;
import com.google.common.annotations.Beta;
/**
* Mutable rectangle bounds.
* <p/>
* To be valid, w >= 1 and h >= 1.
* By definition:
* - right side = x + w - 1.
* - bottom side = y + h - 1.
* <p>
* <b>NOTE: This is not a public or final API; if you rely on this be prepared
* to adjust your code for the next tools release.</b>
* </p>
*/
@Beta
public class Rect {
public int x, y, w, h;
/** Initialize an invalid rectangle. */
public Rect() {
}
/** Initialize rectangle to the given values. They can be invalid. */
public Rect(int x, int y, int w, int h) {
set(x, y, w, h);
}
/** Initialize rectangle to the given values. They can be invalid. */
public Rect(@NonNull Rect r) {
set(r);
}
/** Initialize rectangle to the given values. They can be invalid. */
@NonNull
public Rect set(int x, int y, int w, int h) {
this.x = x;
this.y = y;
this.w = w;
this.h = h;
return this;
}
/** Initialize rectangle to match the given one. */
@NonNull
public Rect set(@NonNull Rect r) {
set(r.x, r.y, r.w, r.h);
return this;
}
/** Returns a new instance of a rectangle with the same values. */
@NonNull
public Rect copy() {
return new Rect(x, y, w, h);
}
/** Returns true if the rectangle has valid bounds, i.e. w>0 and h>0. */
public boolean isValid() {
return w > 0 && h > 0;
}
/** Returns true if the rectangle contains the x,y coordinates, borders included. */
public boolean contains(int x, int y) {
return isValid()
&& x >= this.x
&& y >= this.y
&& x < (this.x + this.w)
&& y < (this.y + this.h);
}
/**
* Returns true if this rectangle intersects the given rectangle.
* Two rectangles intersect if they overlap.
* @param other the other rectangle to test
* @return true if the two rectangles overlap
*/
public boolean intersects(@Nullable Rect other) {
if (other == null) {
return false;
}
if (x2() <= other.x
|| other.x2() <= x
|| y2() <= other.y
|| other.y2() <= y) {
return false;
}
return true;
}
/** Returns true if the rectangle fully contains the given rectangle */
public boolean contains(@Nullable Rect rect) {
return rect != null && x <= rect.x
&& y <= rect.y
&& x2() >= rect.x2()
&& y2() >= rect.y2();
}
/** Returns true if the rectangle contains the x,y coordinates, borders included. */
public boolean contains(@Nullable Point p) {
return p != null && contains(p.x, p.y);
}
/**
* Moves this rectangle by setting it's x,y coordinates to the new values.
* @return Returns self, for chaining.
*/
@NonNull
public Rect moveTo(int x, int y) {
this.x = x;
this.y = y;
return this;
}
/**
* Offsets this rectangle by adding the given x,y deltas to the x,y coordinates.
* @return Returns self, for chaining.
*/
@NonNull
public Rect offsetBy(int x, int y) {
this.x += x;
this.y += y;
return this;
}
@NonNull
public Point getCenter() {
return new Point(x + (w > 0 ? w / 2 : 0),
y + (h > 0 ? h / 2 : 0));
}
@NonNull
public Point getTopLeft() {
return new Point(x, y);
}
@NonNull
public Point getBottomLeft() {
return new Point(x,
y + (h > 0 ? h : 0));
}
@NonNull
public Point getTopRight() {
return new Point(x + (w > 0 ? w : 0),
y);
}
@NonNull
public Point getBottomRight() {
return new Point(x + (w > 0 ? w : 0),
y + (h > 0 ? h : 0));
}
/**
* Returns the X coordinate of the right hand side of the rectangle
*
* @return the X coordinate of the right hand side of the rectangle
*/
public int x2() {
return x + w;
}
/**
* Returns the Y coordinate of the bottom of the rectangle
*
* @return the Y coordinate of the bottom of the rectangle
*/
public int y2() {
return y + h;
}
/**
* Returns the X coordinate of the center of the rectangle
*
* @return the X coordinate of the center of the rectangle
*/
public int centerX() {
return x + w / 2;
}
/**
* Returns the Y coordinate of the center of the rectangle
*
* @return the Y coordinate of the center of the rectangle
*/
public int centerY() {
return y + h / 2;
}
@Override
public String toString() {
return String.format("Rect [(%d,%d)-(%d,%d): %dx%d]", x, y, x + w, y + h, w, h);
}
@Override
public boolean equals(Object obj) {
if (obj instanceof Rect) {
Rect rhs = (Rect) obj;
// validity must be equal on both sides.
if (isValid() != rhs.isValid()) {
return false;
}
// an invalid rect is equal to any other invalid rect regardless of coordinates
if (!isValid() && !rhs.isValid()) {
return true;
}
return this.x == rhs.x && this.y == rhs.y && this.w == rhs.w && this.h == rhs.h;
}
return false;
}
@Override
public int hashCode() {
int hc = x;
hc ^= ((y >> 8) & 0x0FFFFFF) | ((y & 0x00000FF) << 24);
hc ^= ((w >> 16) & 0x000FFFF) | ((w & 0x000FFFF) << 16);
hc ^= ((h >> 24) & 0x00000FF) | ((h & 0x0FFFFFF) << 8);
return hc;
}
/**
* Returns the center point in the rectangle
*
* @return the center point in the rectangle
*/
@NonNull
public Point center() {
return new Point(x + w / 2, y + h / 2);
}
}
| [
"tnorbye@google.com"
] | tnorbye@google.com |
fceb0a8ad1897feb65b2e5f3ccb2275f0b60af5f | 4e8d52f594b89fa356e8278265b5c17f22db1210 | /WebServiceArtifacts/wstHotel/wst/hotel/types/DisponibilidadEstanciaResponseRowType.java | 7975c67c13e715578ad3ff55044e16385ffbc4c3 | [] | no_license | ouniali/WSantipatterns | dc2e5b653d943199872ea0e34bcc3be6ed74c82e | d406c67efd0baa95990d5ee6a6a9d48ef93c7d32 | refs/heads/master | 2021-01-10T05:22:19.631231 | 2015-05-26T06:27:52 | 2015-05-26T06:27:52 | 36,153,404 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 6,362 | java |
package wst.hotel.types;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for disponibilidadEstanciaResponseRowType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="disponibilidadEstanciaResponseRowType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="refSer" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
* <element name="nomHot" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="zonaGeografica" type="{types.hotel.wst}zonaType" minOccurs="0"/>
* <element name="catHot" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="pvpMin" type="{http://www.w3.org/2001/XMLSchema}float" minOccurs="0"/>
* <element name="habitacionesPrecios" type="{types.hotel.wst}habitacionesPreciosType" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "disponibilidadEstanciaResponseRowType", propOrder = {
"refSer",
"nomHot",
"zonaGeografica",
"catHot",
"pvpMin",
"habitacionesPrecios"
})
public class DisponibilidadEstanciaResponseRowType {
@XmlElementRef(name = "refSer", namespace = "types.hotel.wst", type = JAXBElement.class, required = false)
protected JAXBElement<Integer> refSer;
@XmlElementRef(name = "nomHot", namespace = "types.hotel.wst", type = JAXBElement.class, required = false)
protected JAXBElement<String> nomHot;
@XmlElementRef(name = "zonaGeografica", namespace = "types.hotel.wst", type = JAXBElement.class, required = false)
protected JAXBElement<ZonaType> zonaGeografica;
@XmlElementRef(name = "catHot", namespace = "types.hotel.wst", type = JAXBElement.class, required = false)
protected JAXBElement<String> catHot;
@XmlElementRef(name = "pvpMin", namespace = "types.hotel.wst", type = JAXBElement.class, required = false)
protected JAXBElement<Float> pvpMin;
@XmlElement(required = true)
protected List<HabitacionesPreciosType> habitacionesPrecios;
/**
* Gets the value of the refSer property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link Integer }{@code >}
*
*/
public JAXBElement<Integer> getRefSer() {
return refSer;
}
/**
* Sets the value of the refSer property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link Integer }{@code >}
*
*/
public void setRefSer(JAXBElement<Integer> value) {
this.refSer = value;
}
/**
* Gets the value of the nomHot property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getNomHot() {
return nomHot;
}
/**
* Sets the value of the nomHot property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setNomHot(JAXBElement<String> value) {
this.nomHot = value;
}
/**
* Gets the value of the zonaGeografica property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link ZonaType }{@code >}
*
*/
public JAXBElement<ZonaType> getZonaGeografica() {
return zonaGeografica;
}
/**
* Sets the value of the zonaGeografica property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link ZonaType }{@code >}
*
*/
public void setZonaGeografica(JAXBElement<ZonaType> value) {
this.zonaGeografica = value;
}
/**
* Gets the value of the catHot property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getCatHot() {
return catHot;
}
/**
* Sets the value of the catHot property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setCatHot(JAXBElement<String> value) {
this.catHot = value;
}
/**
* Gets the value of the pvpMin property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link Float }{@code >}
*
*/
public JAXBElement<Float> getPvpMin() {
return pvpMin;
}
/**
* Sets the value of the pvpMin property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link Float }{@code >}
*
*/
public void setPvpMin(JAXBElement<Float> value) {
this.pvpMin = value;
}
/**
* Gets the value of the habitacionesPrecios 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 habitacionesPrecios property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getHabitacionesPrecios().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link HabitacionesPreciosType }
*
*
*/
public List<HabitacionesPreciosType> getHabitacionesPrecios() {
if (habitacionesPrecios == null) {
habitacionesPrecios = new ArrayList<HabitacionesPreciosType>();
}
return this.habitacionesPrecios;
}
}
| [
"ouni_ali@yahoo.fr"
] | ouni_ali@yahoo.fr |
61ebb2310f7fc15ff1a83bfaefd808bd86cf3696 | c5897412513ac63e0388f387d5438e98a78638e3 | /src/java/jsfshop/dao/UsersFavoritsTbl.java | 6ad7458d8109d9ff843f5aae3565683326586585 | [] | no_license | JavaGostaran/jsfshop | ce0ef48e5a1e9510360034b975b993d9bb64d0f0 | 3b9821ec7b65a9bfb2f0163c2cf049b0f105dc70 | refs/heads/master | 2021-01-09T06:09:59.606947 | 2017-02-04T19:47:07 | 2017-02-04T19:47:07 | 80,929,723 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,271 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package jsfshop.dao;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author j2ee1
*/
@Entity
@Table(name = "UsersFavoritsTbl")
@XmlRootElement
@NamedQueries(
{
@NamedQuery(name = "UsersFavoritsTbl.findAll", query = "SELECT u FROM UsersFavoritsTbl u"),
@NamedQuery(name = "UsersFavoritsTbl.findById", query = "SELECT u FROM UsersFavoritsTbl u WHERE u.id = :id")
})
public class UsersFavoritsTbl implements Serializable
{
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id")
private Long id;
@JoinColumn(name = "user_USERID", referencedColumnName = "USERID")
@ManyToOne(optional = false)
private User userUSERID;
@JoinColumn(name = "ProductTbl_idProduct", referencedColumnName = "idProduct")
@ManyToOne
private ProductTbl productTblidProduct;
@JoinColumn(name = "FavoritsType_idFavoritsType", referencedColumnName = "idFavoritsType")
@ManyToOne
private FavoritsType favoritsTypeidFavoritsType;
public UsersFavoritsTbl()
{
}
public UsersFavoritsTbl(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setId(Long id)
{
this.id = id;
}
public User getUserUSERID()
{
return userUSERID;
}
public void setUserUSERID(User userUSERID)
{
this.userUSERID = userUSERID;
}
public ProductTbl getProductTblidProduct()
{
return productTblidProduct;
}
public void setProductTblidProduct(ProductTbl productTblidProduct)
{
this.productTblidProduct = productTblidProduct;
}
public FavoritsType getFavoritsTypeidFavoritsType()
{
return favoritsTypeidFavoritsType;
}
public void setFavoritsTypeidFavoritsType(FavoritsType favoritsTypeidFavoritsType)
{
this.favoritsTypeidFavoritsType = favoritsTypeidFavoritsType;
}
@Override
public int hashCode()
{
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object)
{
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof UsersFavoritsTbl))
{
return false;
}
UsersFavoritsTbl other = (UsersFavoritsTbl) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)))
{
return false;
}
return true;
}
@Override
public String toString()
{
return "jsfshop.dao.UsersFavoritsTbl[ id=" + id + " ]";
}
}
| [
"mohammad.ghasemy@gmail.com"
] | mohammad.ghasemy@gmail.com |
94980a79f4ba654e9e69038200f02c38f35ae46e | ba67c4b992a1143a88b1a8952bad5f2375bc7805 | /FtcXtensible/src/main/java/org/ftccommunity/ftcxtensible/dagger/ReflectionUtilities.java | 27ee8daf7e5b4b22a87c6804ca0f04ba4cf8109a | [] | no_license | dmssargent/Xtensible-ftc_app | e07ae414b954cde42792b7d7a886d8e1b36c6e4a | b071355be7ce4a73d0f4cbb14e35bc6f93b5feff | refs/heads/master | 2020-05-21T03:13:29.023863 | 2016-10-23T21:19:30 | 2016-10-23T21:19:30 | 42,372,567 | 4 | 7 | null | 2016-02-21T02:16:17 | 2015-09-12T20:49:55 | Java | UTF-8 | Java | false | false | 3,535 | java | /*
* Copyright © 2016 David Sargent
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package org.ftccommunity.ftcxtensible.dagger;
import android.util.Log;
import org.jetbrains.annotations.Contract;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import static com.google.common.base.Preconditions.checkNotNull;
public final class ReflectionUtilities {
public static boolean isParent(Class<?> klazz, Class<?> testParent) {
List<Class> candidates = new LinkedList<>();
testParent = checkNotNull(testParent, "testParent is null");
candidates.add(checkNotNull(klazz, "klazz is null").getSuperclass());
candidates.addAll(Arrays.asList(klazz.getInterfaces()));
if (candidates.size() == 1) {
Class candidate = candidates.get(0);
Log.d(ReflectionUtilities.class.getSimpleName(), "Comparing " + klazz.getSimpleName() + " with " + testParent.getSimpleName());
if (candidate == null) {
return false;
} else if (testParent.equals(klazz)) {
return true;
} else if (klazz.equals(Object.class)) {
return false;
} else if (isParent(candidate, testParent)) {
return true;
}
} else {
if (!klazz.equals(Object.class) && candidates.contains(Object.class)) {
candidates.remove(Object.class);
}
for (Class<?> candidate : candidates) {
Log.d(ReflectionUtilities.class.getSimpleName(), "Comparing " + klazz.getSimpleName() + " with " + testParent.getSimpleName());
if (candidate == null) {
continue;
}
if (candidate.equals(testParent)) {
return true;
} else if (isParent(candidate, testParent)) {
return true;
}
}
}
return false;
}
public static boolean hasMethodAnnotationsOf(Class<? extends Annotation> annotation, Class<?> forThis) {
for (Method method : forThis.getMethods()) {
if (method.isAnnotationPresent(annotation)) {
return true;
}
}
return false;
}
@Contract(value = "null -> true; !null -> false", pure = true)
static <T> boolean isNull(T instance) {
return instance == null;
}
}
| [
"dmssargent@yahoo.com"
] | dmssargent@yahoo.com |
8f185b1b111c4c26eec0d68726b23f338569673c | 09c8f18c43b2debebe727ef182e805e670c7a9be | /seven/bookProvider/src/main/java/com/sun/book/repository/BooksMapper.java | 884b01e268064da5ec2dd2b5da856593c0b5163a | [] | no_license | charlidsun/learing | e5db40be67455a3c9b87fd3068128c980c83861c | 589045095d15f609c64decfde67ba9a82ae755ec | refs/heads/master | 2022-12-23T11:23:09.018410 | 2019-06-03T14:45:54 | 2019-06-03T14:45:54 | 139,830,888 | 0 | 0 | null | 2022-12-15T23:38:26 | 2018-07-05T10:02:43 | CSS | UTF-8 | Java | false | false | 859 | java | package com.sun.book.repository;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.sun.book.domain.Books;
/**
* 功能:
* 说明:
* @author 孙荆阁:
* @Date 2018年7月21日 下午1:32:09
*/
@Mapper
public interface BooksMapper{
@Select({
"<script>",
"SELECT bo.* FROM dic_book bo LEFT JOIN rel_book_categories bo_ca ON bo_ca.book_id = bo.id where bo.lock=0 ",
"<when test='categoriesId != 0'>",
"and bo_ca.categories_id =${categoriesId}",
"</when>",
"</script>"})
public List<Books> getBooksByCategories(@Param("categoriesId") int categoriesId);
@Select("select bo.* form dic_book bo where bo.id=${id}")
public Books getBooksById(@Param("id") Integer id);
}
| [
"yulinsunjingge@gmail.com"
] | yulinsunjingge@gmail.com |
e8b8718a6698ee41cf94df3111dacbff7900560a | 802eca2658af4041612621210937f88a71cec965 | /src/main/java/ee/seesoon/beerapp/repository/BeerRepository.java | e8fa24f030c68a284c7d8596d2ea685002068598 | [] | no_license | Hargreave/beer-test-app | bc8eebcc012b7dd2dd50043f0b9f98ac2ee94bdd | b536c2ce83d98a05973f04ccc9e33a963c79b134 | refs/heads/main | 2023-02-25T14:43:41.344354 | 2021-02-01T18:31:13 | 2021-02-01T18:31:13 | 329,725,327 | 0 | 0 | null | 2021-02-01T18:31:14 | 2021-01-14T20:21:55 | Java | UTF-8 | Java | false | false | 345 | java | package ee.seesoon.beerapp.repository;
import ee.seesoon.beerapp.domain.Beer;
import org.springframework.data.jpa.repository.*;
import org.springframework.stereotype.Repository;
/**
* Spring Data repository for the Beer entity.
*/
@SuppressWarnings("unused")
@Repository
public interface BeerRepository extends JpaRepository<Beer, Long> {}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
6dd892313358436afc4ecb0a19767010bf87d1e8 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/7/7_9e1580de8e479e9cbb5cb32887c624f4aaedea4d/ChooseLockPatternExample/7_9e1580de8e479e9cbb5cb32887c624f4aaedea4d_ChooseLockPatternExample_s.java | 7a47198ac4a643ae87616aa3a806261d16ec1452 | [] | 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,213 | java | /*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.settings;
import android.app.Activity;
import android.content.Intent;
import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.widget.ImageView;
public class ChooseLockPatternExample extends Activity implements View.OnClickListener {
private static final long START_DELAY = 1000;
protected static final String TAG = "Settings";
private View mNextButton;
private View mSkipButton;
private View mImageView;
private AnimationDrawable mAnimation;
private Handler mHandler = new Handler();
private Runnable mRunnable = new Runnable() {
public void run() {
startAnimation(mAnimation);
}
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.choose_lock_pattern_example);
initViews();
}
@Override
protected void onResume() {
super.onResume();
mHandler.postDelayed(mRunnable, START_DELAY);
}
@Override
protected void onPause() {
super.onPause();
stopAnimation(mAnimation);
}
public void onClick(View v) {
if (v == mSkipButton) {
// Canceling, so finish all
setResult(ChooseLockPattern.RESULT_FINISHED);
finish();
} else if (v == mNextButton) {
stopAnimation(mAnimation);
Intent intent = new Intent(this, ChooseLockPattern.class);
intent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
startActivity(intent);
finish();
}
}
private void initViews() {
mNextButton = findViewById(R.id.next_button);
mNextButton.setOnClickListener(this);
mSkipButton = findViewById(R.id.skip_button);
mSkipButton.setOnClickListener(this);
mImageView = (ImageView) findViewById(R.id.lock_anim);
mImageView.setBackgroundResource(R.drawable.lock_anim);
mImageView.setOnClickListener(this);
mAnimation = (AnimationDrawable) mImageView.getBackground();
}
protected void startAnimation(final AnimationDrawable animation) {
if (animation != null && !animation.isRunning()) {
animation.run();
}
}
protected void stopAnimation(final AnimationDrawable animation) {
if (animation != null && animation.isRunning()) animation.stop();
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
0f85094a73e33897d9696e1533a1bd9b7a0a3127 | bf7b4c21300a8ccebb380e0e0a031982466ccd83 | /middlewareConcepts2014-master/Assignment3/lib/jacorb-3.4/src/generated/org/omg/Security/Role.java | 9d2e90a0811dc1db1a5604638f84a349d0c156f8 | [] | no_license | Puriakshat/Tuberlin | 3fe36b970aabad30ed95e8a07c2f875e4912a3db | 28dcf7f7edfe7320c740c306b1c0593a6c1b3115 | refs/heads/master | 2021-01-19T07:30:16.857479 | 2014-11-06T18:49:16 | 2014-11-06T18:49:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 213 | java | package org.omg.Security;
/**
* Generated from IDL const "Role".
*
* @author JacORB IDL compiler V @project.version@
* @version generated at 27-May-2014 20:14:30
*/
public interface Role
{
int value = 5;
}
| [
"puri.akshat@gmail.com"
] | puri.akshat@gmail.com |
a9f7f32b7e531b66c31e721a56095507e1d4a540 | 1f32d84bbcad4f6ee4555a5c911fece8fcc61fe1 | /src/main/java/com/edao/codes/codec/md5/MD5Coder.java | 8c7368d497ca35abfd1a62bc83dcb914666ef4d2 | [] | no_license | elevendao/jdao | 13c946ed0641c67a5e7364dbc06388e2bff11dd4 | ca3dce2e4786ae6ff92df933b2f6a5a594fb4831 | refs/heads/master | 2021-01-18T13:03:19.815552 | 2017-03-09T13:36:28 | 2017-03-09T13:36:28 | 84,333,741 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,028 | java | package com.edao.codes.codec.md5;
import java.math.BigInteger;
import java.security.MessageDigest;
public class MD5Coder {
public static final String KEY_MD5 = "MD5";
/**
* @param args
* @throws Exception
*/
public static void main(String[] args) throws Exception {
// String inputStr = "����";
// System.err.println("ԭ��:\n" + inputStr);
//
// byte[] inputData = inputStr.getBytes();
// byte[] code = MD5Coder.encryptMD5(inputData);
// BigInteger md5 = new BigInteger(MD5Coder.encryptMD5(inputData));
// System.out.println(md5);
StringBuffer valueHex = new StringBuffer();
byte re = -128;
int tmp = re & 0xff;
valueHex.append(tmp);
System.out.println(valueHex.toString());
}
public static byte[] encryptMD5(byte[] data) throws Exception {
MessageDigest md5 = MessageDigest.getInstance(KEY_MD5);
md5.update(data);
return md5.digest();
}
}
| [
"liushuai2005@gmail.com"
] | liushuai2005@gmail.com |
7da1c40e5183b69344b449f710f7c272616ad51e | 5786b8c28f069ae9b9b7f850edf4d4c1b5cf976c | /languages/CSharp/source_gen/CSharp/editor/Identifier_17_Editor.java | 30a7f83cd0d6e41e631dde96a3827049b0ca6c71 | [
"Apache-2.0"
] | permissive | vaclav/MPS_CSharp | 681ea277dae2e7503cd0f2d21cb3bb7084f6dffc | deea11bfe3711dd241d9ca3f007b810d574bae76 | refs/heads/master | 2021-01-13T14:36:41.949662 | 2019-12-03T15:26:21 | 2019-12-03T15:26:21 | 72,849,927 | 19 | 5 | null | null | null | null | UTF-8 | Java | false | false | 1,245 | java | package CSharp.editor;
/*Generated by MPS */
import jetbrains.mps.nodeEditor.DefaultNodeEditor;
import jetbrains.mps.openapi.editor.cells.EditorCell;
import jetbrains.mps.openapi.editor.EditorContext;
import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.nodeEditor.cells.EditorCell_Collection;
import jetbrains.mps.nodeEditor.cells.EditorCell_Constant;
public class Identifier_17_Editor extends DefaultNodeEditor {
public EditorCell createEditorCell(EditorContext editorContext, SNode node) {
return this.createCollection_aeiinc_a(editorContext, node);
}
private EditorCell createCollection_aeiinc_a(EditorContext editorContext, SNode node) {
EditorCell_Collection editorCell = EditorCell_Collection.createIndent2(editorContext, node);
editorCell.setCellId("Collection_aeiinc_a");
editorCell.setBig(true);
editorCell.addEditorCell(this.createConstant_aeiinc_a0(editorContext, node));
return editorCell;
}
private EditorCell createConstant_aeiinc_a0(EditorContext editorContext, SNode node) {
EditorCell_Constant editorCell = new EditorCell_Constant(editorContext, node, "let");
editorCell.setCellId("Constant_aeiinc_a0");
editorCell.setDefaultText("");
return editorCell;
}
}
| [
"vaclav.pech@gmail.com"
] | vaclav.pech@gmail.com |
24a5bbeaa90c549a0c7bde2353d56f2e58ca3d84 | bb07201c25c20a393b12f2fd2b71b5a0b0ed4caa | /AGACEApp/FIS-DAO/src/main/java/mx/gob/sat/siat/feagace/modelo/dao/catalogos/insumos/FececPrioridadDao.java | 6f3607d640f9033efc8feef8ef9e261c265141e7 | [] | no_license | xtaticzero/AGACEApp | cff6187bfd3656519ba4429af39545e6ba236589 | 9c29cd6c2d559827aed99edf02121e626db46ccb | refs/heads/master | 2020-07-19T18:35:14.882685 | 2018-03-19T23:49:51 | 2018-03-19T23:49:51 | 73,757,634 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 330 | java | package mx.gob.sat.siat.feagace.modelo.dao.catalogos.insumos;
import java.math.BigDecimal;
import java.util.List;
import mx.gob.sat.siat.feagace.modelo.dto.catalogos.insumos.FececPrioridad;
public interface FececPrioridadDao {
List<FececPrioridad> findAll();
List<FececPrioridad> findActivos(BigDecimal idGeneral);
}
| [
"emmanuel.estrada@stksat.com"
] | emmanuel.estrada@stksat.com |
09f0b1acce6339e2ea34c923a4e706f963e4520b | 0c9eaa659567d2e037a586f8ad9a3464638c3d07 | /app/src/main/java/com/example/anwesh/graderimpl/SqliteDbConnector.java | 39eec9da4372eda36aeb9142e3d4dbceff047d44 | [] | no_license | Anwesh43/GliderImpl | e7295589e638c0cb16d4e27613dafff07485bcd6 | 22d0b922b60b2e3de9b386abbdbcb0d2fe3c8207 | refs/heads/master | 2020-05-20T01:15:17.523194 | 2015-03-15T08:37:37 | 2015-03-15T08:37:37 | 32,229,855 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,386 | java | package com.example.anwesh.graderimpl;
/**
* Created by Anwesh on 14-03-2015.
*/
import android.content.*;
import android.database.*;
import android.database.sqlite.SQLiteDatabase;
import java.util.*;
public class SqliteDbConnector {
SqlHelper sqlHelper;
SQLiteDatabase db;
public SqliteDbConnector(Context context) {
sqlHelper = new SqlHelper(context);
}
public void open() {
db = sqlHelper.getWritableDatabase();
}
public void close() {
db.close();
}
public int fetchHighestScore() {
Cursor cursor = db.query(sqlHelper.tableName,new String[]{"score"},null,null,null,null,null);
int score = -1;
ArrayList<Integer> scores = new ArrayList<Integer>();
cursor.moveToFirst();
while(!cursor.isAfterLast()) {
scores.add(cursor.getInt(0));
cursor.moveToNext();
}
if(scores.size()!=0) {
score = scores.get(0);
}
return score;
}
public void insert(int score) {
ContentValues cv = new ContentValues();
cv.put("score",score);
db.insert(sqlHelper.tableName,null,cv);
}
public void update(int score) {
ContentValues cv = new ContentValues();
cv.put("score",score);
db.update(sqlHelper.tableName,cv,null,null);
}
}
| [
"anweshthecool0@gmail.com"
] | anweshthecool0@gmail.com |
877d9550a9eabdce457c9bf6d831eb705014e60f | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Chart/5/org/jfree/data/xy/DefaultHighLowDataset_getY_179.java | 0c590439a6bec7f5e891a745e6466306fb1aa22f | [] | 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 | 814 | java |
org jfree data
simpl implement link ohlc dataset ohlcdataset
link default ohlc dataset defaultohlcdataset implement
similar
default high low dataset defaulthighlowdataset abstract dataset abstractxydataset
return item seri
method link dataset xydataset map
link close getclosevalu method
param seri seri base index
param item item base index
getyvalu
number geti seri item
close getclos seri item
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
cc2b39235c39e87a5a7f7a2da2ba3335758e95bb | 96c989a3c6c7fbd10d2bf8e94cb0eb62ce0fe560 | /src/main/java/org/rest/common/event/ResourceCreatedEvent.java | 7032eb1bcd13f3b9976659cedd0b1fcbe1518199 | [
"MIT"
] | permissive | vargar2/REST | 25becc52d9809a5a2c0db8e5fd42580da6f105ca | 1a1883d74b1b452043d8ef5dc657628ec0cf0f4c | refs/heads/master | 2021-01-20T23:09:48.983228 | 2012-03-09T14:51:35 | 2012-03-09T14:51:35 | 3,680,117 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,358 | java | package org.rest.common.event;
import java.io.Serializable;
import javax.servlet.http.HttpServletResponse;
import org.springframework.context.ApplicationEvent;
import org.springframework.web.util.UriComponentsBuilder;
import com.google.common.base.Preconditions;
public final class ResourceCreatedEvent< T extends Serializable > extends ApplicationEvent{
private final long idOfNewResource;
private final HttpServletResponse response;
private final UriComponentsBuilder uriBuilder;
public ResourceCreatedEvent( final Class< T > clazz, final UriComponentsBuilder uriBuilderToSet, final HttpServletResponse responseToSet, final long idOfNewResourceToSet ){
super( clazz );
Preconditions.checkNotNull( uriBuilderToSet );
Preconditions.checkNotNull( responseToSet );
Preconditions.checkNotNull( idOfNewResourceToSet );
this.uriBuilder = uriBuilderToSet;
this.response = responseToSet;
this.idOfNewResource = idOfNewResourceToSet;
}
//
public final UriComponentsBuilder getUriBuilder(){
return this.uriBuilder;
}
public final HttpServletResponse getResponse(){
return this.response;
}
public final long getIdOfNewResource(){
return this.idOfNewResource;
}
@SuppressWarnings( "unchecked" )
public final Class< T > getClazz(){
return (Class< T >) getSource();
}
}
| [
"hanriseldon@gmail.com"
] | hanriseldon@gmail.com |
9c3c11c77c265774986f83d15aebe9681740f3b2 | f4fd782488b9cf6d99d4375d5718aead62b63c69 | /com/planet_ink/coffee_mud/Commands/NOMXP.java | 8b9b9bfab30e0430a75212ee159a21bf3ef79d30 | [
"Apache-2.0"
] | permissive | sfunk1x/CoffeeMud | 89a8ca1267ecb0c2ca48280e3b3930ee1484c93e | 0ac2a21c16dfe3e1637627cb6373d34615afe109 | refs/heads/master | 2021-01-18T11:20:53.213200 | 2015-09-17T19:16:30 | 2015-09-17T19:16:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,586 | java | package com.planet_ink.coffee_mud.Commands;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2005-2015 Bo Zimmerman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@SuppressWarnings("rawtypes")
public class NOMXP extends StdCommand
{
public NOMXP(){}
private final String[] access=I(new String[]{"NOMXP"});
@Override public String[] getAccessWords(){return access;}
@Override
public boolean execute(MOB mob, Vector commands, int metaFlags)
throws java.io.IOException
{
if(!mob.isMonster())
{
if((mob.isAttribute(MOB.Attrib.MXP))
||(mob.session().getClientTelnetMode(Session.TELNET_MXP)))
{
if(mob.session().getClientTelnetMode(Session.TELNET_MXP))
mob.session().rawOut("\033[3z \033[7z");
mob.setAttribute(MOB.Attrib.MXP,false);
mob.session().changeTelnetMode(Session.TELNET_MXP,false);
mob.session().setClientTelnetMode(Session.TELNET_MXP,false);
mob.tell(L("MXP codes are disabled.\n\r"));
}
else
mob.tell(L("MXP codes are already disabled.\n\r"));
}
return false;
}
@Override public boolean canBeOrdered(){return true;}
@Override public boolean securityCheck(MOB mob){return super.securityCheck(mob)&&(!CMSecurity.isDisabled(CMSecurity.DisFlag.MXP));}
}
| [
"bo@zimmers.net"
] | bo@zimmers.net |
e854805d339096032907828c211a6a574d03615f | fa98b943f13ebbaf4e1b6f0cfdc64c95281b35ca | /ha-root/src/main/java/jp/co/ha/root/type/RootRoleType.java | 6ddcd73e2074cacfab73d0efec4650390fc3f66b | [] | no_license | kohei-okazaki/work-3g | e6f68b85443002face236a8b5b917063a7d714c6 | 62e30889f462f3abad0b4f9df186fa70d18aa211 | refs/heads/master | 2023-07-24T12:34:05.355446 | 2023-01-08T12:33:35 | 2023-01-08T12:33:35 | 128,875,758 | 23 | 4 | null | 2023-07-11T00:42:52 | 2018-04-10T04:55:59 | Java | UTF-8 | Java | false | false | 948 | java | package jp.co.ha.root.type;
import jp.co.ha.common.type.BaseEnum;
/**
* ユーザ権限の列挙体
* <ul>
* <li>00:管理者権限</li>
* <li>01:照会権限</li>
* <li>02:作成権限</li>
* </ul>
*
* @version 1.0.0
*/
public enum RootRoleType implements BaseEnum {
/** 管理者権限 */
ADMIN("00"),
/** 照会権限 */
REF("01"),
/** 作成権限 */
ENTRY("02");
/** 値 */
private String value;
/**
* コンストラクタ
*
* @param value
* 値
*/
private RootRoleType(String value) {
this.value = value;
}
@Override
public String getValue() {
return this.value;
}
/**
* ユーザ権限の列挙体を返す
*
* @param value
* 値
* @return ユーザ権限の列挙体
*/
public static RootRoleType of(String value) {
return BaseEnum.of(RootRoleType.class, value);
}
}
| [
"kou1210hei@gmail.com"
] | kou1210hei@gmail.com |
e786b37aa6773a54d2f4c891c294d775a385ad9d | d8ba950c2dc94f6459bb36bffca7a1e0337ae194 | / alarmproj --username namucoo/AlarmProj/src/CosEventChannelAdmin/TypeErrorHelper.java | 51e1b81b419d000ddd06ef5fb223199b0829b33f | [] | no_license | aalzehla/alarmproj | 7160f4d467fa25d99b168daff6ae6ce6bc527688 | 56cb94f937dcc968dc56c25830d28ef84ee729ee | refs/heads/master | 2021-05-28T22:35:22.864182 | 2009-09-03T01:11:04 | 2009-09-03T01:11:04 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 2,160 | java | package CosEventChannelAdmin;
/**
* CosEventChannelAdmin/TypeErrorHelper.java .
* 由 IDL-to-Java 编译器(可移植),版本 "3.2" 生成
* 来自 CosEventChannelAdmin.idl
* 2009年9月2日 星期三 下午02时44分57秒 CST
*/
abstract public class TypeErrorHelper
{
private static String _id = "IDL:omg.org/CosEventChannelAdmin/TypeError:1.0";
public static void insert (org.omg.CORBA.Any a, CosEventChannelAdmin.TypeError that)
{
org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
a.type (type ());
write (out, that);
a.read_value (out.create_input_stream (), type ());
}
public static CosEventChannelAdmin.TypeError extract (org.omg.CORBA.Any a)
{
return read (a.create_input_stream ());
}
private static org.omg.CORBA.TypeCode __typeCode = null;
private static boolean __active = false;
synchronized public static org.omg.CORBA.TypeCode type ()
{
if (__typeCode == null)
{
synchronized (org.omg.CORBA.TypeCode.class)
{
if (__typeCode == null)
{
if (__active)
{
return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
}
__active = true;
org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [0];
org.omg.CORBA.TypeCode _tcOf_members0 = null;
__typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (CosEventChannelAdmin.TypeErrorHelper.id (), "TypeError", _members0);
__active = false;
}
}
}
return __typeCode;
}
public static String id ()
{
return _id;
}
public static CosEventChannelAdmin.TypeError read (org.omg.CORBA.portable.InputStream istream)
{
CosEventChannelAdmin.TypeError value = new CosEventChannelAdmin.TypeError ();
// read and discard the repository ID
istream.read_string ();
return value;
}
public static void write (org.omg.CORBA.portable.OutputStream ostream, CosEventChannelAdmin.TypeError value)
{
// write the repository ID
ostream.write_string (id ());
}
}
| [
"namucoo@c1366bf0-8e60-11de-b0c3-d3322c7aa8e4"
] | namucoo@c1366bf0-8e60-11de-b0c3-d3322c7aa8e4 |
01114327c3b3f219c7e68ec8755be8280d1a808e | fe4cb27db6bbba7ea81da9c6a16032ae28acaf8f | /OldFrame_Week2Demo/src/main/java/com/example/oldframe_week2demo/utils/AbstractObserver.java | a331c14f667fcc3af638ddf21ff931609441312b | [] | no_license | 1657895829/Fresco-MVP-RecyclerView_NewOrOldFrame | 3db8d7fc621e833fcddad9c9d2ea53595e920ade | 94427d12d5c031ce73b54e54c7b63e71609e9892 | refs/heads/master | 2020-03-18T03:20:28.943928 | 2018-05-22T07:36:53 | 2018-05-22T07:36:53 | 134,235,764 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,514 | java | package com.example.oldframe_week2demo.utils;
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;
/**
* Observer被观察者泛型类
*/
public abstract class AbstractObserver<T> implements Observer<String> {
public abstract void onSuccess(T t);
/**
* 1 当前 网络异常
* 2 json 解析异常
* 2 未知异常
*/
public abstract void onFailure(Exception e);
@Override
public void onSubscribe(Disposable d) {
}
//数据接收的成功执行
@Override
public void onNext(String result) {
try {
Type type = getClass().getGenericSuperclass() ;
Type [] types = ((ParameterizedType)type).getActualTypeArguments() ;
Class clazz = (Class) types[0] ;
Gson gson = new Gson();
T t = (T) gson.fromJson(result,clazz);
onSuccess(t);
} catch (JsonSyntaxException e) {
e.printStackTrace();
onFailure(e);
}catch (Exception e){
e.printStackTrace();
onFailure(e);
}
}
//数据接收失败时异常错误的执行方法
@Override
public void onError(Throwable e) {
onFailure(new Exception(""));
System.out.println(e);
}
//事件完成时
@Override
public void onComplete() {
}
}
| [
"1657895829@qq.com"
] | 1657895829@qq.com |
03e375f59440fcc168cf82ca4b13944570759af2 | 133c9f7cac0e035a3a0d40bd92820507b779fe7a | /visitor/src/main/java/org/connectorio/helenus/visitor/core/TraversingVisitor.java | e417ca18338cbead726af473ddb09bd87e37a1cd | [] | no_license | Code-House/perseus | 8d7be0db66e1bec0df324f0aced5428664660c80 | 1717346d2c2efd0b32660e8a3b2c86493dd6072f | refs/heads/master | 2021-01-09T20:11:42.754730 | 2019-02-01T10:57:20 | 2019-02-01T10:57:20 | 65,853,726 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,105 | java | package org.connectorio.helenus.visitor.core;
import org.connectorio.helenus.api.Column;
import org.connectorio.helenus.api.Context;
import org.connectorio.helenus.api.Element;
import org.connectorio.helenus.api.Index;
import org.connectorio.helenus.api.column.CompoundColumn;
import org.connectorio.helenus.api.column.DelegateColumn;
import org.connectorio.helenus.visitor.ElementVisitor;
public class TraversingVisitor<C extends Context> implements ElementVisitor<C> {
private final ElementVisitor<C> delegate;
public TraversingVisitor(ElementVisitor<C> delegate) {
this.delegate = delegate;
}
@Override
public void visit(Element element) {
}
@Override
public void visit(Index index) {
}
@Override
public void visit(Column<C, ?> column) {
if (column instanceof DelegateColumn) {
visit(((DelegateColumn) column).getColumn());
} else if (column instanceof CompoundColumn) {
((CompoundColumn<C, ?>) column).getColumns().forEach(this::visit);
} else {
visit(column);
}
}
}
| [
"luke@code-house.org"
] | luke@code-house.org |
97f98385b8e341a3a1596f20557cec007b7efb2f | 66848c4e6efe821af2ae7e41435092f272725d61 | /src/com/agloco/service/CommonService.java | 75dc11cc8d7a24e0ed2dc2fc13a277588d06acdd | [] | no_license | harrysun2006/ag_Guest | 59168e01d23ed27bc50ce20e0ed57b1f66eff68a | 331ada157fe7487901e11bae2e6f859fb80e398b | refs/heads/master | 2021-01-01T06:33:07.027227 | 2014-09-03T10:58:39 | 2014-09-03T10:58:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,589 | java | package com.agloco.service;
import java.util.List;
import com.agloco.model.AGBadword;
import com.agloco.model.AGConfig;
import com.agloco.model.AGDictionary;
import com.agloco.model.AGDictionaryDetail;
import com.agloco.model.AGMailMessage;
import com.agloco.model.AdminLogConfig;
import com.agloco.service.impl.CommonServiceImpl;
/**
*
* @author terry_zhao
* @see CommonServiceImpl
*/
public interface CommonService extends BaseService {
public void addAGBadword(AGBadword agBadword);
public AGBadword getAGBadword(Long badwordId);
public void updateAGBadword(AGBadword agBadword);
public void deleteAGBadword(AGBadword agBadword);
public void addAGConfig(AGConfig agConfig);
public AGConfig getAGConfig(String configName,String companyId);
public void updateAGConfig(AGConfig agConfig);
public void deleteAGConfig(AGConfig agConfig);
public void addAGDictionary(AGDictionary agDictionary);
public AGDictionary getAGDictionary(Long dictionaryId);
public void updateAGDictionary(AGDictionary agDictionary);
public void deleteAGDictionary(AGDictionary agDictionary);
public void addAGDictionaryDetail(AGDictionaryDetail agDictionaryDetail);
public AGDictionaryDetail getAGDictionaryDetail(Long dictionaryDetailId);
public void updateAGDictionaryDetail(AGDictionaryDetail agDictionaryDetail);
public void deleteAGDictionaryDetail(AGDictionaryDetail agDictionaryDetail);
public List listAGBadword();
public List listAGConfig();
public List listAGDictionary();
public List listAGDictionary(String code);
public List listAGDictionaryModel(String code,String language,String country);
public List listAGDictionaryText(String code);
public List listAGDictionaryText(String code,String language,String country);
//add at 17/01/2007 by Terry
public void addAGMailMessage(AGMailMessage msg);
public void deleteAGMailMessage(AGMailMessage msg);
public List listAGMailMessage(int pageSize);
public int getAGMailMessageNumber();
//add at 29/01/2007 by Terry
public List listAGMailMessage(int pageNumber,int pageSize);
public AGMailMessage getAGMailMessage(Long id);
public void deleteAGMailMessage(Long[] ids);
// add at 12/02/2007
public void addAdminLogConfig(AdminLogConfig cfg);
public void updateAdminLogConfig(AdminLogConfig cfg);
public void deleteAdminLogConfig(AdminLogConfig cfg);
public AdminLogConfig getAdminLogConfig(Long id);
public AdminLogConfig getAdminLogConfig(String className, String method);
public List listAdminLogConfigMethods(String className);
}
| [
"harrysun2006@gmail.com"
] | harrysun2006@gmail.com |
59bed407928fe4701a38b032d758d4dba25f8831 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Lang/59/org/apache/commons/lang/math/NumberUtils_min_1247.java | 833c549dea1f7b7b4cbf21e5ce32d8fd33198c31 | [] | 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 | 2,127 | java |
org apach common lang math
extra function java number class
author href mailto rand mcneeli yahoo rand neeli mcneeli
author stephen colebourn
author href mailto steve downei netfolio steve downei
author eric pugh
author phil steitz
author matthew hawthorn
author href mailto ggregori seagullsw gari gregori
author href mailto fredrik westermarck fredrik westermarck
version
number util numberutil
minimum code code valu
code nan code code nan code
return infin handl
param
param
param
smallest valu
min
math min math min
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
e0f4aa05a5668e5c698ae5ae7804b2e02eab2032 | a72c559f74aeb6fde09c16210f03ec9626a9c590 | /gwt-bean-validators-restygwt-jaxrs/src/main/java/de/knightsoftnet/validators/shared/data/PhoneNumberDataWithFormats.java | c25bdfcaf96ca05afa3ddea53bde3e65d298d998 | [
"Apache-2.0"
] | permissive | ManfredTremmel/gwt-bean-validators | 4437b40f5987243af47124416ad661aa246ce6cf | fed075f8746efd471e0a486de5f9aafd5716bd29 | refs/heads/master | 2021-04-15T04:54:50.749984 | 2020-02-22T21:21:57 | 2020-02-22T21:21:57 | 28,275,474 | 32 | 6 | Apache-2.0 | 2020-02-22T21:21:22 | 2014-12-20T18:37:01 | Java | UTF-8 | Java | false | false | 4,584 | 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 de.knightsoftnet.validators.shared.data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.StringUtils;
import java.util.Objects;
/**
* phone number data including formated values.
*
* @author Manfred Tremmel
*
*/
@JsonFormat
public class PhoneNumberDataWithFormats extends PhoneNumberData {
private String din5008National;
private String din5008International;
private String e123National;
private String e123International;
private String url;
private String ms;
private String commonNational;
private String commonInternational;
/**
* default constructor.
*/
public PhoneNumberDataWithFormats() {
super();
}
/**
* constructor initializing fields.
*
* @param pcountryCode country code
* @param pareaCode area code
* @param plineNumber phone number
* @param pextension extension
*/
public PhoneNumberDataWithFormats(final String pcountryCode, final String pareaCode,
final String plineNumber, final String pextension) {
super(pcountryCode, pareaCode, plineNumber, pextension);
}
/**
* constructor initializing fields.
*
* @param pphoneNumber phone number data
*/
public PhoneNumberDataWithFormats(final PhoneNumberInterface pphoneNumber) {
super(pphoneNumber);
}
public final String getDin5008National() {
return din5008National;
}
public final void setDin5008National(final String pdin5008National) {
din5008National = pdin5008National;
}
public final String getDin5008International() {
return din5008International;
}
public final void setDin5008International(final String pdin5008International) {
din5008International = pdin5008International;
}
public final String getE123National() {
return e123National;
}
public final void setE123National(final String pe123National) {
e123National = pe123National;
}
public final String getE123International() {
return e123International;
}
public final void setE123International(final String pe123International) {
e123International = pe123International;
}
public final String getUrl() {
return url;
}
public final void setUrl(final String purl) {
url = purl;
}
public final String getMs() {
return ms;
}
public final void setMs(final String pms) {
ms = pms;
}
public final String getCommonNational() {
return commonNational;
}
public final void setCommonNational(final String pcommonNational) {
commonNational = pcommonNational;
}
public final String getCommonInternational() {
return commonInternational;
}
public final void setCommonInternational(final String pcommonInternational) {
commonInternational = pcommonInternational;
}
@Override
public int hashCode() {
return Objects.hash(commonInternational, commonNational, din5008International, din5008National,
e123International, e123National, ms, url);
}
@Override
public boolean equals(final Object pobj) {
if (this == pobj) {
return true;
}
if (!super.equals(pobj)) {
return false;
}
if (this.getClass() != pobj.getClass()) {
return false;
}
final PhoneNumberDataWithFormats other = (PhoneNumberDataWithFormats) pobj;
return StringUtils.equals(commonInternational, other.commonInternational)
&& StringUtils.equals(commonNational, other.commonNational)
&& StringUtils.equals(din5008International, other.din5008International)
&& StringUtils.equals(din5008National, other.din5008National)
&& StringUtils.equals(e123International, other.e123International)
&& StringUtils.equals(e123National, other.e123National) && StringUtils.equals(ms, other.ms)
&& StringUtils.equals(url, other.url);
}
}
| [
"Manfred.Tremmel@iiv.de"
] | Manfred.Tremmel@iiv.de |
7772958f6350de3f665eada327f372c0500308fe | c885ef92397be9d54b87741f01557f61d3f794f3 | /results/Chart-6/org.jfree.chart.util.ShapeList/BBC-F0-opt-100/tests/8/org/jfree/chart/util/ShapeList_ESTest_scaffolding.java | bca4dacd8d314bdea92d2c9a692288dac8952f27 | [
"CC-BY-4.0",
"MIT"
] | permissive | pderakhshanfar/EMSE-BBC-experiment | f60ac5f7664dd9a85f755a00a57ec12c7551e8c6 | fea1a92c2e7ba7080b8529e2052259c9b697bbda | refs/heads/main | 2022-11-25T00:39:58.983828 | 2022-04-12T16:04:26 | 2022-04-12T16:04:26 | 309,335,889 | 0 | 1 | null | 2021-11-05T11:18:43 | 2020-11-02T10:30:38 | null | UTF-8 | Java | false | false | 3,491 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Wed Oct 13 12:19:13 GMT 2021
*/
package org.jfree.chart.util;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class ShapeList_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.jfree.chart.util.ShapeList";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
/*No java.lang.System property to set*/
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ShapeList_ESTest_scaffolding.class.getClassLoader() ,
"org.jfree.chart.util.AbstractObjectList",
"org.jfree.chart.util.HashUtilities",
"org.jfree.chart.util.ObjectUtilities",
"org.jfree.chart.util.ShapeList"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ShapeList_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.jfree.chart.util.AbstractObjectList",
"org.jfree.chart.util.ShapeList",
"org.jfree.chart.util.SerialUtilities",
"org.jfree.chart.util.HashUtilities",
"org.jfree.chart.util.ObjectUtilities"
);
}
}
| [
"pderakhshanfar@serg2.ewi.tudelft.nl"
] | pderakhshanfar@serg2.ewi.tudelft.nl |
6678f56fdf4d8343102ad9b7736f524d430c6de3 | f70a61c454be09757309eb6817c289971dd50cef | /test-work/xmlparsehomework/src/com/example/xmlparsehomework/item.java | 93c5cb38769367f24bdea0b20e727ab19e6bbe6c | [] | no_license | ace0625/Android-work | 02cf8db7ed5fdc0df04fed0b6638b744feee9602 | 5c2491a0e5642294b9f764b80a7950bf9c428c3d | refs/heads/master | 2021-01-01T05:19:14.765823 | 2016-05-25T21:16:04 | 2016-05-25T21:16:04 | 59,698,057 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,111 | java | package com.example.xmlparsehomework;
import java.io.Serializable;
public class item implements Serializable {
/**
*
*/
private static final long serialVersionUID = 9217840541179729812L;
private String title;
private String count;
private String price;
private String image;
private String category;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getCount() {
return count;
}
public void setCount(String count) {
this.count = count;
}
public String getPrice() {
return price;
}
public void setPrice(String price) {
this.price = price;
}
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
@Override
public String toString() {
return "item [title=" + title + ", count=" + count + ", price=" + price
+ ", image=" + image + ", category=" + category + ", toString()="
+ super.toString() + "]";
}
}
| [
"hckim0625@gmail.com"
] | hckim0625@gmail.com |
e1c2a01fb9f2b36c16dffd5419af5fdbdb5f768c | e608c0f5cb090ebf6e62ebecae384c175f559f25 | /BaoQi/Android/BaoQi.PropertyInsurance/src/com/qingfengweb/baoqi/propertyInsurance/ext/LiYiListAdapter.java | 8e85d7e7829dda526d34497cb7985adf101e589e | [] | no_license | bestarandyan/Privateproject | 06a20a5245cd0040b1c1a84d1b34dd3e5f080989 | e41b1dd51df21cc3625d838790f53ff716fdafac | refs/heads/master | 2020-05-17T23:16:42.013950 | 2015-02-05T10:26:43 | 2015-02-05T10:26:43 | 30,349,991 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,501 | java | package com.qingfengweb.baoqi.propertyInsurance.ext;
import java.util.HashMap;
import java.util.List;
import com.qingfengweb.baoqi.propertyInsurance.R;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
public class LiYiListAdapter extends BaseAdapter {
private Context mContext=null;
private ViewHolder vh = null;
private List<HashMap<String, String>> list=null;
public LiYiListAdapter( Context montext, List<HashMap<String, String>> lists){
mContext=montext;
list=lists;
}
@Override
public int getCount() {
// TODO Auto-generated method stub
return list.size();
}
@Override
public Object getItem(int position) {
// TODO Auto-generated method stub
return list.get(position);
}
@Override
public long getItemId(int position) {
// TODO Auto-generated method stub
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
try {
if (convertView == null
|| (convertView != null && convertView.getTag() == null)) {
convertView = ((LayoutInflater) mContext
.getSystemService(Context.LAYOUT_INFLATER_SERVICE))
.inflate(R.layout.l_li_xian_1_item, null);
vh = new ViewHolder(convertView);
convertView.setTag(vh);
} else {
vh = (ViewHolder) convertView.getTag();
}
vh.setContent(list.get(position));
} catch (Exception e) {
e.printStackTrace();
}
return convertView;
}
private class ViewHolder {
private TextView
// t1,
t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12
,t13,t14,t15,t16,t17,t18,t19;
public ViewHolder(View layout) {
// t1=(TextView) layout.findViewById(R.id.t1);
t2=(TextView) layout.findViewById(R.id.t2);
t3=(TextView) layout.findViewById(R.id.t3);
t4=(TextView) layout.findViewById(R.id.t4);
t5=(TextView) layout.findViewById(R.id.t5);
t6=(TextView) layout.findViewById(R.id.t6);
t7=(TextView) layout.findViewById(R.id.t7);
t8=(TextView) layout.findViewById(R.id.t8);
t9=(TextView) layout.findViewById(R.id.t9);
t10=(TextView) layout.findViewById(R.id.t10);
t11=(TextView) layout.findViewById(R.id.t11);
t12=(TextView) layout.findViewById(R.id.t12);
t13=(TextView) layout.findViewById(R.id.t13);
t14=(TextView) layout.findViewById(R.id.t14);
t15=(TextView) layout.findViewById(R.id.t15);
t16=(TextView) layout.findViewById(R.id.t16);
t17=(TextView) layout.findViewById(R.id.t17);
t18=(TextView) layout.findViewById(R.id.t18);
t18=(TextView) layout.findViewById(R.id.t19);
}
public void setContent(HashMap<String, String> args) {
// t1.setText(args.get("t1").toString());
t2.setText(args.get("t2").toString());
t3.setText(args.get("t3").toString());
t4.setText(args.get("t4").toString());
t5.setText(args.get("t5").toString());
t6.setText(args.get("t6").toString());
t7.setText(args.get("t7").toString());
t8.setText(args.get("t8").toString());
t9.setText(args.get("t9").toString());
t10.setText(args.get("t10").toString());
t11.setText(args.get("t11").toString());
t12.setText(args.get("t12").toString());
t13.setText(args.get("t13").toString());
t14.setText(args.get("t14").toString());
t15.setText(args.get("t15").toString());
t16.setText(args.get("t16").toString());
t17.setText(args.get("t17").toString());
t18.setText(args.get("t18").toString());
t19.setText(args.get("t19").toString());
}
}
}
| [
"2238985517@qq.com"
] | 2238985517@qq.com |
e4337bca75a2f8ae6f17c85d3e560009cff2fa16 | 81d52386de544047c8c25bfd781c6b957031e149 | /gulimall-coupon/src/main/java/com/atguigu/gulimall/coupon/dao/CouponHistoryDao.java | 358167827d620161b00e55c77a38344772f0a082 | [] | no_license | Archer-Fang/gulimall | 0a707ad95b0343e6f352ead78e3c7c6316798d55 | a363e0f6f9cb3fa6decb92135f22ec4dd5888212 | refs/heads/main | 2023-06-02T03:00:53.487121 | 2021-06-20T03:39:08 | 2021-06-20T03:39:08 | 371,892,223 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 410 | java | package com.atguigu.gulimall.coupon.dao;
import com.atguigu.gulimall.coupon.entity.CouponHistoryEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 优惠券领取历史记录
*
* @author fzj
* @email 1091053002@qq.com
* @date 2021-06-02 22:18:43
*/
@Mapper
public interface CouponHistoryDao extends BaseMapper<CouponHistoryEntity> {
}
| [
"1091053002@qq.com"
] | 1091053002@qq.com |
be254de77207933e61ed75707f2971f829afd744 | d1a6d1e511df6db8d8dd0912526e3875c7e1797d | /genny_JavaWithoutLambdasApi21/applicationModule/src/main/java/applicationModulepackageJava19/Foo128.java | 1357a5fb4c4638dbd8d16d764b28a0f5902fc66d | [] | no_license | NikitaKozlov/generated-project-for-desugaring | 0bc1443ab3ddc84cd289331c726761585766aea7 | 81506b3711004185070ca4bb9a93482b70011d36 | refs/heads/master | 2020-03-20T00:35:06.996525 | 2018-06-12T09:30:37 | 2018-06-12T09:30:37 | 137,049,317 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 348 | java | package applicationModulepackageJava19;
public class Foo128 {
public void foo0() {
new applicationModulepackageJava19.Foo127().foo5();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
}
| [
"nikita.e.kozlov@gmail.com"
] | nikita.e.kozlov@gmail.com |
d251cbde7058b58421988d229a48bd85ae9fbf64 | 2f219b5a60919cb2ed92dfe4e147ad7dd40e42f9 | /S15_RMI/src/Ex17_3/shared/IStringChangingServer.java | 363278d6b7876fce07da5be2322006f134f9d385 | [] | no_license | KhaledHammoun/Second-semester | 6a440027ff3cc4078b74f04c5878a9c7b74e8c61 | d8d9628fa2de3d68933cfb5a12e83ba9fee5e551 | refs/heads/main | 2023-04-18T17:55:12.470383 | 2021-05-04T12:41:05 | 2021-05-04T12:41:05 | 337,375,515 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 254 | java | package Ex17_3.shared;
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface IStringChangingServer extends Remote
{
IToUpperCase getUpperCase() throws RemoteException;
IToRandomCase getRandomCase() throws RemoteException;
}
| [
"kh.hammoun@gmail.com"
] | kh.hammoun@gmail.com |
b5dd635d166e8fba02113c0e7055e53de951e24b | d72cdc4a0158ee3ecae5e1b2d9cdb9bb7e241763 | /tools/base/sdklib/src/main/java/com/android/sdklib/repository/local/LocalSourcePkgInfo.java | ba76620231dbedfeb4c2ec587f258979d3c3b3d9 | [
"Apache-2.0"
] | permissive | yanex/uast-lint-common | 700fc4ca41a3ed7d76cb33cab280626a0c9d717b | 34f5953acd5e8c0104bcc2548b2f2e3f5ab8c675 | refs/heads/master | 2021-01-20T18:08:31.404596 | 2016-06-08T19:58:58 | 2016-06-08T19:58:58 | 60,629,527 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,765 | java | /*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.sdklib.repository.local;
import com.android.annotations.NonNull;
import com.android.sdklib.AndroidVersion;
import com.android.repository.Revision;
import com.android.sdklib.repository.descriptors.IPkgDesc;
import com.android.sdklib.repository.descriptors.PkgDesc;
import java.io.File;
import java.util.Properties;
/**
* Local source package, for a given platform's {@link AndroidVersion}.
* The package itself has a major revision.
* There should be only one for a given android platform version.
*/
public class LocalSourcePkgInfo extends LocalPkgInfo {
@NonNull
private final IPkgDesc mDesc;
public LocalSourcePkgInfo(@NonNull LocalSdk localSdk,
@NonNull File localDir,
@NonNull Properties sourceProps,
@NonNull AndroidVersion version,
@NonNull Revision revision) {
super(localSdk, localDir, sourceProps);
mDesc = PkgDesc.Builder.newSource(version, revision).create();
}
@NonNull
@Override
public IPkgDesc getDesc() {
return mDesc;
}
}
| [
"yan.zhulanow@jetbrains.com"
] | yan.zhulanow@jetbrains.com |
d68e151c49c6468f70473f4122c826832711be02 | 21bcd1da03415fec0a4f3fa7287f250df1d14051 | /sources/com/google/android/gms/internal/measurement/C4694b2.java | 97842efe85fd5ab75a090330591c49f8fc5d029f | [] | no_license | lestseeandtest/Delivery | 9a5cc96bd6bd2316a535271ec9ca3865080c3ec8 | bc3fae8f30804a2520e6699df92c2e6a4a0a7cfc | refs/heads/master | 2022-04-24T12:14:22.396398 | 2020-04-25T21:50:29 | 2020-04-25T21:50:29 | 258,875,870 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 684 | java | package com.google.android.gms.internal.measurement;
import java.io.Serializable;
/* renamed from: com.google.android.gms.internal.measurement.b2 */
/* compiled from: com.google.android.gms:play-services-measurement-impl@@17.1.0 */
public abstract class C4694b2<T> implements Serializable {
C4694b2() {
}
/* renamed from: a */
public static <T> C4694b2<T> m19949a(T t) {
return new C4736e2(C4680a2.m19904a(t));
}
/* renamed from: e */
public static <T> C4694b2<T> m19950e() {
return C5069z1.f14554a;
}
/* renamed from: a */
public abstract boolean mo18861a();
/* renamed from: d */
public abstract T mo18862d();
}
| [
"zsolimana@uaedomain.local"
] | zsolimana@uaedomain.local |
e0836f8405a7471a2a0b7382dab90f8ee4a544f3 | 53490cd6c2bc40b9b9b9c120847545d712e3e0b5 | /myLibrary/src/com/fancyfamily/primarylibrary/commentlibrary/framework/base/IFragment.java | a110558d3e2175cb3feceaa2aebee0c4fef830b2 | [] | no_license | mmsouming/xingyaoyuedu | 2b0d6a3a2896976f6b47bfc912d948d8d6e8755d | 89bb6b5bde9ff056822de4fc053e0dd39b017804 | refs/heads/master | 2021-01-20T14:43:13.951202 | 2017-05-09T02:05:40 | 2017-05-09T02:05:40 | 90,652,064 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 785 | java |
package com.fancyfamily.primarylibrary.commentlibrary.framework.base;
import android.content.Context;
import android.content.Intent;
import android.os.Message;
import java.util.List;
/**
* 描述:Fragment抽象接口:拥有设置广播监听,刷新UI,处理广播三个功能
*
* @author zhj
*/
public interface IFragment {
/**
* 让子类设置广播的监听动作,手动调用(支持多次调用)
* @return
*/
void setUpActions(List<String> actions) ;
/**
* 刷新界面
*
* @param msg
*/
void handleUiMessage(Message msg);
/**
* 处理广播
*
* @param context
* @param intent
*/
void handleBroadCast(Context context, Intent intent);
}
| [
"382332658@qq.com"
] | 382332658@qq.com |
963b56d69b5991d2c5e72faf06e7f14be197657e | b7f30a0a657039d1c3610f50c60f739a9efbfad8 | /Java/examples/src/hipster/Person.java | b44576b3581160f9ea15b003c7d2eda854d5a424 | [] | no_license | SDP-SPIII-2020/sample-code | a454fbca21f3d114ded3b7e3131576b9d2fd9741 | 8b7629e76f267c6463857158b5dd9d3378877bfa | refs/heads/master | 2020-12-09T22:29:04.168028 | 2020-04-25T17:33:38 | 2020-04-25T17:33:38 | 233,433,462 | 3 | 4 | null | null | null | null | UTF-8 | Java | false | false | 639 | java | package hipster;
public class Person {
private String name;
public Person(String name) {
if (name == null || name.equals("")) {
throw new IllegalArgumentException("name can't be null or empty");
}
this.name = name;
}
public String getName() {
return name;
}
public String toString() {
return name;
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof Person)) {
return false;
}
Person that = (Person) other;
return this.name.equals(that.name);
}
public int hashCode() {
return name.hashCode();
}
}
| [
"keith@dcs.bbk.ac.uk"
] | keith@dcs.bbk.ac.uk |
60d30ee28fe36f5398209661d22ecd28335fdbfc | 2da87d8ef7afa718de7efa72e16848799c73029f | /ikep4-portal/src/test/java/com/lgcns/ikep4/portal/portlet/service/WeatherServiceTest.java | 7beecc7eebcd13f22683538ccb7643338dcb7041 | [] | no_license | haifeiforwork/ehr-moo | d3ee29e2cae688f343164384958f3560255e52b2 | 921ff597b316a9a0111ed4db1d5b63b88838d331 | refs/heads/master | 2020-05-03T02:34:00.078388 | 2018-04-05T00:54:04 | 2018-04-05T00:54:04 | 178,373,434 | 0 | 1 | null | 2019-03-29T09:21:01 | 2019-03-29T09:21:01 | null | UTF-8 | Java | false | false | 3,968 | java | package com.lgcns.ikep4.portal.portlet.service;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import com.lgcns.ikep4.portal.admin.screen.dao.PortalPageLayoutDao;
import com.lgcns.ikep4.portal.admin.screen.dao.PortalPortletConfigDao;
import com.lgcns.ikep4.portal.admin.screen.model.PortalPageLayout;
import com.lgcns.ikep4.portal.admin.screen.model.PortalPortletConfig;
import com.lgcns.ikep4.portal.admin.screen.service.BaseServiceTestCase;
import com.lgcns.ikep4.portal.portlet.model.Weather;
public class WeatherServiceTest extends BaseServiceTestCase {
private Weather weather;
private Weather updateWeather;
private PortalPortletConfig portalPortletConfig;
private PortalPageLayout portalPageLayout;
@Before
public void setUp() {
portalPageLayout = new PortalPageLayout();
portalPageLayout.setPageLayoutId("1");
portalPageLayout.setPageId("100000126387");
portalPageLayout.setLayoutId("100000000393");
portalPageLayout.setOwnerId("admin");
portalPageLayout.setColIndex(1);
portalPageLayout.setWidth(32.5);
portalPageLayout.setRegisterId("admin");
portalPageLayout.setRegisterName("관리자");
portalPageLayout.setUpdaterId("admin");
portalPageLayout.setUpdaterName("관리자");
portalPortletConfig = new PortalPortletConfig();
portalPortletConfig.setPortletConfigId("1");
portalPortletConfig.setColIndex(1);
portalPortletConfig.setPageLayoutId("1");
portalPortletConfig.setPortletId("100000713667");
portalPortletConfig.setRowIndex(1);
portalPortletConfig.setViewMode("NORMAL");
portalPortletConfig.setRegisterId("admin");
portalPortletConfig.setRegisterName("관리자");
portalPortletConfig.setUpdaterId("admin");
portalPortletConfig.setUpdaterName("관리자");
weather = new Weather();
weather.setPortletConfigId("1");
weather.setCityList("10,20");
weather.setRegisterId("admin");
weather.setRegisterName("관리자");
weather.setUpdaterId("admin");
weather.setUpdaterName("관리자");
updateWeather = new Weather();
updateWeather.setPortletConfigId("1");
updateWeather.setCityList("30,40");
updateWeather.setRegisterId("admin");
updateWeather.setRegisterName("관리자");
updateWeather.setUpdaterId("admin");
updateWeather.setUpdaterName("관리자");
}
@Autowired
private WeatherService weatherService;
@Autowired
private PortalPortletConfigDao portalPortletConfigDao;
@Autowired
private PortalPageLayoutDao portalPageLayoutDao;
@Test
public void testReadWeather() {
//페이지 레이아웃 생성
portalPageLayoutDao.createPageLayout(portalPageLayout);
//포틀릿 config 생성
portalPortletConfigDao.createPortletConfig(portalPortletConfig);
weatherService.createWeather(weather);
Weather result = weatherService.readWeather(weather.getPortletConfigId());
assertNotNull(result);
}
@Test
public void testCreateWeather() {
//페이지 레이아웃 생성
portalPageLayoutDao.createPageLayout(portalPageLayout);
//포틀릿 config 생성
portalPortletConfigDao.createPortletConfig(portalPortletConfig);
weatherService.createWeather(weather);
Weather result = weatherService.readWeather(weather.getPortletConfigId());
assertNotNull(result);
}
@Test
public void testUpdateWeather() {
//페이지 레이아웃 생성
portalPageLayoutDao.createPageLayout(portalPageLayout);
//포틀릿 config 생성
portalPortletConfigDao.createPortletConfig(portalPortletConfig);
weatherService.createWeather(weather);
updateWeather.setPortletConfigId(weather.getPortletConfigId());
weatherService.updateWeather(updateWeather);
Weather updateResult = weatherService.readWeather(updateWeather.getPortletConfigId());
assertEquals(updateWeather.getCityList(), updateResult.getCityList());
}
}
| [
"haneul9@gmail.com"
] | haneul9@gmail.com |
ec055b4cb1c274e73784ba27a36a40a75a667b47 | f55e0f08bbbbde3bbf06b83c822a93d54819b1e8 | /app/src/main/java/com/jqsoft/nursing/util/IdHelper.java | 43bb3676029ebdd42bc815ac90621d343a3196d9 | [] | no_license | moshangqianye/nursing | 27e58e30a51424502f1b636ae47b60b81a3b2ca0 | 20cd5aace59555ef9d708df0fb03639b2fc843d0 | refs/heads/master | 2020-09-08T13:39:55.939252 | 2020-03-20T09:55:34 | 2020-03-20T09:55:34 | 221,147,807 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,217 | java | package com.jqsoft.nursing.util;
import android.content.Context;
import java.lang.reflect.Field;
public class IdHelper {
public static int getLayout(Context context, String layoutName) {
return context.getResources().getIdentifier(layoutName, "layout",
context.getApplicationContext().getPackageName());
}
public static int getViewID(Context context, String IDName) {
return context.getResources().getIdentifier(IDName, "id",
context.getApplicationContext().getPackageName());
}
public static int getDrawable(Context context, String drawableName) {
return context.getResources().getIdentifier(drawableName, "drawable",
context.getApplicationContext().getPackageName());
}
public static int getAttr(Context context, String attrName) {
return context.getResources().getIdentifier(attrName, "attr",
context.getApplicationContext().getPackageName());
}
public static int getString(Context context, String stringName) {
return context.getResources().getIdentifier(stringName, "string",
context.getApplicationContext().getPackageName());
}
public static int getStyle(Context context, String styleName) {
return context.getResources().getIdentifier(styleName, "style",
context.getApplicationContext().getPackageName());
}
public static int[] getResourceDeclareStyleableIntArray(Context context, String name) {
try {
Field[] fields2 = Class.forName(context.getPackageName() + ".R$styleable").getFields();
//browse all fields
for (Field f : fields2) {
//pick matching field
if (f.getName().equals(name)) {
//return as int array
return (int[]) f.get(null);
}
}
} catch (Throwable t) {
t.printStackTrace();
}
return null;
}
public static int getAnim(Context context, String animName) {
return context.getResources().getIdentifier(animName, "anim",
context.getApplicationContext().getPackageName());
}
}
| [
"123456"
] | 123456 |
59f94c0224c22c1779a375ce3e5eecb2f4e700e3 | a7fa1c67a77110acc77fffe3694c172f0ef97d34 | /src/lexware/lexcraft/blocks/ores/YellowCrystalOre.java | 8ceb6e2ec966f9f40cc11d82fa02dfff1829a950 | [] | no_license | jamierocks/Lexcraft | cd4ca0a3b6cf466c194487683ec25a607e8f7d1a | 5aeb1c2383138a115650070658bea62168226d77 | refs/heads/master | 2021-01-18T14:53:52.308480 | 2013-11-09T20:11:31 | 2013-11-09T20:11:31 | 68,475,543 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,441 | java | package lexware.lexcraft.blocks.ores;
import java.util.Random;
import lexware.lexcraft.Lexcraft;
import lexware.lexcraft.util.Info;
import cpw.mods.fml.relauncher.*;
import net.minecraft.block.*;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.util.Icon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class YellowCrystalOre extends Block {
public YellowCrystalOre(int id, Material material) {
super(id, material);
this.setCreativeTab(Lexcraft.tabsLC);
}
public int idDropped(int par1, Random par2Random, int par3) {
return Lexcraft.yellowCrystal.itemID;
}
public int quantityDropped(Random rand) {
return 2 + rand.nextInt(2);
}
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister icon) {
this.blockIcon = icon.registerIcon(Info.modid + ":" + (this.getUnlocalizedName().substring(5)));
}
public void dropBlockAsItemWithChance(World world, int par2, int par3, int par4, int par5, float par6, int par7) {
super.dropBlockAsItemWithChance(world, par2, par3, par4, par5, par6, par7);
if(this.idDropped(par5, world.rand, par7) != this.blockID) {
int xp = 0;
xp = MathHelper.getRandomIntegerInRange(world.rand, 2, 12);
this.dropXpOnBlockBreak(world, par2, par3, par4, xp);
}
}
} | [
"dev@jamierocks.uk"
] | dev@jamierocks.uk |
610030a854e771e19f7ef2409597287c13b9c4a2 | ce558269daa9bdb6dd8d0b970e52196af00a0f5f | /src/main/java/cc/mrbird/system/service/impl/RoleMenuServiceImpl.java | 3dc91a5c5eb2b1679d7ff14311d3c36ec64f5bc0 | [
"MIT"
] | permissive | Andrewi-GaoGuanWe/FEBS-Shiro-test | c06e3693de50b64fce81882e835ca2e0394e3d60 | b2ea3ed802b5d22cf30d78d66e1bb7008afc0a89 | refs/heads/mysql | 2022-09-10T03:00:58.151417 | 2019-06-18T10:56:39 | 2019-06-18T10:56:39 | 194,886,139 | 2 | 0 | MIT | 2022-09-01T23:09:24 | 2019-07-02T15:05:13 | Java | UTF-8 | Java | false | false | 1,016 | java | package cc.mrbird.system.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 cc.mrbird.common.service.impl.BaseService;
import cc.mrbird.system.domain.RoleMenu;
import cc.mrbird.system.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);
}
}
| [
"852252810@qq.com"
] | 852252810@qq.com |
2e702902dd16d343b81db5a3a364e91cc35e9705 | 76b78f72f961182417fdf311048811d603256044 | /spring-in-action-chart-three/src/main/java/work/lishubin/spring/in/action/three/config/qualifier/Man.java | 6ec37522f7d86813292b07e0c20f93a5930716fe | [
"Apache-2.0"
] | permissive | Lishubin939/Spring-In-Actioon | acd0f967edeed3949b708f3e17eaa48ca83f4152 | 0af60ab3d5aa68b5613e9411a3175ba02110cf8f | refs/heads/master | 2020-04-25T07:32:33.974485 | 2019-03-26T16:14:55 | 2019-03-26T16:14:55 | 172,617,366 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 555 | java | package work.lishubin.spring.in.action.three.config.qualifier;
import org.springframework.beans.factory.annotation.Qualifier;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author 李树彬
* @date 2019/3/26 23:50
*/
@Target({
ElementType.CONSTRUCTOR,ElementType.FIELD,
ElementType.ANNOTATION_TYPE,ElementType.TYPE,ElementType.METHOD
})
@Retention(RetentionPolicy.RUNTIME)
@Qualifier
public @interface Man {
}
| [
"="
] | = |
aa337b79b3c0a812a34513f55216a6ae46116c04 | 7d836fed6166db6fbce24d8fd5dedea112444afa | /src/main/java/it/zerono/mods/zerotest/common/block/ctx/OrnatedEmeraldBlock.java | 8150d531901be71e281194b674fbca45362e704a | [] | no_license | ZeroNoRyouki/ZeroTest | 1ac9676d2a38b2067d27d724537ddecce95c956f | 22b9f6eaa92b26d464944cf6f178f31139b2817b | refs/heads/master | 2021-01-20T20:38:46.670145 | 2016-07-26T21:36:10 | 2016-07-26T21:36:10 | 64,088,572 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,775 | java | package it.zerono.mods.zerotest.common.block.ctx;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import it.zerono.mods.zerocore.lib.BlockFacings;
import it.zerono.mods.zerocore.lib.PropertyBlockFacings;
import it.zerono.mods.zerotest.common.block.TestBlockBase;
public class OrnatedEmeraldBlock extends TestBlockBase {
public OrnatedEmeraldBlock(String blockName) {
super(blockName, Material.IRON);
this._actualFacings = new boolean[EnumFacing.VALUES.length];
this.setDefaultState(
this.blockState.getBaseState().withProperty(PropertyBlockFacings.FACINGS, PropertyBlockFacings.None)
);
}
@Override
public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos position) {
Block thisBlock = state.getBlock();
int len = EnumFacing.VALUES.length;
for (int i = 0; i < len; ++i) {
IBlockState neighbor = world.getBlockState(position.offset(EnumFacing.VALUES[i]));
this._actualFacings[i] = thisBlock == neighbor.getBlock();
}
BlockFacings facings = BlockFacings.from(this._actualFacings);
return state.withProperty(PropertyBlockFacings.FACINGS, facings.toProperty());
}
@Override
public int getMetaFromState(IBlockState state) {
return 0;
}
@Override
protected BlockStateContainer createBlockState() {
return new BlockStateContainer(this, PropertyBlockFacings.FACINGS);
}
private boolean[] _actualFacings;
}
| [
"zeronoryouki@gmail.com"
] | zeronoryouki@gmail.com |
1437116f454fb8805e5a1a698d1be3045e760351 | 34532bdaade86869bc68a14936438f2e3e574da0 | /src/main/java/com/sb2/demo/common/config/websocket/InMessage.java | 63c2c42b774151a6ce7dc19fd198ee35858c6fac | [] | no_license | 185594-5-27/spring-boot-2-demo | 281939e35859300022e11f131a0dd74df68308ab | 8e841f622fdf5d050c1a61a81c010bd96453a53b | refs/heads/master | 2020-03-11T18:01:40.684850 | 2018-05-10T08:32:09 | 2018-05-10T08:32:09 | 130,164,515 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 502 | java | package com.sb2.demo.common.config.websocket;
/**
* 消息接收实体
*/
public class InMessage {
private String name;
private String id;
public InMessage() {
}
public InMessage(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
}
| [
"282245889@qq.com"
] | 282245889@qq.com |
51cfee51f1b4914e7d7c241d12abcbffb95284cd | b59f5a4fa9c6151ee1f757a0d265543eea7331dc | /examples/fuml/language_workbench/org.modelexecution.xmof.examples.fuml.trace/src/fumlConfigurationTrace/Steps/FumlConfiguration_Actions_BasicActions_PinActivation_TakeOfferedTokens_PinActivation.java | d56b4d97c989636aae111501eefca48caa45ec4d | [] | no_license | vatmi/moliz.gemoc | a8b7a6ac5d7bafb6b331655010975f2a44206d95 | 471f3128608986ddee1a7c4722d3620446e3726d | refs/heads/master | 2020-03-30T23:32:19.818605 | 2017-10-20T09:20:17 | 2017-10-20T09:21:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,642 | java | /**
*/
package fumlConfigurationTrace.Steps;
import org.eclipse.gemoc.trace.commons.model.trace.SequentialStep;
import fumlConfigurationTrace.States.fumlConfiguration.Actions.BasicActions.TracedPinActivation;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Fuml Configuration Actions Basic Actions Pin Activation Take Offered Tokens Pin Activation</b></em>'.
* <!-- end-user-doc -->
*
*
* @see fumlConfigurationTrace.Steps.StepsPackage#getFumlConfiguration_Actions_BasicActions_PinActivation_TakeOfferedTokens_PinActivation()
* @model
* @generated
*/
public interface FumlConfiguration_Actions_BasicActions_PinActivation_TakeOfferedTokens_PinActivation extends FumlConfiguration_Activities_IntermediateActivities_ActivityNodeActivation_ReceiveOffer_ActivityNodeActivation_AbstractSubStep, FumlConfiguration_Actions_BasicActions_ActionActivation_TakeOfferedTokens_ActionActivation_AbstractSubStep, SpecificStep, SequentialStep<FumlConfiguration_Actions_BasicActions_PinActivation_TakeOfferedTokens_PinActivation_AbstractSubStep>, FumlConfiguration_Actions_BasicActions_ActionActivation_ShouldFireAgain_ActionActivation_AbstractSubStep {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @model kind="operation" required="true"
* annotation="http://www.eclipse.org/emf/2002/GenModel body='return (fumlConfigurationTrace.States.fumlConfiguration.Actions.BasicActions.TracedPinActivation) this.getMseoccurrence().getMse().getCaller();'"
* @generated
*/
TracedPinActivation getCaller();
} // FumlConfiguration_Actions_BasicActions_PinActivation_TakeOfferedTokens_PinActivation
| [
"ebousse@users.noreply.github.com"
] | ebousse@users.noreply.github.com |
3e409b7d82fc13c1301551ab1331672e21623e4a | a61848363d06fd0540066af5b82f956c1144bd1c | /supplier-framework/src/main/java/co/yixiang/framework/aspectj/DataSourceAspect.java | fc2faa5d8f0b36207b68d24e87fda21c75e4c908 | [
"MIT"
] | permissive | WingsII/supplierShop | 7bba4ef576ba7bdeb74d17d7e084cf201790c602 | d95d3b792a8ee4e4d4efa4234acd20da94bd3c2c | refs/heads/master | 2023-07-31T07:14:03.550065 | 2021-06-18T09:27:13 | 2021-06-18T09:27:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,152 | java | package co.yixiang.framework.aspectj;
import java.util.Objects;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import co.yixiang.common.annotation.DataSource;
import co.yixiang.common.config.datasource.DynamicDataSourceContextHolder;
import co.yixiang.common.utils.StringUtils;
/**
* 多数据源处理
*
* @author ruoyi
*/
@Aspect
@Order(1)
@Component
public class DataSourceAspect
{
protected Logger logger = LoggerFactory.getLogger(getClass());
@Pointcut("@annotation(co.yixiang.common.annotation.DataSource)"
+ "|| @within(co.yixiang.common.annotation.DataSource)")
public void dsPointCut()
{
}
@Around("dsPointCut()")
public Object around(ProceedingJoinPoint point) throws Throwable
{
DataSource dataSource = getDataSource(point);
if (StringUtils.isNotNull(dataSource))
{
DynamicDataSourceContextHolder.setDataSourceType(dataSource.value().name());
}
try
{
return point.proceed();
}
finally
{
// 销毁数据源 在执行方法之后
DynamicDataSourceContextHolder.clearDataSourceType();
}
}
/**
* 获取需要切换的数据源
*/
public DataSource getDataSource(ProceedingJoinPoint point)
{
MethodSignature signature = (MethodSignature) point.getSignature();
DataSource dataSource = AnnotationUtils.findAnnotation(signature.getMethod(), DataSource.class);
if (Objects.nonNull(dataSource))
{
return dataSource;
}
return AnnotationUtils.findAnnotation(signature.getDeclaringType(), DataSource.class);
}
}
| [
"guchengwuyue@163.com"
] | guchengwuyue@163.com |
2f80a946b3bb5c8a2913141a5b910efdd968b18d | 72a89c88fffad8e758451f1245e9688906274404 | /proj/corejava/src/main/java/interview/SplitInDifferentWays.java | 4318ba18371391e055d917d38a16f040ebb4e335 | [] | no_license | RavikrianGoru/dev-repo | 15c8f46d9154d3b7be413643751ce122586e50cf | 897a379235a93875e512eacd37139f62454de5ff | refs/heads/master | 2021-06-07T19:24:09.772506 | 2021-04-02T18:12:20 | 2021-04-02T18:12:20 | 102,496,972 | 0 | 3 | null | 2021-01-20T23:53:38 | 2017-09-05T15:14:29 | Java | UTF-8 | Java | false | false | 831 | java | package interview;
import java.util.StringTokenizer;
import java.util.regex.Pattern;
public class SplitInDifferentWays {
public static void main(String[] args) {
System.out.println("split(--) :String class: arg= regex");
String str="ravi kiran goru";
String[] stringArray=str.split("\\s");
for(String s:stringArray)
System.out.println(s);
System.out.println("split(--) :Pattern class: arg= Target String");
Pattern p=Pattern.compile("\\s");
stringArray=p.split("ravi kiran goru");
for(String s:stringArray)
System.out.println(s);
System.out.println("split(--) :StringTokenizer class: arg= Target String, regex");
StringTokenizer stringTokenizer=new StringTokenizer("ravi kiran goru"," ");
while(stringTokenizer.hasMoreTokens())
System.out.println(stringTokenizer.nextToken());
}
}
| [
"ravikirangoru@gmail.com"
] | ravikirangoru@gmail.com |
3b1a64c36bab181057c7eca1fa7d2688c8837a98 | ff0d23dcf25ea81f8c34fb3937f6e6a128635c78 | /src/example/showcase/client/src/main/java/org/tio/examples/showcase/client/handler/JoinGroupRespHandler.java | ec9ca0434840df5e0f1c3410d5a905d74d4df971 | [] | no_license | ChickenSeller/t-io | 7573d42a39fb3a583e4f5d565e749ff04ceb5579 | 3eb8191866fbb20912ff9d318a0ddb35050570fe | refs/heads/master | 2021-06-20T19:17:40.292720 | 2017-06-23T11:14:45 | 2017-06-23T11:14:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,663 | java | package org.tio.examples.showcase.client.handler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.tio.core.Aio;
import org.tio.core.ChannelContext;
import org.tio.examples.showcase.common.ShowcasePacket;
import org.tio.examples.showcase.common.ShowcaseSessionContext;
import org.tio.examples.showcase.common.intf.AbsShowcaseBsHandler;
import org.tio.examples.showcase.common.packets.JoinGroupRespBody;
import org.tio.json.Json;
/**
* @author tanyaowu
* 2017年3月27日 下午9:51:28
*/
public class JoinGroupRespHandler extends AbsShowcaseBsHandler<JoinGroupRespBody>
{
private static Logger log = LoggerFactory.getLogger(JoinGroupRespHandler.class);
/**
*
* @author: tanyaowu
*/
public JoinGroupRespHandler()
{
}
/**
* @param args
* @author: tanyaowu
*/
public static void main(String[] args)
{
}
/**
* @return
* @author: tanyaowu
*/
@Override
public Class<JoinGroupRespBody> bodyClass()
{
return JoinGroupRespBody.class;
}
/**
* @param packet
* @param bsBody
* @param channelContext
* @return
* @throws Exception
* @author: tanyaowu
*/
@Override
public Object handler(ShowcasePacket packet, JoinGroupRespBody bsBody, ChannelContext<ShowcaseSessionContext, ShowcasePacket, Object> channelContext) throws Exception
{
System.out.println("收到进群响应消息:" + Json.toJson(bsBody));
if (JoinGroupRespBody.Code.SUCCESS.equals(bsBody.getCode()) )
{
Aio.bindGroup(channelContext, bsBody.getGroup());
System.out.println("进入群组["+bsBody.getGroup()+"]成功");
}
return null;
}
}
| [
"tywo45@163.com"
] | tywo45@163.com |
dc3f221854321a3b6d9e550ff33920c2ddd5e638 | 8037278735b7daade0b8f13ca1dc731aff629327 | /src/main/java/cn/ximcloud/itsource/before/day13_abstact_and_interface/manager/AdminManager.java | 3f7920c34c208bb2387ea1e27b66e6d296652650 | [] | no_license | usami-muzugi/itsource | 1cc0cd07bc9b1a4e771a886df8ad04790970b318 | 2cd92335a8ed86d5831da72c431bbf9222edf424 | refs/heads/master | 2020-03-22T13:13:31.215302 | 2018-09-22T15:30:07 | 2018-09-22T15:30:07 | 140,092,256 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,900 | java | package cn.ximcloud.itsource.before.day13_abstact_and_interface.manager;
/**
* Created by IntelliJ IDEA.
* Student: wzard
* Date: 2018-06-24
* Time: 13:56
* ProjectName: ITSource
* To change this template use File | Settings | Editor | File and Code Templates.
* ////////////////////////////////////////////////////////////////////
* // _ooOoo_ //
* // o8888888o //
* // 88" . "88 //
* // (| ^_^ |) //
* // O\ = /O //
* // ____/`---'\____ //
* // .' \\| |// `. //
* // / \\||| : |||// \ //
* // / _||||| -:- |||||- \ //
* // | | \\\ - /// | | //
* // | \_| ''\---/'' | | //
* // \ .-\__ `-` ___/-. / //
* // ___`. .' /--.--\ `. . ___ //
* // ."" '< `.___\_<|>_/___.' >'"". //
* // | | : `- \`.;`\ _ /`;.`/ - ` : | | //
* // \ \ `-. \_ __\ /__ _/ .-` / / //
* // ========`-.____`-.___\_____/___.-`____.-'======== //
* // `=---=' //
* // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
* // 佛祖保佑 永无BUG 永不修改 //
* ////////////////////////////////////////////////////////////////////
**/
public class AdminManager {
}
| [
"715759898@qq.com"
] | 715759898@qq.com |
772c40b93244e1f6512ab5481f16a1a7297c9e89 | 9b8e92779d4389cbba602e46c9134dfd4043e266 | /core/gridarchitect/src/main/java/helper/IoHelper.java | 3c59a8b87517187bcc1bc584bfcb62a79c9b51e6 | [
"Apache-2.0"
] | permissive | lulzzz/SmartGridCoSimulation | 08b6a26b453a8079a5aaee7b09fa216beb9a10f4 | c8925bd157586c14b291a5280827abf4315d9080 | refs/heads/master | 2020-05-09T11:36:44.780678 | 2019-03-20T12:41:22 | 2019-03-20T12:41:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,853 | java | /*
* Copyright (c) 2011-2015, fortiss GmbH.
* Licensed under the Apache License, Version 2.0.
*
* Use, modification and distribution are subject to the terms specified
* in the accompanying license file LICENSE.txt located at the root directory
* of this software distribution.
*/
package helper;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Paths;
/**
* Helper class to streamline the used I/O operations.
*/
public class IoHelper {
public static void saveFileRelativePath(String filePath, String content) {
saveFile(GlobalOptions.rootFolderPath + filePath, content);
}
public static void saveFile(String absoluteFilePath, String content) {
if (!absoluteFilePath.contains(".")) throw new IllegalArgumentException("file is invalid: "+absoluteFilePath);
createParentFolders(absoluteFilePath);
try {
PrintWriter out = new PrintWriter(absoluteFilePath);
out.print(content);
out.close();
} catch (Exception e ) {
System.out.println(e);
}
}
public static void appendToFileRelativePath(String filePath, String content) {
appendToFile(GlobalOptions.rootFolderPath +filePath, content);
}
public static void appendToFile(String absoluteFilePath, String content) {
try {
FileWriter out = new FileWriter(absoluteFilePath, true);
BufferedWriter bufferWritter = new BufferedWriter(out);
bufferWritter.write(content);
bufferWritter.close();
} catch (IOException e) {
saveFile(absoluteFilePath, content);
}
}
public static File createParentFolders(String folderPath) {
try {
File destination = new File(folderPath);
destination.getParentFile().mkdirs();
destination.setWritable(true);
destination.setReadable(true);
return destination;
} catch (Exception e) {
System.out.println(e);
return null;
}
}
public static String openFileAsString(String filePath) throws Exception{
Charset encoding = Charset.defaultCharset();
byte[] encoded = Files.readAllBytes(Paths.get(GlobalOptions.rootFolderPath +filePath));
return encoding.decode(ByteBuffer.wrap(encoded)).toString();
}
public static String openFileAsStringAbsolutePath(String absoluteFilePath) throws Exception {
Charset encoding = Charset.defaultCharset();
byte[] encoded = Files.readAllBytes(Paths.get(absoluteFilePath));
return encoding.decode(ByteBuffer.wrap(encoded)).toString();
}
}
| [
"bytschkow@fortiss.org"
] | bytschkow@fortiss.org |
0f7d31b330560f193c34232512ebad7eef233226 | a2d2d0aa328d5d9242dc1b779bf2893af001ddfd | /ERP/src/java/com/t2tierp/compras/cliente/CompraTipoRequisicaoGrid.java | 1cd143eaf1250bc643603d41e34d05d218c95e83 | [] | no_license | joaovitorpina/maica-erp | f0fc4e85a588478c4d43f11b94d95d4c75f01e5f | e55fad8238f6ef8b87910476c221d9c2f1c47b59 | refs/heads/master | 2021-05-28T10:22:12.274751 | 2014-04-14T14:46:59 | 2014-04-14T14:46:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,785 | java | package com.t2tierp.compras.cliente;
import org.openswing.swing.client.GridControl;
import org.openswing.swing.mdi.client.InternalFrame;
/**
* <p>Title: T2Ti ERP</p>
* <p>Description: Tela CompraTipoRequisicaoGrid.</p>
*
* <p>The MIT License</p>
*
* <p>Copyright: Copyright (C) 2010 T2Ti.COM
*
* 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.
*
* The author may be contacted at:
* t2ti.com@gmail.com</p>
*
* @author Claudio de Barros (t2ti.com@gmail.com)
* @version 1.0
*/
public class CompraTipoRequisicaoGrid extends InternalFrame {
public CompraTipoRequisicaoGrid(CompraTipoRequisicaoGridController controller) {
initComponents();
gridControl1.setController(controller);
gridControl1.setGridDataLocator(controller);
}
public GridControl getGrid1() {
return gridControl1;
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
jPanel1 = new javax.swing.JPanel();
insertButton1 = new org.openswing.swing.client.InsertButton();
deleteButton1 = new org.openswing.swing.client.DeleteButton();
reloadButton1 = new org.openswing.swing.client.ReloadButton();
navigatorBar1 = new org.openswing.swing.client.NavigatorBar();
filterButton1 = new org.openswing.swing.client.FilterButton();
exportButton1 = new org.openswing.swing.client.ExportButton();
gridControl1 = new org.openswing.swing.client.GridControl();
comboColumn1 = new org.openswing.swing.table.columns.client.ComboColumn();
textColumn4 = new org.openswing.swing.table.columns.client.TextColumn();
textColumn5 = new org.openswing.swing.table.columns.client.TextColumn();
setTitle("Gestão de Compras");
setPreferredSize(new java.awt.Dimension(700, 400));
getContentPane().setLayout(new java.awt.GridBagLayout());
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Compra Tipo Requisicao"));
jPanel1.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
jPanel1.add(insertButton1);
jPanel1.add(deleteButton1);
jPanel1.add(reloadButton1);
jPanel1.add(navigatorBar1);
jPanel1.add(filterButton1);
jPanel1.add(exportButton1);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.weightx = 1.0;
getContentPane().add(jPanel1, gridBagConstraints);
gridControl1.setDeleteButton(deleteButton1);
gridControl1.setFunctionId("compraTipoRequisicao");
gridControl1.setInsertButton(insertButton1);
gridControl1.setNavBar(navigatorBar1);
gridControl1.setReloadButton(reloadButton1);
gridControl1.setValueObjectClassName("com.t2tierp.compras.java.CompraTipoRequisicaoVO");
gridControl1.getColumnContainer().setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
comboColumn1.setColumnName("codigo");
comboColumn1.setDomainId("compraTipoRequisicao");
comboColumn1.setHeaderColumnName("Codigo");
comboColumn1.setHeaderFont(new java.awt.Font("Arial", 1, 11)); // NOI18N
gridControl1.getColumnContainer().add(comboColumn1);
textColumn4.setColumnName("nome");
textColumn4.setHeaderColumnName("Nome");
textColumn4.setHeaderFont(new java.awt.Font("Arial", 1, 11)); // NOI18N
textColumn4.setPreferredWidth(200);
gridControl1.getColumnContainer().add(textColumn4);
textColumn5.setColumnName("descricao");
textColumn5.setHeaderColumnName("Descricao");
textColumn5.setHeaderFont(new java.awt.Font("Arial", 1, 11)); // NOI18N
textColumn5.setPreferredWidth(300);
gridControl1.getColumnContainer().add(textColumn5);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
getContentPane().add(gridControl1, gridBagConstraints);
pack();
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
private org.openswing.swing.table.columns.client.ComboColumn comboColumn1;
private org.openswing.swing.client.DeleteButton deleteButton1;
private org.openswing.swing.client.ExportButton exportButton1;
private org.openswing.swing.client.FilterButton filterButton1;
private org.openswing.swing.client.GridControl gridControl1;
private org.openswing.swing.client.InsertButton insertButton1;
private javax.swing.JPanel jPanel1;
private org.openswing.swing.client.NavigatorBar navigatorBar1;
private org.openswing.swing.client.ReloadButton reloadButton1;
private org.openswing.swing.table.columns.client.TextColumn textColumn4;
private org.openswing.swing.table.columns.client.TextColumn textColumn5;
// End of variables declaration//GEN-END:variables
}
| [
"aureliomaica@gmail.com@ad18e148-4fa2-a8d7-3c0d-fede52b83961"
] | aureliomaica@gmail.com@ad18e148-4fa2-a8d7-3c0d-fede52b83961 |
3b6ec0c337148b52919ec28c6ed8921499fe4868 | 95a54e3f3617bf55883210f0b5753b896ad48549 | /java_src/com/google/android/gms/common/internal/service/zam.java | fcb59a2f9d0ad02aa8aa4a03b9f97ba067894c0f | [] | no_license | aidyk/TagoApp | ffc5a8832fbf9f9819f7f8aa7af29149fbab9ea5 | e31a528c8f931df42075fc8694754be146eddc34 | refs/heads/master | 2022-12-22T02:20:58.486140 | 2021-05-16T07:42:02 | 2021-05-16T07:42:02 | 325,695,453 | 3 | 1 | null | 2022-12-16T00:32:10 | 2020-12-31T02:34:45 | Smali | UTF-8 | Java | false | false | 631 | java | package com.google.android.gms.common.internal.service;
import android.os.IBinder;
import android.os.Parcel;
import android.os.RemoteException;
import com.google.android.gms.internal.base.zaa;
import com.google.android.gms.internal.base.zac;
public final class zam extends zaa implements zal {
zam(IBinder iBinder) {
super(iBinder, "com.google.android.gms.common.internal.service.ICommonService");
}
@Override // com.google.android.gms.common.internal.service.zal
public final void zaa(zaj zaj) throws RemoteException {
Parcel zaa = zaa();
zac.zaa(zaa, zaj);
zac(1, zaa);
}
}
| [
"ai@AIs-MacBook-Pro.local"
] | ai@AIs-MacBook-Pro.local |
863b5fa929bb415df03063912d72e7264baa11e7 | b2b8fac233920fdebd06d1601c3c670490c0da59 | /java/nepxion-swing/src/com/nepxion/swing/fullscreen/JFullScreenFrame.java | ff8fe3caa91beb87856a0ee301280777e9f69919 | [
"Apache-2.0"
] | permissive | DmytroRybka/nepxion | 5af80829bdcf1d738bccbf14a4707fae5b9ce28e | 36412c4a59d40bb4a9a7208224e53f2e4e4c55eb | refs/heads/master | 2020-04-16T03:37:57.532332 | 2013-05-29T02:56:01 | 2013-05-29T02:56:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,053 | java | package com.nepxion.swing.fullscreen;
/**
* <p>Title: Nepxion Swing</p>
* <p>Description: Nepxion Swing Repository</p>
* <p>Copyright: Copyright (c) 2010</p>
* <p>Company: Nepxion</p>
* @author Neptune
* @email hj_ren@msn.com
* @version 1.0
*/
import java.awt.Color;
import java.awt.Dimension;
import javax.swing.ImageIcon;
import com.nepxion.swing.frame.JBasicFrame;
import com.nepxion.swing.icon.IconFactory;
public class JFullScreenFrame
extends JBasicFrame implements JFullScreenWindow
{
/**
* The instance of JFullScreenDecorationPanel.
*/
private JFullScreenDecorationPanel decorationPanel;
/**
* Constructs with the default.
*/
public JFullScreenFrame()
{
super();
initComponents();
}
/**
* Constructs with the specified initial title.
* @param title the title string
*/
public JFullScreenFrame(String title)
{
super(title);
initComponents();
}
/**
* Constructs with the specified initial title and image icon.
* @param title the title string
* @param imageIcon the instance of ImageIcon
*/
public JFullScreenFrame(String title, ImageIcon imageIcon)
{
super(title, imageIcon);
initComponents();
}
/**
* Constructs with the specified initial title and dimension.
* @param title the title string
* @param dimension the instance of Dimension
*/
public JFullScreenFrame(String title, Dimension dimension)
{
super(title, dimension);
initComponents();
}
/**
* Constructs with the specified initial title and destroy.
* @param title the title string
* @param destroy the boolean value of destroy
*/
public JFullScreenFrame(String title, boolean destroy)
{
super(title, destroy);
initComponents();
}
/**
* Constructs with the specified initial title, image icon and dimension.
* @param title the title string
* @param imageIcon the instance of ImageIcon
* @param dimension the instance of Dimension
*/
public JFullScreenFrame(String title, ImageIcon imageIcon, Dimension dimension)
{
super(title, imageIcon, dimension);
initComponents();
}
/**
* Constructs with the specified initial title, image icon and destroy.
* @param title the title string
* @param imageIcon the instance of ImageIcon
* @param destroy the boolean value of destroy
*/
public JFullScreenFrame(String title, ImageIcon imageIcon, boolean destroy)
{
super(title, imageIcon, destroy);
initComponents();
}
/**
* Constructs with the specified initial title, dimension and destroy.
* @param title the title string
* @param dimension the instance of Dimension
* @param destroy the boolean value of destroy
*/
public JFullScreenFrame(String title, Dimension dimension, boolean destroy)
{
super(title, dimension, destroy);
initComponents();
}
/**
* Constructs with the specified initial title, hint and destroy.
* @param title the title string
* @param hint the boolean value of hint
* @param destroy the boolean value of destroy
*/
public JFullScreenFrame(String title, boolean hint, boolean destroy)
{
super(title, hint, destroy);
initComponents();
}
/**
* Constructs with the specified initial title, image icon, dimension and destroy.
* @param title the title string
* @param imageIcon the instance of ImageIcon
* @param dimension the instance of Dimension
* @param destroy the boolean value of destroy
*/
public JFullScreenFrame(String title, ImageIcon imageIcon, Dimension dimension, boolean destroy)
{
super(title, imageIcon, dimension, destroy);
initComponents();
}
/**
* Constructs with the specified initial title, image icon, hint and destroy.
* @param title the title string
* @param imageIcon the instance of ImageIcon
* @param hint the boolean value of hint
* @param destroy the boolean value of destroy
*/
public JFullScreenFrame(String title, ImageIcon imageIcon, boolean hint, boolean destroy)
{
super(title, imageIcon, hint, destroy);
initComponents();
}
/**
* Constructs with the specified initial title dimension, hint and destroy.
* @param title the title string
* @param dimension the instance of Dimension
* @param hint the boolean value of hint
* @param destroy the boolean value of destroy
*/
public JFullScreenFrame(String title, Dimension dimension, boolean hint, boolean destroy)
{
super(title, dimension, hint, destroy);
initComponents();
}
/**
* Constructs with the specified initial title, image icon, dimension, hint and destroy.
* The boolean value of hint means that it will be shown confirming hint or not when closing the dialog.
* The boolean value of hint means that it will kill JVM process when closing the frame.
* @param title the title string
* @param imageIcon the instance of ImageIcon
* @param dimension the instance of Dimension
* @param hint the boolean value of hint
* @param destroy the boolean value of destroy
*/
public JFullScreenFrame(String title, ImageIcon imageIcon, Dimension dimension, boolean hint, boolean destroy)
{
super(title, imageIcon, dimension, hint, destroy);
initComponents();
}
/**
* Initializes the components.
*/
private void initComponents()
{
decorationPanel = new JFullScreenDecorationPanel(WINDOW_TITLE, IconFactory.getSwingIcon(WINDOW_ICON), WINDOW_TITLE);
decorationPanel.setBackground(Color.white);
getContentPane().add(decorationPanel);
}
/**
* Returns true if the content is valid.
* @param content the content string
* @return true if the content is valid
*/
public boolean isValid(String content)
{
return content != null && !content.trim().equals("");
}
/**
* Gets the workspace.
* @return the instance of JFullScreenDecorationPanel
*/
public JFullScreenDecorationPanel getWorkspace()
{
return decorationPanel;
}
} | [
"HaoJun.Ren@4900acfa-993c-71f3-3719-b31e1bbe1dc8"
] | HaoJun.Ren@4900acfa-993c-71f3-3719-b31e1bbe1dc8 |
f1160ecc9968c9691b2cf6d1db86d5a1a933acaa | 8c6e53eb56f8e84305707dce2e564d9226c99324 | /xdaocloud-futurechain-app/src/main/java/com/xdaocloud/futurechain/controller/FeedbackController.java | 55d947ae643f67b73e4a6f42974b44f8c4054913 | [] | no_license | soldiers1989/block-chain | 06b9289bdd873d396e8976a86e2ac6fcc877d803 | dbcf528d4aaaee331b5c8205c4d22cac2e49a4a7 | refs/heads/master | 2020-03-31T14:38:42.286800 | 2018-09-25T04:31:16 | 2018-09-25T04:31:16 | 152,303,750 | 3 | 2 | null | 2018-10-09T18:47:35 | 2018-10-09T18:47:35 | null | UTF-8 | Java | false | false | 1,423 | java | package com.xdaocloud.futurechain.controller;
import com.xdaocloud.base.info.ResultInfo;
import com.xdaocloud.futurechain.dto.req.feedback.AddFeedbackRequest;
import com.xdaocloud.futurechain.service.FeedbackService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;
/**
* 意见反馈
*
* @author LuoFuMin
*/
@RestController
@Api(value = "FeedbackController", description="意见反馈")
@RequestMapping("/api/app/")
public class FeedbackController{
@Autowired
private FeedbackService feedbackService;
/**
* 意见反馈
*
* @param request
* @param bindingResult
* @return
* @throws Exception
* @date 2018年6月2日
* @author LuoFuMin
*/
@ApiOperation(value = "添加意见反馈")
@PostMapping("v1/feedback/add")
public ResultInfo<?> addFeedbackV1(@Valid @RequestBody AddFeedbackRequest request, BindingResult bindingResult)
throws Exception {
return feedbackService.addFeedback(request);
}
}
| [
"474985045@qq.com"
] | 474985045@qq.com |
23bcdf6a6ab2aac11a5f771665a82d2b748cd8e6 | 863b8e2248130f75743ebd2a457a87cbd8ffd913 | /ExamTask/src/main/java/app/contracts/Targetable.java | a4bc5c42799bc627bf4b0b223c8b60fb2915350f | [
"MIT"
] | permissive | itonov/Java-OOP-Advanced | 23f97f547e6b04653bc7116bdd068c230bf25131 | b0053e4e2d990058f49dbb8c3c29c5fa35227692 | refs/heads/master | 2020-03-08T20:52:37.988644 | 2018-04-06T13:03:03 | 2018-04-06T13:03:03 | 128,393,797 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 556 | java | package app.contracts;
import javax.naming.OperationNotSupportedException;
public interface Targetable {
String attack(Targetable target) throws OperationNotSupportedException;
void takeDamage(double damage);
String getName();
void setName(String name);
double getDamage();
double getHealth();
double getGold();
void setHealth(double health);
void giveReward(Targetable targetable) throws OperationNotSupportedException;
void receiveReward(double reward);
void levelUp();
boolean isAlive();
}
| [
"itonov3@gmail.com"
] | itonov3@gmail.com |
dd509d2f8a42f020b960d39ae4ccac54f9c60365 | 7e9cb0b3a29dbd7d241640c0dda30b620dae52b9 | /core/src/main/java/com/cts/fasttack/core/converter/TokenLifecycleJmsMessageToIpsConverter.java | 6aaed67ab770ef8330ac70e28fc6716a69b1c18a | [] | no_license | ilemobayo/FASTTACK | f8705ae0b2f5a41487410016756a1b26b0bc5e22 | 85487890b9e5597f9b2b9690713ece2a5c1aff9f | refs/heads/master | 2020-05-26T15:00:06.553982 | 2018-11-30T11:32:39 | 2018-11-30T11:32:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,835 | java | package com.cts.fasttack.core.converter;
import java.util.Map;
import org.springframework.stereotype.Component;
import com.cts.fasttack.core.dict.TokenStatus;
import com.cts.fasttack.core.service.FEPropService;
import com.cts.fasttack.jms.dto.JmsTokenLifecycleDto;
import com.cts.fasttack.jms.dto.JmsTokenLifecycleIpsDto;
import com.cts.fasttack.jms.dto.TokenLifecycleJmsMessage;
import com.cts.fasttack.jms.dto.TokenLifecycleIpsJmsMessage;
/**
* @author Dmitry Koval
*/
@Component
public class TokenLifecycleJmsMessageToIpsConverter {
public TokenLifecycleIpsJmsMessage convert(TokenLifecycleJmsMessage request, Map<String, String> properties) {
TokenLifecycleIpsJmsMessage tokenLifecycleIpsJmsMessage = new TokenLifecycleIpsJmsMessage();
JmsTokenLifecycleDto source = request.getJmsTokenLifecycleDto();
JmsTokenLifecycleIpsDto target = new JmsTokenLifecycleIpsDto();
target.setOrganization(properties.get(FEPropService.PROPERTY_ORG_NAME));
target.setMdesReasonCode(source.getMdesReason());
target.setVtsReasonCode(String.valueOf(TokenStatus.valueOfFirstWord(source.getStatus()).getVtsReasonCode()));
target.setUserId(source.getUserId());
target.setUsername(source.getUsername());
target.setTokenRefID(source.getTokenReferenceID());
target.setTokenRequestorID(source.getTokenRequestorID());
target.setComment(source.getComment());
target.setStatus(source.getStatus());
target.setReasonSuspend(source.getReasonSuspend());
target.setTokenReason(source.getTokenReason());
target.setActivationCode("000000");
target.setPan(source.getPan());
target.setPaymentAppInstanceId(source.getPaymentAppInstanceId());
return tokenLifecycleIpsJmsMessage.jmsTokenActivateIpsDto(target);
}
}
| [
"a.lazarchuk@cartsys.com.ua"
] | a.lazarchuk@cartsys.com.ua |
e17ebb899fe437b58074c89ddc6e6fa58077b59c | db2c49a189e13554e73713ed2a69ca887a2ad9f0 | /org.orbit.infra.model/src/org/orbit/infra/model/subs/SubsTarget.java | 39036e2d6e30ead54116ed795f1f8d789e130679 | [] | no_license | EngineerBarsik/dev | fa501b6ff58e0b6b263d54d6e85c6d69a323f612 | 81715414de121e1d7cead7d4066d626b095816d6 | refs/heads/master | 2023-02-11T01:20:29.217287 | 2021-01-08T01:14:21 | 2021-01-08T01:14:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 764 | java | package org.orbit.infra.model.subs;
import java.util.Map;
/**
*
* @author <a href="mailto:yangyang4j@gmail.com">Yang Yang</a>
*
*/
public interface SubsTarget {
Integer getId();
void setId(Integer id);
String getType();
void setType(String type);
String getInstanceId();
void setInstanceId(String instanceId);
String getName();
void setName(String name);
String getServerId();
void setServerId(String serverId);
String getServerURL();
void setServerURL(String serverURL);
long getServerHeartbeatTime();
void setServerHeartbeatTime(long heartbeatTime);
Map<String, Object> getProperties();
long getDateCreated();
void setDateCreated(long dateCreated);
long getDateModified();
void setDateModified(long dateModified);
}
| [
"yangyang4cs@gmail.com"
] | yangyang4cs@gmail.com |
7db520193516d05d468089706af59b4fe467bcc7 | 395a1bf01f089acc5a5f7710f3f19d6326bbba64 | /argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/ActionSetAddMessageMode.java | 82f8f6436a62bcd806bac0049bb14240cf3fb73c | [] | no_license | but4reuse/argouml-spl-benchmark | a75724017a5986cef914df6f16341886a0997258 | 64c5e441492257542f15ce4f73355f9375d12929 | refs/heads/master | 2022-03-10T21:55:03.578933 | 2022-02-17T20:39:56 | 2022-02-17T20:39:56 | 118,929,949 | 5 | 3 | null | null | null | null | UTF-8 | Java | false | false | 2,465 | java | //#if defined(SEQUENCEDIAGRAM)
//@#$LPS-SEQUENCEDIAGRAM:GranularityType:Package
// $Id: ActionSetAddMessageMode.java 88 2010-07-31 22:39:02Z marcusvnac $
// Copyright (c) 2007 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
// agreement is hereby granted, provided that the above copyright notice
// and this paragraph appear in all copies. This software program and
// documentation are copyrighted by The Regents of the University of
// California. The software program and documentation are supplied "AS
// IS", without any accompanying services from The Regents. The Regents
// does not warrant that the operation of the program will be
// uninterrupted or error-free. The end-user understands that the program
// was developed for research purposes and is advised not to rely
// exclusively on the program for any reason. IN NO EVENT SHALL THE
// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
package org.argouml.sequence2.diagram;
import org.argouml.model.Model;
import org.argouml.uml.diagram.ui.ActionSetMode;
/**
* An extension of ActionSetMode to set the parameters for an association.
*
* @author Bob Tarling
*/
class ActionSetAddMessageMode extends ActionSetMode {
/**
* Construct a new ActionSetAddMessageMode<p>
*
* @param action the UML meta type of the UML action to associate
* to the new message
* @param name the i18n code for the action name
*/
public ActionSetAddMessageMode(Object action, String name) {
super(ModeCreateMessage.class, "edgeClass",
Model.getMetaTypes().getMessage(), name);
modeArgs.put("action", action);
}
}
//#endif | [
"jabiercoding@gmail.com"
] | jabiercoding@gmail.com |
981fae2625b1c789d94ea375d603de4d16470e63 | 55e46ffa52e429c565bae112d22720714697cdd3 | /ThermalCore/src/main/java/cofh/thermal/core/init/TCoreContainers.java | bdc859e93eb18ef23f523c0ecd21888ac2f9478a | [] | no_license | fdk123/thermal_food | 35e4d3f891e1a574529a8ad1891386f3a5eebe73 | 86f688c6aff7afab7fb43320f7f2b7df021ad979 | refs/heads/main | 2023-04-24T05:04:05.927762 | 2021-05-17T14:08:01 | 2021-05-17T14:08:01 | 368,121,200 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,276 | java | package cofh.thermal.core.init;
import cofh.core.util.ProxyUtils;
import cofh.thermal.core.inventory.container.device.*;
import cofh.thermal.core.inventory.container.storage.EnergyCellContainer;
import cofh.thermal.core.inventory.container.storage.FluidCellContainer;
import cofh.thermal.core.inventory.container.workbench.ChargeBenchContainer;
import cofh.thermal.core.inventory.container.workbench.TinkerBenchContainer;
import net.minecraftforge.common.extensions.IForgeContainerType;
import static cofh.thermal.core.ThermalCore.CONTAINERS;
import static cofh.thermal.core.init.TCoreIDs.*;
public class TCoreContainers {
private TCoreContainers() {
}
public static void register() {
CONTAINERS.register(ID_DEVICE_HIVE_EXTRACTOR, () -> IForgeContainerType.create((windowId, inv, data) -> new DeviceHiveExtractorContainer(windowId, ProxyUtils.getClientWorld(), data.readBlockPos(), inv, ProxyUtils.getClientPlayer())));
CONTAINERS.register(ID_DEVICE_TREE_EXTRACTOR, () -> IForgeContainerType.create((windowId, inv, data) -> new DeviceTreeExtractorContainer(windowId, ProxyUtils.getClientWorld(), data.readBlockPos(), inv, ProxyUtils.getClientPlayer())));
CONTAINERS.register(ID_DEVICE_WATER_GEN, () -> IForgeContainerType.create((windowId, inv, data) -> new DeviceWaterGenContainer(windowId, ProxyUtils.getClientWorld(), data.readBlockPos(), inv, ProxyUtils.getClientPlayer())));
CONTAINERS.register(ID_DEVICE_ROCK_GEN, () -> IForgeContainerType.create((windowId, inv, data) -> new DeviceRockGenContainer(windowId, ProxyUtils.getClientWorld(), data.readBlockPos(), inv, ProxyUtils.getClientPlayer())));
CONTAINERS.register(ID_DEVICE_COLLECTOR, () -> IForgeContainerType.create((windowId, inv, data) -> new DeviceCollectorContainer(windowId, ProxyUtils.getClientWorld(), data.readBlockPos(), inv, ProxyUtils.getClientPlayer())));
CONTAINERS.register(ID_DEVICE_POTION_DIFFUSER, () -> IForgeContainerType.create((windowId, inv, data) -> new DevicePotionDiffuserContainer(windowId, ProxyUtils.getClientWorld(), data.readBlockPos(), inv, ProxyUtils.getClientPlayer())));
CONTAINERS.register(ID_DEVICE_NULLIFIER, () -> IForgeContainerType.create((windowId, inv, data) -> new DeviceNullifierContainer(windowId, ProxyUtils.getClientWorld(), data.readBlockPos(), inv, ProxyUtils.getClientPlayer())));
CONTAINERS.register(ID_TINKER_BENCH, () -> IForgeContainerType.create((windowId, inv, data) -> new TinkerBenchContainer(windowId, ProxyUtils.getClientWorld(), data.readBlockPos(), inv, ProxyUtils.getClientPlayer())));
CONTAINERS.register(ID_CHARGE_BENCH, () -> IForgeContainerType.create((windowId, inv, data) -> new ChargeBenchContainer(windowId, ProxyUtils.getClientWorld(), data.readBlockPos(), inv, ProxyUtils.getClientPlayer())));
CONTAINERS.register(ID_ENERGY_CELL, () -> IForgeContainerType.create((windowId, inv, data) -> new EnergyCellContainer(windowId, ProxyUtils.getClientWorld(), data.readBlockPos(), inv, ProxyUtils.getClientPlayer())));
CONTAINERS.register(ID_FLUID_CELL, () -> IForgeContainerType.create((windowId, inv, data) -> new FluidCellContainer(windowId, ProxyUtils.getClientWorld(), data.readBlockPos(), inv, ProxyUtils.getClientPlayer())));
}
}
| [
"lol-faseofic@yandex.ru"
] | lol-faseofic@yandex.ru |
97fac494a0f42b2eb3c83fd02524d80925e2498d | bdcabb69c854cf301b1fc7efbc1b9a9760bbb572 | /src/com/bvan/oop/lesson6/enum_sample/gender/good/EnumRunner.java | 2d594cf3abd907b8cd2812721fe6695bfb6dd09a | [] | no_license | bohdanvan/javaoop-group45 | 00082249c256d5e58c34ebaad7ff5aea06b22ce1 | fb06f63fd0428df7227e848f475e5a28ae55ffa3 | refs/heads/master | 2021-01-11T15:57:30.334026 | 2017-03-03T15:34:58 | 2017-03-03T15:34:58 | 79,966,399 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 714 | java | package com.bvan.oop.lesson6.enum_sample.gender.good;
import java.util.Arrays;
/**
* @author bvanchuhov
*/
public class EnumRunner {
public static void main(String[] args) {
Gender gender = Gender.UNDEFINED;
System.out.println("name = " + gender.name());
System.out.println("ordinal = " + gender.ordinal());
System.out.println();
Gender genderByName = Gender.valueOf("male".toUpperCase());
System.out.println("gender by name = " + genderByName);
System.out.println("gender values = " + Arrays.toString(Gender.values()));
Gender genderByIndex = Gender.values()[1];
System.out.println("gender by index = " + genderByIndex);
}
}
| [
"bodya.van@gmail.com"
] | bodya.van@gmail.com |
6367304a81d087fec60bb1a12da6e7ff8590f9ab | 8b0eb6aa988796b5b97df8f3cc1a24f804059dc9 | /hw08-0036491099/src/main/java/hr/fer/zemris/optjava/dz8/TDNN.java | f6cbb4e894f54bd7e44bbfcdb87bf30e4497d312 | [] | no_license | Masperado/Cupic-EVO-Java-Course-FER-2018 | 6d6c3a33cd35c504a409d7c55b09d30475544cd9 | 6578c7a3a79b0b083161066bf49f4fb5acb2f19e | refs/heads/master | 2020-03-23T02:37:07.897168 | 2018-07-14T22:44:58 | 2018-07-14T22:44:58 | 140,982,831 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,678 | java | package hr.fer.zemris.optjava.dz8;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.DoubleStream;
import hr.fer.zemris.optjava.dz8.api.INeuralNetwork;
import hr.fer.zemris.optjava.dz8.api.IReadOnlyDataset;
import hr.fer.zemris.optjava.dz8.api.ITransferFunction;
public class TDNN implements INeuralNetwork {
private int[] layers;
private ITransferFunction[] functions;
private IReadOnlyDataset dataset;
public TDNN(int[] layers, ITransferFunction[] functions, IReadOnlyDataset dataset) {
this.layers = layers;
this.functions = functions;
this.dataset = dataset;
if ((layers.length - 1) != functions.length) {
throw new RuntimeException("Layers and functions don't match");
}
}
public int getWeightsCount() {
int weightsCount = 0;
for (int i = 0; i < layers.length; i++) {
weightsCount += layers[i];
if (i != layers.length - 1) {
weightsCount += layers[i] * layers[i + 1];
}
}
weightsCount -= layers[0];
return weightsCount;
}
public double[] calcOutputs(double[] inputs, double[] weights) {
if (weights.length != this.getWeightsCount()) {
throw new RuntimeException("Weights don't match neural network");
}
List<Double> nets = new ArrayList<>();
List<Double> functionValues = DoubleStream.of(inputs).boxed().collect(Collectors.toCollection(ArrayList::new));
int weightsCounter = 0;
for (int i = 0; i < layers.length - 1; i++) {
for (int j = 0; j < layers[i + 1]; j++) {
double netValue = 0;
for (Double k : functionValues) {
netValue += k * weights[weightsCounter];
weightsCounter++;
}
netValue += weights[weightsCounter];
weightsCounter++;
nets.add(netValue);
}
functionValues.clear();
for (Double net : nets) {
functionValues.add(functions[i].valueAt(net.doubleValue()));
}
nets.clear();
}
double[] outputs = functionValues.stream().mapToDouble(Double::doubleValue).toArray();
return outputs;
}
public double errorFunction(double[] weights) {
double error = 0;
double[] outputs = new double[layers[layers.length - 1]];
for (double[] inputs : dataset.getTestDataset()) {
outputs = calcOutputs(inputs, weights);
double[] wantedOutputs = dataset.getOutput(inputs);
for (int i = 0; i < outputs.length; i++) {
error += Math.pow(outputs[i] - wantedOutputs[i], 2);
}
}
return error / dataset.numberOfSamples();
}
public void statistics(double[] weights) {
int good = 0;
int bad = 0;
double[] outputs = new double[layers[layers.length - 1]];
for (double[] inputs : dataset.getTestDataset()) {
outputs = calcOutputs(inputs, weights);
double[] wantedOutputs = dataset.getOutput(inputs);
boolean goodOutput = true;
for (int i = 0; i < outputs.length; i++) {
if (untransform(outputs[i]) != untransform(wantedOutputs[i])) {
bad++;
goodOutput = false;
break;
}
}
if (goodOutput) {
good++;
}
System.out.printf("UZORAK: ");
for (int i = 0; i < inputs.length; i++) {
System.out.printf(untransform(inputs[i]) + " ");
}
System.out.printf("DOBIVENI IZLAZ: ");
for (int i = 0; i < outputs.length; i++) {
System.out.printf(untransform(outputs[i]) + " ");
}
System.out.printf("TRAŽENI IZLAZ: ");
for (int i = 0; i < outputs.length; i++) {
System.out.printf(untransform(wantedOutputs[i]) + " ");
}
System.out.println();
}
System.out.println("DOBRIH: " + good);
System.out.println("LOŠIH: " + bad);
}
private int untransform(double x) {
int min = dataset.getMin();
int max = dataset.getMax();
return (int) (min + (x + 1) * (max - min) / 2);
}
}
| [
"masperado@gmail.com"
] | masperado@gmail.com |
3a01de3dd6d2981b26463d4071ccd7415e8e21d6 | 967ceeb47d218c332caba343018011ebe5fab475 | /WEB-INF/caf_core_src/com/terapico/caf/baseelement/Action.java | 8f42567c05fe356c8b2a9d5550625e04b8b5bef6 | [
"Apache-2.0"
] | permissive | flair2005/retail-scm-integrated | bf14139a03083db9c4156a11c78a6f36f36b2e0b | eacb3bb4acd2e8ee353bf80e8ff636f09f803658 | refs/heads/master | 2021-06-23T08:02:37.521318 | 2017-08-10T17:18:50 | 2017-08-10T17:18:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 398 | java | package com.terapico.caf.baseelement;
public class Action {
String name;
public Action(final String name)
{
this.name=name;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getTitle(){
String []segs = name.split("/");
if(segs.length>1){
return segs[1];
}
return name;
}
}
| [
"philip_chang@163.com"
] | philip_chang@163.com |
5f342685d69bee7b44df91ecbf266121b3895bac | 40ded5811fc9113d0f6657e7a19800ca562fcd00 | /com/faw_qm/gybomNotice/client/util/GYBomNoticeTreeObject.java | 4dc7c5655caa8ea74c01837033ae20f3eff84087 | [] | no_license | jlcczzj/chengduCode | 9ba3001654e02bd099e7f702e441d171b726549b | 7de3580e5650e8674b9cf14583367bec82bd5801 | refs/heads/master | 2020-03-23T16:08:04.366204 | 2018-01-28T02:55:26 | 2018-01-28T02:55:26 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 1,973 | java | /** 生成程序 RationTreeObject.java 1.0 2006/06/19
* 版权归一汽启明公司所有
* 本程序属一汽启明公司的私有机要资料
* 未经本公司授权,不得非法传播和盗用
* 可在本公司授权范围内,使用本程序
* 保留所有权利
*/
package com.faw_qm.gybomNotice.client.util;
import java.awt.Image;
/**
* <p>Title:树节点封装对象的总接口 </p>
* <p>Description:主要抽象封装了节点对象,节点的图标,节点显示,节点内容和节点的唯一标识信息 </p>
* <p>Copyright: Copyright (c) 2004</p>
* <p>Company: 一汽启明</p>
* @author 刘明
* @version 1.0
*/
public interface GYBomNoticeTreeObject
{
/**
* 设置封装对象
* @param obj 封装对象
*/
public void setObject(Object obj);
/**
*得到封装对象
*@return Object
*/
public Object getObject();
/**
* 得到唯一标识
*@return java.lang.String
*/
public String getUniqueIdentity();
/**
* 设置唯一标识
* @param uni String
*/
public void setUniqueIdentity(String uni);
/**
* 设置节点显示文本
* @param str 节点显示文本
*/
public void setNoteText(String str);
/**
* 得到节点显示文本
* @return java.lang.String
*/
public String getNoteText();
/**
* 设置节点关闭图标
* @param image 节点关闭图标
*/
public void setCloseImage(Image image);
/**
* 得到节点关闭图标
* @return java.awt.Image
*/
public Image getCloseImage();
/**
* 设置节点展开图标
* @param image 节点展开图标
*/
public void setOpenImage(Image image);
/**
* 得到节点展开图标
* @return java.awt.Image
*/
public Image getOpenImage();
}
| [
"mario@Mario-PC"
] | mario@Mario-PC |
e9fbbb608211c6ff692f6bc706a7cfad7db9038f | 4abd603f82fdfa5f5503c212605f35979b77c406 | /html/Programs/hw2-diff/r04631036-476-4/Diff.java | 542d148419d356cd8070235370a5c17c39b5763d | [] | no_license | dn070017/1042-PDSA | b23070f51946c8ac708d3ab9f447ab8185bd2a34 | 5e7d7b1b2c9d751a93de9725316aa3b8f59652e6 | refs/heads/master | 2020-03-20T12:13:43.229042 | 2018-06-15T01:00:48 | 2018-06-15T01:00:48 | 137,424,305 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,317 | java |
import java.io.BufferedReader;
import java.io.FileReader;
import java.lang.Math;
/*
.
* To change this template file, choose Tools | Templates
.
*/
/**
*
* @author Arthur
*/
public class LabelCC {
public int size;
public int[] labelmap;
public QuickUnionUF qf;
/**
* @param args the command line arguments
*/
LabelCC(int sizee, QuickUnionUF qff) {
size = sizee;
qf = qff;
labelmap = new int[size * size];
}
public void setlabel(int i, int value) {
labelmap[i] = value;
}
public int getindex(int i, int j) {
return size * (i - 1) + j - 1;
}
public void checkrange(int i, int j) {
if (i <= 0 || j <= 0 || i > size || j > size) {
throw new IndexOutOfBoundsException();
}
}
public int getlabel(int i) {
return labelmap[i];
}
public static void main(String[] args) throws Exception {
int row = 0;
int col = 0;
int[][] block;
try (BufferedReader br = new BufferedReader(new FileReader(args[0]))) {
String[] data = br.readLine().split("","");
int size = Integer.parseInt(data[0]);
int[] target = new int[2];
target[0] = Integer.parseInt(data[1]);
target[1] = Integer.parseInt(data[2]);
QuickUnionUF qf = new QuickUnionUF(size * size);
LabelCC cc = new LabelCC(size, qf);
block = new int[size][size];
if(size==1)
{ System.out.printf(""0"");
return;
}
//initial labelmap
for (int i = 0; i < size * size; i++) {
cc.setlabel(i, 1);
}
//initial block
for (int i = 0; i < size; i++) {
//System.out.printf(""\n"");
for (int j = 0; j < size; j++) {
block[i][j] = 1;
//System.out.printf(""%d "", block[i][j]);
}
}
//System.out.printf(""\n"");
String str;
//System.out.printf(""%d\n%d\n%d"",size ,target[0],target[1]);
while ((str = br.readLine()) != null) {
data = str.split("","");
row = Integer.parseInt(data[0]);
col = Integer.parseInt(data[1]);
block[row - 1][col - 1] = 0;
cc.setlabel(cc.getindex(row, col), 0);
// System.out.printf(""%d %d\n"", row, col);
}
//step0
for (int i = 0; i < size; i++) {
//System.out.printf(""\n"");
for (int j = 0; j < size; j++) {
// System.out.printf(""%d "", block[i][j]);
}
}
//System.out.printf(""\n"");
//System.out.printf(""\n"");
int label = 1;
/*
for (int j = 0; j < size; j++) {
if (j == 0) {
block[0][j] = label;
} else if (j > 0 && block[0][j - 1] == 0) {
label++;
block[0][j] = label;
} else if (j > 0 && block[0][j - 1] > 0 && block[0][j] != 0) {
block[0][j] = block[0][j - 1];
}
System.out.printf(""%d "", block[0][j]);
}*/
//step1
for (int i = 0; i < size; i++) {
//System.out.printf(""\n"");
for (int j = 0; j < size; j++) {
if (block[i][j] != 0) {
if (i == 0) {
if (j == 0) {
block[i][j] = 0;
} else if (j > 0 && block[i][j - 1] == 0) {
label++;
block[i][j] = label;
} else if (j > 0 && block[i][j - 1] > 0 && block[i][j] != 0) {
block[i][j] = block[i][j - 1];
}
} else if (i > 0) {
if (j == 0 && block[i - 1][j] != 0) {
// System.out.printf(""me"");
block[i][j] = block[i - 1][j];
} else if (j == 0 && block[i - 1][j] == 0) {
label++;
block[i][j] = label;
} else if (j > 0 && block[i - 1][j] != 0 && block[i][j - 1] != 0) {//up left!=0 find parent
block[i][j] = Math.min(block[i - 1][j], block[i][j - 1]);
//qf.union(block[i - 1][j], block[i][j - 1]);
if (block[i][j - 1] > block[i - 1][j]) {
qf.union(block[i][j - 1], block[i - 1][j]);
} else if (block[i][j - 1] < block[i - 1][j]) {
qf.union(block[i - 1][j], block[i][j - 1]);
}
} else if (j > 0 && block[i][j - 1] == 0 && block[i - 1][j] != 0) {//left=0 up!=0
block[i][j] = block[i - 1][j];
} else if (j > 0 && block[i - 1][j] == 0 && block[i][j - 1] != 0) {//up=0 left!=0
block[i][j] = block[i][j - 1];
} else if (j > 0 && block[i - 1][j] == 0 && block[i][j - 1] == 0) {//up left=0
label++;
block[i][j] = label;
}
}
}
//System.out.printf(""%d "", block[i][j]);
}
}
//System.out.printf(""\n\n"");
//step2
for (int i = 0; i < size; i++) {
//System.out.printf(""\n"");
for (int j = 0; j < size; j++) {
if (qf.find(block[i][j]) < block[i][j]) {
block[i][j] = qf.find(block[i][j]);
}
//else if(qf.find(block[i][j])>block[i][j])
//block[i][j]=
//System.out.printf(""%d "", block[i][j]);
}
}
for (int i = 0; i < size; i++) {
//System.out.printf(""\n"");
for (int j = 0; j < size; j++) {
if (qf.find(block[i][j]) < block[i][j]) {
//block[i][j] = qf.find(block[i][j]);
}
//else if(qf.find(block[i][j])>block[i][j])
//block[i][j]=
//System.out.printf(""%d "", block[i][j]);
}
}
//System.out.printf(""\nroot(1)= %d\n"", qf.find(1));
//System.out.printf(""\nroot(2)= %d\n"", qf.find(2));
System.out.printf(""%d"", block[target[0] - 1][target[1] - 1]);
} catch (Exception e) {
// System.err.println(""-1"");
System.out.printf(""0"");
}
}
}
| [
"dn070017@gmail.com"
] | dn070017@gmail.com |
c4a55ab32374d4337a1060e56f4658066e283cb5 | 562a351abef292b6095250e31c48aab23e2bbb26 | /src/test/java/com/openpojo/issues/issue84/IssueTest.java | 4e8ba884643ea747819131d9c126aa98128cb3a0 | [] | no_license | hwaastad/openpojo | 93416ab9d76e9ed910a1a02df168686e07350b24 | 8e23ce713671e8bc4224318fadc9412abbaa4061 | refs/heads/master | 2021-08-29T02:09:04.332129 | 2017-12-13T11:30:44 | 2017-12-13T11:30:44 | 113,445,409 | 0 | 0 | null | 2017-12-07T11:57:16 | 2017-12-07T11:57:15 | null | UTF-8 | Java | false | false | 1,664 | java | /*
* Copyright (c) 2010-2017 Osman Shoukry
*
* 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.openpojo.issues.issue84;
import com.openpojo.random.RandomFactory;
import com.openpojo.reflection.PojoClass;
import com.openpojo.reflection.impl.PojoClassFactory;
import com.openpojo.validation.Validator;
import com.openpojo.validation.ValidatorBuilder;
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
import org.hamcrest.CoreMatchers;
import org.junit.Assert;
import org.junit.Test;
import sun.security.krb5.Credentials;
/**
* @author oshoukry
*/
public class IssueTest {
@Test
public void end2endTest() {
PojoClass pojoClass = PojoClassFactory.getPojoClass(ClassWithCredentials.class);
Validator validator = ValidatorBuilder.create()
.with(new GetterTester())
.with(new SetterTester())
.build();
validator.validate(pojoClass);
}
@Test
public void canGenerateCredentials() {
Credentials credentials = RandomFactory.getRandomValue(Credentials.class);
Assert.assertThat(credentials, CoreMatchers.notNullValue());
}
} | [
"oshoukry@openpojo.com"
] | oshoukry@openpojo.com |
6d15f7210171b04bad8d5bc0b2fb3564a18128a2 | ea1f2d479430447a62164eb88b6d5d320a47313c | /Butterfly-Curve/core/src/com/tcg/butterflycurve/EquiangularSpiral.java | 2d52c94497b551c500721ba9807d680b14984890 | [] | no_license | JoseRivas1998/Random-LibGDX-Projects | 615add034a282420e67946e665ab0c11fec6169f | 28502f3ffd83b4daa8480a2b67836df9ab978ab6 | refs/heads/master | 2020-04-17T15:39:13.335038 | 2019-05-01T17:03:50 | 2019-05-01T17:03:50 | 166,707,211 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 357 | java | package com.tcg.butterflycurve;
import com.badlogic.gdx.math.MathUtils;
public class EquiangularSpiral extends Curve {
@Override
public float getScale() {
return 1f;
}
@Override
protected float r(float theta) {
return getScale() * (float) Math.pow(MathUtils.E, theta * (1 / MathUtils.cos(MathUtils.PI / 4)));
}
}
| [
"JoseRivas823@gmail.com"
] | JoseRivas823@gmail.com |
940b8bdce011c33d2c775733b3e18ebbbb7d19ca | 4110aa7881c69ddf840f364949491223aa34038a | /src/main/java/com/harium/propan/core/writer/OBJWriter.java | 98a532d9773fdd12177a448f74b6261e45cd97ae | [] | no_license | lcpsky1991/propan | cb573d486700153bf2d91a549a0ef7248b03cdb4 | 1a0f1ed6b2cd4668c982034ed39a61ad245a2e56 | refs/heads/master | 2021-05-12T15:24:04.074965 | 2017-10-09T20:20:05 | 2017-10-09T20:20:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,082 | java | package com.harium.propan.core.writer;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.math.Vector3;
import com.harium.etyl.util.PathHelper;
import com.harium.etyl.util.StringUtils;
import com.harium.etyl.util.io.IOHelper;
import com.harium.propan.core.loader.mesh.OBJLoader;
import com.harium.propan.core.model.Face;
import com.harium.propan.core.model.Group;
import com.harium.propan.core.model.Model;
import java.io.*;
import java.util.List;
public class OBJWriter implements VBOWriter {
private static final boolean optimize = false;
private static final String FACE_SEPARATOR = "/";
private static final String MTL_EXTENSION = ".mtl";
@Override
public void writeVBO(Model vbo, String path) throws IOException {
Writer writer = null;
try {
String filename = PathHelper.filename(path);
filename = filename.substring(1, filename.length() - 4);
File file = IOHelper.getFile(path);
writer = new BufferedWriter(new OutputStreamWriter(
new FileOutputStream(file), IOHelper.ENCODING_UTF_8));
if (!optimize) {
writeHeader(vbo, writer);
}
writeMaterialLibrary(vbo, writer, filename);
writeVertexes(vbo, writer);
writeTextures(vbo, writer);
if (!optimize) {
writer.write(StringUtils.NEW_LINE);
}
writeNormals(vbo, writer);
writeFaces(writer, vbo.getFaces());
for (Group group : vbo.getGroups()) {
writeGroupSetup(writer, group);
writeFaces(writer, group.getFaces());
}
if (!vbo.getMaterials().isEmpty()) {
//exportMaterials();
}
} catch (IOException e) {
e.printStackTrace();
} finally {
writer.close();
}
}
private void writeHeader(Model vbo, Writer writer) throws IOException {
writer.write("# Created by Propan " + StringUtils.NEW_LINE);
writer.write("# Vertices: " + verticesCount(vbo) + ", Faces: " + facesCount(vbo) + StringUtils.NEW_LINE);
}
private int verticesCount(Model vbo) {
return vbo.getVertices().size();
}
private int facesCount(Model vbo) {
int sum = vbo.getFaces().size();
for (Group group : vbo.getGroups()) {
sum += group.getFaces().size();
}
return sum;
}
private void writeMaterialLibrary(Model vbo, Writer writer, String filename) throws IOException {
writer.write(OBJLoader.MATERIAL_LIB + " " + filename + MTL_EXTENSION + StringUtils.NEW_LINE);
}
private void writeGroupSetup(Writer writer, Group group) throws IOException {
writer.write(OBJLoader.GROUP + " " + group.getName() + StringUtils.NEW_LINE);
// Define material after the group
if (group.getMaterial() != null) {
String materialName = group.getMaterial().getName();
if (materialName.isEmpty()) {
materialName = group.getName();
}
writer.write(OBJLoader.USE_MATERIAL + " " + materialName + StringUtils.NEW_LINE);
}
}
private void writeFaces(Writer writer, List<Face> faces) throws IOException {
for (Face face : faces) {
boolean hasTexture = faceHasTexture(face);
boolean hasNomals = faceHasNormal(face);
StringBuilder sb = new StringBuilder();
sb.append(OBJLoader.FACE + " ");
for (int i = 0; i < face.getSides(); i++) {
if (i > 0) {
sb.append(" ");
}
int vertexIndex = face.vertexIndex[i] + 1;
sb.append(vertexIndex);
if (hasTexture) {
sb.append(FACE_SEPARATOR);
sb.append(face.textureIndex[i] + 1);
}
if (hasNomals) {
sb.append(FACE_SEPARATOR);
if (!hasTexture) {
sb.append(FACE_SEPARATOR);
}
sb.append(face.normalIndex[i] + 1);
}
}
sb.append(StringUtils.NEW_LINE);
writer.write(sb.toString());
}
}
private boolean faceHasTexture(Face face) {
boolean validTexture = false;
if (face.textureIndex != null) {
for (int i = 0; i < face.getSides(); i++) {
if (face.textureIndex[i] != 0) {
validTexture = true;
}
}
}
return validTexture;
}
private boolean faceHasNormal(Face face) {
boolean validTexture = false;
if (face.normalIndex != null) {
for (int i = 0; i < face.getSides(); i++) {
if (face.normalIndex[i] != 0) {
validTexture = true;
}
}
}
return validTexture;
}
private void writeTextures(Model vbo, Writer writer) throws IOException {
for (Vector2 vector : vbo.getTextures()) {
String text = OBJLoader.VERTEX_TEXCOORD + " " + vector.x + " " + vector.y + StringUtils.NEW_LINE;
writer.write(text);
}
}
private void writeNormals(Model vbo, Writer writer) throws IOException {
for (Vector3 vector : vbo.getNormals()) {
String text = OBJLoader.VERTEX_NORMAL + " " + vector.x + " " + vector.y + " " + vector.z + StringUtils.NEW_LINE;
writer.write(text);
}
if (!optimize) {
if (!vbo.getNormals().isEmpty()) {
writer.write(StringUtils.NEW_LINE);
}
}
}
private void writeVertexes(Model vbo, Writer writer) throws IOException {
for (Vector3 vector : vbo.getVertices()) {
String text = OBJLoader.VERTEX + " " + vector.x + " " + vector.y + " " + vector.z + StringUtils.NEW_LINE;
writer.write(text);
}
}
}
| [
"yuripourre@gmail.com"
] | yuripourre@gmail.com |
5f6c2807348562909f9e23cd15e7caf4d46357e1 | fe9fa44ada1100ec70680e231cd8b3d14fd5fb20 | /jspwiki-2.8.4/src/src/com/ecyrd/jspwiki/tags/PageExistsTag.java | ff6c087399f4455cf8a97d991effd5bf81d4a3a2 | [
"Apache-2.0",
"DOC",
"MIT"
] | permissive | ESSeRE-Lab/code-smell-fp-survey-code | 89d6a3551b4050cc0441ebb591380097b1488336 | 2f3ecacbfc72c1e4b550f650b8263af58eda8fc6 | refs/heads/master | 2020-09-27T15:33:41.568394 | 2016-09-27T12:53:21 | 2016-09-27T12:53:21 | 67,680,893 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,508 | java | /*
JSPWiki - a JSP-based WikiWiki clone.
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
package com.ecyrd.jspwiki.tags;
import java.io.IOException;
import com.ecyrd.jspwiki.providers.ProviderException;
/**
* Includes the body in case the set page does exist.
*
* @since 2.0
*/
// FIXME: Logically, this should probably be the master one, then
// NoSuchPageTag should be the one that derives from this.
public class PageExistsTag
extends NoSuchPageTag
{
private static final long serialVersionUID = 0L;
public final int doWikiStartTag()
throws IOException,
ProviderException
{
return (super.doWikiStartTag() == SKIP_BODY) ? EVAL_BODY_INCLUDE : SKIP_BODY;
}
}
| [
"marco.zanoni@disco.unimib.it"
] | marco.zanoni@disco.unimib.it |
3b7d2b5042685c924d031a31a274022953e3541f | f706b7f221cc0dc7a562d2683095abb66b035471 | /server/api/src/main/java/org/hawkular/apm/server/api/log/MsgLogger.java | ad33413d169be11aff2614230069d5a27f4c99ce | [
"Apache-2.0"
] | permissive | mumutu/hawkular-apm | fff8383ec30db026bf8c371414eadacdce43ea0e | 904565ff68bdd7d44c3603447d83d60031e8e59c | refs/heads/master | 2021-01-24T10:09:26.396847 | 2016-09-22T10:24:05 | 2016-09-22T10:24:05 | 68,891,909 | 1 | 0 | null | 2016-09-22T06:35:04 | 2016-09-22T06:35:04 | null | UTF-8 | Java | false | false | 1,539 | java | /*
* Copyright 2015-2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* 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.hawkular.apm.server.api.log;
import org.jboss.logging.BasicLogger;
import org.jboss.logging.Logger;
import org.jboss.logging.annotations.Cause;
import org.jboss.logging.annotations.LogMessage;
import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.MessageLogger;
import org.jboss.logging.annotations.ValidIdRange;
/**
* Log for INFO, WARN, ERROR and FATAL messages.
*
* @author gbrown
*/
@MessageLogger(projectCode = "HAWKAPM")
@ValidIdRange(min = 600000, max = 600099)
public interface MsgLogger extends BasicLogger {
MsgLogger LOGGER = Logger.getMessageLogger(MsgLogger.class, MsgLogger.class.getPackage().getName());
@LogMessage(level = Logger.Level.WARN)
@Message(id = 600000, value = "Maximum retry reached. Last exception to occur ....")
void warnMaxRetryReached(@Cause Throwable t);
}
| [
"gary@brownuk.com"
] | gary@brownuk.com |
205f6f24782bc633f1724ce6e5ba2a8a110976a8 | fb2b27f0638feaa8a435425a563910de48925931 | /df_miniapp/classes/com/tt/miniapp/chooser/view/SquareFrameLayout.java | 26bcdb8879984c9de0a0978985a384086766ed8b | [] | no_license | 0moura/tiktok_source | 168fdca45a76e9dc41a4667e41b7743c54692e45 | dc2f1740f1f4adcb16448107e5c15fabc40ed8e5 | refs/heads/master | 2023-01-08T22:51:02.019984 | 2020-11-03T13:18:24 | 2020-11-03T13:18:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,163 | java | package com.tt.miniapp.chooser.view;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.FrameLayout;
public class SquareFrameLayout extends FrameLayout {
public SquareFrameLayout(Context paramContext) {
super(paramContext);
}
public SquareFrameLayout(Context paramContext, AttributeSet paramAttributeSet) {
super(paramContext, paramAttributeSet);
}
public SquareFrameLayout(Context paramContext, AttributeSet paramAttributeSet, int paramInt) {
super(paramContext, paramAttributeSet, paramInt);
}
public SquareFrameLayout(Context paramContext, AttributeSet paramAttributeSet, int paramInt1, int paramInt2) {
super(paramContext, paramAttributeSet, paramInt1, paramInt2);
}
protected void onMeasure(int paramInt1, int paramInt2) {
super.onMeasure(paramInt1, paramInt2);
setMeasuredDimension(getMeasuredWidth(), getMeasuredWidth());
}
}
/* Location: C:\Users\august\Desktop\tik\df_miniapp\classes.jar!\com\tt\miniapp\chooser\view\SquareFrameLayout.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/ | [
"augustgl@protonmail.ch"
] | augustgl@protonmail.ch |
a2b8fcb855dff3c5b02349606e29666db666ddd0 | 4edbe52a2eeb5544582bbe8e08e9caca1f492f5f | /agent/src/main/java/com/heliosapm/shorthand/util/jmx/threadinfo/ExtendedThreadInfoMBean.java | 3bc25bfdbd419bea5bfe83856edb2891f4a3fe60 | [
"Apache-2.0"
] | permissive | nickman/shorthand | e5a54033c45b3141326a0c1db281c5bab025eef0 | 9d9303167abcb318c6c7b329469d253d514e4f94 | refs/heads/master | 2020-03-30T11:18:28.494981 | 2017-04-08T19:33:00 | 2017-04-08T19:33:00 | 12,180,982 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,064 | java | /**
* Helios Development Group LLC, 2013.
*
*/
package com.heliosapm.shorthand.util.jmx.threadinfo;
import java.lang.Thread.State;
import java.lang.management.LockInfo;
import java.lang.management.MonitorInfo;
/**
* <p>Title: ExtendedThreadInfoMBean</p>
* <p>Description: MXBean compatibility interface to expose {@link ExtendedThreadInfo}s as composite data instances.</p>
* <p>Company: Helios Development Group LLC</p>
* @author Whitehead (nwhitehead AT heliosdev DOT org)
* <p><code>org.helios.apmrouter.jmx.threadinfo.ExtendedThreadInfoMBean</code></p>
*/
public interface ExtendedThreadInfoMBean {
/**
* @return
* @see java.lang.Object#hashCode()
*/
public abstract int hashCode();
/**
* @param obj
* @return
* @see java.lang.Object#equals(java.lang.Object)
*/
public abstract boolean equals(Object obj);
/**
* @return
* @see java.lang.management.ThreadInfo#getThreadId()
*/
public abstract long getThreadId();
/**
* @return
* @see java.lang.management.ThreadInfo#getThreadName()
*/
public abstract String getThreadName();
/**
* @return
* @see java.lang.management.ThreadInfo#getThreadState()
*/
public abstract State getThreadState();
/**
* @return
* @see java.lang.management.ThreadInfo#getBlockedTime()
*/
public abstract long getBlockedTime();
/**
* @return
* @see java.lang.management.ThreadInfo#getBlockedCount()
*/
public abstract long getBlockedCount();
/**
* @return
* @see java.lang.management.ThreadInfo#getWaitedTime()
*/
public abstract long getWaitedTime();
/**
* @return
* @see java.lang.management.ThreadInfo#getWaitedCount()
*/
public abstract long getWaitedCount();
/**
* @return
* @see java.lang.management.ThreadInfo#getLockInfo()
*/
public abstract LockInfo getLockInfo();
/**
* @return
* @see java.lang.management.ThreadInfo#getLockName()
*/
public abstract String getLockName();
/**
* @return
* @see java.lang.management.ThreadInfo#getLockOwnerId()
*/
public abstract long getLockOwnerId();
/**
* @return
* @see java.lang.management.ThreadInfo#getLockOwnerName()
*/
public abstract String getLockOwnerName();
/**
* @return
* @see java.lang.management.ThreadInfo#getStackTrace()
*/
public abstract StackTraceElement[] getStackTrace();
/**
* @return
* @see java.lang.management.ThreadInfo#isSuspended()
*/
public abstract boolean isSuspended();
/**
* @return
* @see java.lang.management.ThreadInfo#isInNative()
*/
public abstract boolean isInNative();
/**
* @return
* @see java.lang.management.ThreadInfo#toString()
*/
public abstract String toString();
/**
* @return
* @see java.lang.management.ThreadInfo#getLockedMonitors()
*/
public abstract MonitorInfo[] getLockedMonitors();
/**
* @return
* @see java.lang.management.ThreadInfo#getLockedSynchronizers()
*/
public abstract LockInfo[] getLockedSynchronizers();
} | [
"nwhitehead@heliosdev.org"
] | nwhitehead@heliosdev.org |
e3b604562c2ea23511bfea16598e4ac857de2df3 | a47074692bd700190cd988c2a5df4fa22e5b5fc0 | /modules/lwjgl/opengles/src/generated/java/org/lwjgl/opengles/NVBindlessTexture.java | cac4c7b5f376905f0a971ae24e07980362fd800e | [
"LicenseRef-scancode-khronos",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | johalun/lwjgl3 | 823087f6da986818c8ab2fb0903d3a3cd9323d3b | fcaab301aa489c6310c149c788999f35333fbc7c | refs/heads/master-linux64 | 2023-02-08T03:35:15.451240 | 2019-05-11T01:00:01 | 2019-05-11T01:00:01 | 151,859,836 | 1 | 8 | BSD-3-Clause | 2023-01-25T12:25:36 | 2018-10-06T16:36:25 | Java | UTF-8 | Java | false | false | 7,796 | java | /*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.opengles;
import java.nio.*;
import org.lwjgl.system.*;
import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
import static org.lwjgl.system.MemoryUtil.*;
/**
* Native bindings to the <a target="_blank" href="https://www.khronos.org/registry/OpenGL/extensions/NV/NV_bindless_texture.txt">NV_bindless_texture</a> extension.
*
* <p>This extension allows OpenGL applications to access texture objects in shaders without first binding each texture to one of a limited number of texture
* image units. Using this extension, an application can query a 64-bit unsigned integer texture handle for each texture that it wants to access and then
* use that handle directly in GLSL or assembly-based shaders. The ability to access textures without having to bind and/or re-bind them is similar to the
* capability provided by the NV_shader_buffer_load extension that allows shaders to access buffer objects without binding them. In both cases, these
* extensions significantly reduce the amount of API and internal GL driver overhead needed to manage resource bindings.</p>
*
* <p>This extension also provides similar capability for the image load, store, and atomic functionality provided by OpenGL 4.2, OpenGL ES 3.1 and the
* ARB_shader_image_load_store and EXT_shader_image_load_store extensions, where a texture can be accessed without first binding it to an image unit. An
* image handle can be extracted from a texture object using an API with a set of parameters similar to those for BindImageTextureEXT.</p>
*
* <p>This extension adds no new data types to GLSL. Instead, it uses existing sampler and image data types and allows them to be populated with texture and
* image handles. This extension does permit sampler and image data types to be used in more contexts than in unextended GLSL 4.00. In particular, sampler
* and image types may be used as shader inputs/outputs, temporary variables, and uniform block members, and may be assigned to by shader code.
* Constructors are provided to convert 64-bit unsigned integer values to and from sampler and image data types. Additionally, new APIs are provided to
* load values for sampler and image uniforms with 64-bit handle inputs. The use of existing integer-based Uniform* APIs is still permitted, in which case
* the integer specified will identify a texture image or image unit. For samplers and images with values specified as texture image or image units, the
* GL implemenation will translate the unit number to an internal handle as required.</p>
*
* <p>To access texture or image resources using handles, the handles must first be made resident. Accessing a texture or image by handle without first
* making it resident can result in undefined results, including program termination. Since the amount of texture memory required by an application may
* exceed the amount of memory available to the system, this extension provides API calls allowing applications to manage overall texture memory
* consumption by making a texture resident and non-resident as required.</p>
*
* <p>Requires {@link GLES30 GLES 3.0}.</p>
*/
public class NVBindlessTexture {
static { GLES.initialize(); }
protected NVBindlessTexture() {
throw new UnsupportedOperationException();
}
static boolean isAvailable(GLESCapabilities caps) {
return checkFunctions(
caps.glGetTextureHandleNV, caps.glGetTextureSamplerHandleNV, caps.glMakeTextureHandleResidentNV, caps.glMakeTextureHandleNonResidentNV,
caps.glGetImageHandleNV, caps.glMakeImageHandleResidentNV, caps.glMakeImageHandleNonResidentNV, caps.glUniformHandleui64NV,
caps.glUniformHandleui64vNV, caps.glProgramUniformHandleui64NV, caps.glProgramUniformHandleui64vNV, caps.glIsTextureHandleResidentNV,
caps.glIsImageHandleResidentNV
);
}
// --- [ glGetTextureHandleNV ] ---
@NativeType("GLuint64")
public static native long glGetTextureHandleNV(@NativeType("GLuint") int texture);
// --- [ glGetTextureSamplerHandleNV ] ---
@NativeType("GLuint64")
public static native long glGetTextureSamplerHandleNV(@NativeType("GLuint") int texture, @NativeType("GLuint") int sampler);
// --- [ glMakeTextureHandleResidentNV ] ---
public static native void glMakeTextureHandleResidentNV(@NativeType("GLuint64") long handle);
// --- [ glMakeTextureHandleNonResidentNV ] ---
public static native void glMakeTextureHandleNonResidentNV(@NativeType("GLuint64") long handle);
// --- [ glGetImageHandleNV ] ---
@NativeType("GLuint64")
public static native long glGetImageHandleNV(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLboolean") boolean layered, @NativeType("GLint") int layer, @NativeType("GLenum") int format);
// --- [ glMakeImageHandleResidentNV ] ---
public static native void glMakeImageHandleResidentNV(@NativeType("GLuint64") long handle, @NativeType("GLenum") int access);
// --- [ glMakeImageHandleNonResidentNV ] ---
public static native void glMakeImageHandleNonResidentNV(@NativeType("GLuint64") long handle);
// --- [ glUniformHandleui64NV ] ---
public static native void glUniformHandleui64NV(@NativeType("GLint") int location, @NativeType("GLuint64") long value);
// --- [ glUniformHandleui64vNV ] ---
public static native void nglUniformHandleui64vNV(int location, int count, long values);
public static void glUniformHandleui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64 const *") LongBuffer values) {
nglUniformHandleui64vNV(location, values.remaining(), memAddress(values));
}
// --- [ glProgramUniformHandleui64NV ] ---
public static native void glProgramUniformHandleui64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64") long value);
// --- [ glProgramUniformHandleui64vNV ] ---
public static native void nglProgramUniformHandleui64vNV(int program, int location, int count, long values);
public static void glProgramUniformHandleui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64 const *") LongBuffer values) {
nglProgramUniformHandleui64vNV(program, location, values.remaining(), memAddress(values));
}
// --- [ glIsTextureHandleResidentNV ] ---
@NativeType("GLboolean")
public static native boolean glIsTextureHandleResidentNV(@NativeType("GLuint64") long handle);
// --- [ glIsImageHandleResidentNV ] ---
@NativeType("GLboolean")
public static native boolean glIsImageHandleResidentNV(@NativeType("GLuint64") long handle);
/** Array version of: {@link #glUniformHandleui64vNV UniformHandleui64vNV} */
public static void glUniformHandleui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64 const *") long[] values) {
long __functionAddress = GLES.getICD().glUniformHandleui64vNV;
if (CHECKS) {
check(__functionAddress);
}
callPV(location, values.length, values, __functionAddress);
}
/** Array version of: {@link #glProgramUniformHandleui64vNV ProgramUniformHandleui64vNV} */
public static void glProgramUniformHandleui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64 const *") long[] values) {
long __functionAddress = GLES.getICD().glProgramUniformHandleui64vNV;
if (CHECKS) {
check(__functionAddress);
}
callPV(program, location, values.length, values, __functionAddress);
}
} | [
"iotsakp@gmail.com"
] | iotsakp@gmail.com |
cde21bc8398f03edf22c975bb7dd66d264a266f1 | 2fd9d77d529e9b90fd077d0aa5ed2889525129e3 | /DecompiledViberSrc/app/src/main/java/com/viber/voip/messages/extensions/j.java | d3bac77512f85e1a3700615535d4d8e6df5134f9 | [] | no_license | cga2351/code | 703f5d49dc3be45eafc4521e931f8d9d270e8a92 | 4e35fb567d359c252c2feca1e21b3a2a386f2bdb | refs/heads/master | 2021-07-08T15:11:06.299852 | 2021-05-06T13:22:21 | 2021-05-06T13:22:21 | 60,314,071 | 1 | 3 | null | null | null | null | UTF-8 | Java | false | false | 1,281 | java | package com.viber.voip.messages.extensions;
import android.util.Base64;
import com.viber.voip.ViberApplication;
import com.viber.voip.p;
import com.viber.voip.registration.HardwareParameters;
import com.viber.voip.registration.af;
import com.viber.voip.user.UserManager;
import java.util.Map;
final class j
{
private final HardwareParameters a = ViberApplication.getInstance().getHardwareParameters();
private final af b = UserManager.from(ViberApplication.getApplication()).getRegistrationValues();
public void a(Map<String, String> paramMap)
{
paramMap.put("mcc", this.a.getSimMCC());
paramMap.put("mnc", this.a.getSimMNC());
paramMap.put("udid", this.a.getUdid());
paramMap.put("member_id", this.b.l());
paramMap.put("phone", this.b.g());
paramMap.put("system", String.valueOf(p.j()));
}
public void a(Map<String, String> paramMap, long paramLong, byte[] paramArrayOfByte)
{
paramMap.put("authToken", Base64.encodeToString(paramArrayOfByte, 2));
paramMap.put("timestamp", String.valueOf(paramLong));
}
}
/* Location: E:\Study\Tools\apktool2_2\dex2jar-0.0.9.15\classes_viber_3_dex2jar.jar
* Qualified Name: com.viber.voip.messages.extensions.j
* JD-Core Version: 0.6.2
*/ | [
"yu.liang@navercorp.com"
] | yu.liang@navercorp.com |
2863d9d2b781ed661b102e8e4874fbed080681af | f53dfce6949ae8cbcc7052bb007e893e133a5f19 | /java/org/apache/coyote/http2/AbstractStream.java | fac522d3b946ea8aadbdfb57637775b25f6ba9b8 | [
"Zlib",
"LZMA-exception",
"bzip2-1.0.6",
"CPL-1.0",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-unknown-license-reference",
"CDDL-1.0",
"EPL-1.0"
] | permissive | lice019/lice-tomcat-9.0.22 | f88e39db6d51c2f1a3c6a89588b94f07fbbea004 | da56f8224ee662f95e5f0fc309c7321afcb37947 | refs/heads/master | 2022-01-30T11:25:45.229460 | 2019-10-29T15:32:52 | 2019-10-29T15:32:52 | 216,080,692 | 1 | 0 | Apache-2.0 | 2022-01-21T23:41:24 | 2019-10-18T18:02:24 | Java | UTF-8 | Java | false | false | 4,810 | 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.coyote.http2;
import java.util.Collections;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.res.StringManager;
/**
* Used to managed prioritisation.
*/
abstract class AbstractStream {
private static final Log log = LogFactory.getLog(AbstractStream.class);
private static final StringManager sm = StringManager.getManager(AbstractStream.class);
private final Integer identifier;
private volatile AbstractStream parentStream = null;
private final Set<Stream> childStreams = Collections.newSetFromMap(new ConcurrentHashMap<>());
private long windowSize = ConnectionSettingsBase.DEFAULT_INITIAL_WINDOW_SIZE;
AbstractStream(Integer identifier) {
this.identifier = identifier;
}
final Integer getIdentifier() {
return identifier;
}
final int getIdAsInt() {
return identifier.intValue();
}
final void detachFromParent() {
if (parentStream != null) {
parentStream.getChildStreams().remove(this);
parentStream = null;
}
}
final void addChild(Stream child) {
child.setParentStream(this);
childStreams.add(child);
}
final boolean isDescendant(AbstractStream stream) {
if (childStreams.contains(stream)) {
return true;
}
for (AbstractStream child : childStreams) {
if (child.isDescendant(stream)) {
return true;
}
}
return false;
}
final AbstractStream getParentStream() {
return parentStream;
}
final void setParentStream(AbstractStream parentStream) {
this.parentStream = parentStream;
}
final Set<Stream> getChildStreams() {
return childStreams;
}
final synchronized void setWindowSize(long windowSize) {
this.windowSize = windowSize;
}
final synchronized long getWindowSize() {
return windowSize;
}
/**
* Increment window size.
* @param increment The amount by which the window size should be increased
* @throws Http2Exception If the window size is now higher than
* the maximum allowed
*/
synchronized void incrementWindowSize(int increment) throws Http2Exception {
// No need for overflow protection here.
// Increment can't be more than Integer.MAX_VALUE and once windowSize
// goes beyond 2^31-1 an error is triggered.
windowSize += increment;
if (log.isDebugEnabled()) {
log.debug(sm.getString("abstractStream.windowSizeInc", getConnectionId(),
getIdentifier(), Integer.toString(increment), Long.toString(windowSize)));
}
if (windowSize > ConnectionSettingsBase.MAX_WINDOW_SIZE) {
String msg = sm.getString("abstractStream.windowSizeTooBig", getConnectionId(), identifier,
Integer.toString(increment), Long.toString(windowSize));
if (identifier.intValue() == 0) {
throw new ConnectionException(msg, Http2Error.FLOW_CONTROL_ERROR);
} else {
throw new StreamException(
msg, Http2Error.FLOW_CONTROL_ERROR, identifier.intValue());
}
}
}
final synchronized void decrementWindowSize(int decrement) {
// No need for overflow protection here. Decrement can never be larger
// the Integer.MAX_VALUE and once windowSize goes negative no further
// decrements are permitted
windowSize -= decrement;
if (log.isDebugEnabled()) {
log.debug(sm.getString("abstractStream.windowSizeDec", getConnectionId(),
getIdentifier(), Integer.toString(decrement), Long.toString(windowSize)));
}
}
abstract String getConnectionId();
abstract int getWeight();
}
| [
"11606537852@qq.com"
] | 11606537852@qq.com |
979e64badae4401c916adc54e10bc6832aad2af2 | d945b16fb1006cf8571ae3ec2a368781a01ec30a | /modules/siddhi-core/src/main/java/org/wso2/siddhi/core/query/QueryValidator.java | 6e482209b7512fadc83a545d94a3d790652bcfc1 | [
"Apache-2.0"
] | permissive | suhothayan/siddhi-3 | d54d80c5e7b580526c560331708125f7143a398c | af1c90e92ba35daa6b4584e356847a4808a11040 | refs/heads/master | 2020-05-17T21:53:53.852435 | 2014-06-30T08:31:22 | 2014-06-30T08:31:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,846 | java | /*
* Copyright (c) 2005 - 2014, WSO2 Inc. (http://www.wso2.org) 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. 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.wso2.siddhi.core.query;
import org.wso2.siddhi.query.api.condition.ConditionValidator;
import org.wso2.siddhi.query.api.definition.AbstractDefinition;
import org.wso2.siddhi.query.api.exception.AttributeNotExistException;
import org.wso2.siddhi.query.api.expression.Expression;
import org.wso2.siddhi.query.api.expression.ExpressionValidator;
import org.wso2.siddhi.query.api.query.Query;
import org.wso2.siddhi.query.api.query.input.WindowInputStream;
import org.wso2.siddhi.query.api.query.input.handler.Filter;
import org.wso2.siddhi.query.api.query.input.handler.StreamFunction;
import org.wso2.siddhi.query.api.query.input.handler.StreamHandler;
import org.wso2.siddhi.query.api.query.input.handler.Window;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentMap;
/**
* Created by suho on 6/2/14.
*/
public class QueryValidator {
public static void validate(Query query, ConcurrentMap<String, AbstractDefinition> streamTableDefinitionMap) {
if (query.getInputStream() instanceof WindowInputStream) {
WindowInputStream stream = (WindowInputStream) query.getInputStream();
AbstractDefinition inputStreamDefinition = streamTableDefinitionMap.get(stream.getStreamId());
for (StreamHandler streamHandler : stream.getStreamHandlers()) {
if (streamHandler instanceof Filter) {
Filter filter = (Filter) streamHandler;
Map<String, Set<String>> dependencies = ConditionValidator.getDependency(filter.getFilterCondition());
checkAttribute(stream.getStreamId(), stream.getStreamId(), inputStreamDefinition, dependencies);
checkAttribute(stream.getStreamReferenceId(), stream.getStreamId(), inputStreamDefinition, dependencies);
checkAttribute(null, stream.getStreamId(), inputStreamDefinition, dependencies);
} else if (streamHandler instanceof Window) {
Window window = (Window) streamHandler;
for (Expression expression : window.getParameters()) {
Map<String, Set<String>> dependencies = ExpressionValidator.getDependency(expression);
checkAttribute(stream.getStreamId(), stream.getStreamId(), inputStreamDefinition, dependencies);
checkAttribute(stream.getStreamReferenceId(), stream.getStreamId(), inputStreamDefinition, dependencies);
checkAttribute(null, stream.getStreamId(), inputStreamDefinition, dependencies);
}
} else if (streamHandler instanceof StreamFunction) {
StreamFunction streamFunction = (StreamFunction) streamHandler;
for (Expression expression : streamFunction.getParameters()) {
Map<String, Set<String>> dependencies = ExpressionValidator.getDependency(expression);
checkAttribute(stream.getStreamId(), stream.getStreamId(), inputStreamDefinition, dependencies);
checkAttribute(stream.getStreamReferenceId(), stream.getStreamId(), inputStreamDefinition, dependencies);
checkAttribute(null, stream.getStreamId(), inputStreamDefinition, dependencies);
}
}
}
}
}
private static void checkAttribute(String id, String streamId, AbstractDefinition inputStreamDefinition, Map<String, Set<String>> dependencies) {
Set<String> attributes = dependencies.get(id);
if (attributes != null) {
for (String dependentAttribute : attributes) {
boolean attributeExist = false;
for (String attribute : inputStreamDefinition.getAttributeNameArray()) {
if (attribute.equals(dependentAttribute)) {
attributeExist = true;
break;
}
}
if (!attributeExist) {
throw new AttributeNotExistException(dependentAttribute + " does not exist in " + streamId);
}
}
}
}
}
| [
"suhothayan@gmail.com"
] | suhothayan@gmail.com |
73e119fdad7af239372c27aeb85711ced1430ef2 | dd124ff483bb401f9b16265766d0b47ae2750dd6 | /Character_Main/src/net/sf/anathema/character/view/IGroupedFavorableTraitViewFactory.java | 1fbfab671c72e841b990bb86e5186825188d04d5 | [] | no_license | eleizel/anathema | d3ece56766963033df057d76ad3580195d107d84 | 9d003666094e0ff6c17de2ba698d989dd451de9f | refs/heads/master | 2020-12-25T10:36:40.969421 | 2012-04-24T20:30:24 | 2012-04-24T20:30:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 183 | java | package net.sf.anathema.character.view;
public interface IGroupedFavorableTraitViewFactory {
public IGroupedFavorableTraitConfigurationView createView(int columnCount);
}
| [
"ursreupke@gmail.com"
] | ursreupke@gmail.com |
2092224419b3021006b13208b7b2ba3d97c25c4f | a1ca4e5e6fe8952b77d1830736dbe89420f88285 | /OntoUML/src/OntoUML/URML/validation/AttributionAtomValidator.java | b69d8153e31e8a0381abfe98f8a9dae359e2e3fe | [] | no_license | kleopatra999/ontouml-editor-eclipse | 46807fe571a60d33ff0f9c84c2bd564e58190e7a | b90531098e578cebaaf5404adc8dc8b3dbae8773 | refs/heads/master | 2021-01-16T00:27:40.594378 | 2011-09-23T03:22:59 | 2011-09-23T03:22:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 551 | java | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package OntoUML.URML.validation;
/**
* A sample validator interface for {@link OntoUML.URML.AttributionAtom}.
* This doesn't really do anything, and it's not a real EMF artifact.
* It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
* This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
*/
public interface AttributionAtomValidator {
boolean validate();
}
| [
"alessanderbotti@b20185d1-684f-0410-8ba8-0d0db1538d36"
] | alessanderbotti@b20185d1-684f-0410-8ba8-0d0db1538d36 |
dd27eae4b4b9b5339f803f1055875b3e7c071af1 | 0654f0d5a95b4b1e4a2c5b3b222a8645757a21ab | /app/src/main/java/kangmei/com/hxchartharlan/base/Constant.java | 2079fc42baaf96794a4a98babce03ed9b1b82fd9 | [] | no_license | androidHarlan/HXChartHarlan | 92b8e46e26fa6472c814f016b64b37eb6b2051e7 | e3295d912b9b0d6c9e0788b50beee6c2e2cb4e5d | refs/heads/master | 2020-03-22T17:25:29.615879 | 2018-07-10T07:36:07 | 2018-07-10T07:36:07 | 140,394,437 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,123 | java | /**
* Copyright (C) 2016 Hyphenate Inc. 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.
* 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 kangmei.com.hxchartharlan.base;
import com.hyphenate.easeui.EaseConstant;
public class Constant extends EaseConstant {
public static final String NEW_FRIENDS_USERNAME = "item_new_friends";
public static final String GROUP_USERNAME = "item_groups";
public static final String CHAT_ROOM = "item_chatroom";
public static final String ACCOUNT_REMOVED = "account_removed";
public static final String ACCOUNT_CONFLICT = "conflict";
public static final String ACCOUNT_FORBIDDEN = "user_forbidden";
public static final String ACCOUNT_KICKED_BY_CHANGE_PASSWORD = "kicked_by_change_password";
public static final String ACCOUNT_KICKED_BY_OTHER_DEVICE = "kicked_by_another_device";
public static final String CHAT_ROBOT = "item_robots";
public static final String MESSAGE_ATTR_ROBOT_MSGTYPE = "msgtype";
public static final String ACTION_GROUP_CHANAGED = "action_group_changed";
public static final String ACTION_CONTACT_CHANAGED = "action_contact_changed";
public static final String EXTRA_CONFERENCE_ID = "confId";
public static final String EXTRA_CONFERENCE_PASS = "password";
public static final String EXTRA_CONFERENCE_INVITER = "inviter";
public static final String EXTRA_CONFERENCE_IS_CREATOR = "is_creator";
public static final String EXTRA_CONFERENCE_GROUP_ID = "group_id";
public static final String MSG_ATTR_CONF_ID = "conferenceId";
public static final String MSG_ATTR_CONF_PASS = EXTRA_CONFERENCE_PASS;
public static final String MSG_ATTR_EXTENSION = "msg_extension";
}
| [
"1986821027@qq.com"
] | 1986821027@qq.com |
0b2096afc8105986825727a0da2a6211133b5047 | 554c0355a6e7ec75881689572b3282b2c6ff5bc6 | /zaodao-platform/src/main/java/com/acooly/zaodao/platform/entity/PlatOrderEval.java | 655f146f1514e518f606c93a7d3e3b2f06b743b8 | [] | no_license | weichk/zaodao | 2a508aecccae81a15710c275a9dc03b4ec102d87 | 4cbdc3da1a7e02302da6fc889cf4a7a0dbb3da2d | refs/heads/master | 2020-06-06T23:44:35.414570 | 2019-06-20T08:06:28 | 2019-06-20T08:06:28 | 192,877,036 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,645 | java | /*
* zhike@yiji.com Inc.
* Copyright (c) 2017 All Rights Reserved.
* create by zhike
* date:2017-12-11
*/
package com.acooly.zaodao.platform.entity;
import javax.persistence.Entity;
import javax.persistence.Table;
import org.hibernate.validator.constraints.*;
import javax.validation.constraints.*;
import com.acooly.core.common.domain.AbstractEntity;
import java.util.Date;
/**
* zd_plat_order_eval Entity
*
* @author zhike
* Date: 2017-12-11 17:03:29
*/
@Entity
@Table(name = "zd_plat_order_eval")
public class PlatOrderEval extends AbstractEntity {
/** serialVersionUID */
private static final long serialVersionUID = 1L;
/** 游客ID */
@NotEmpty
@Size(max=64)
private String touristId;
/** 导游ID */
@NotEmpty
@Size(max=64)
private String tourGuideId;
/** 订单号 */
@NotEmpty
@Size(max=64)
private String orderNo;
/** 评分 */
private Integer score;
/** 评价内容 */
@Size(max=0)
private String content;
public String getTouristId(){
return this.touristId;
}
public void setTouristId(String touristId){
this.touristId = touristId;
}
public String getTourGuideId(){
return this.tourGuideId;
}
public void setTourGuideId(String tourGuideId){
this.tourGuideId = tourGuideId;
}
public String getOrderNo(){
return this.orderNo;
}
public void setOrderNo(String orderNo){
this.orderNo = orderNo;
}
public Integer getScore(){
return this.score;
}
public void setScore(Integer score){
this.score = score;
}
public String getContent(){
return this.content;
}
public void setContent(String content){
this.content = content;
}
}
| [
"539603511@qq.com"
] | 539603511@qq.com |
7763094fa59dcac61d8b2ca7726e4423c6810893 | b06b46d61f548315fab7aed8030dbb2b53d16f5d | /qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/web/authn/AnonymousAuthenticationFilter.java | c40c11fa514cedd9e3ecb12198d8e783ab149302 | [
"BSD-3-Clause"
] | permissive | davemckain/qtiworks | 7e3af1f37182d374d44bbcf7206f218e1785013a | f1465aad49d575f7fc44ff9eaae3d0d57a323abb | refs/heads/master | 2023-01-05T04:26:02.922223 | 2023-01-04T11:29:04 | 2023-01-04T11:29:04 | 4,086,423 | 57 | 48 | NOASSERTION | 2022-10-28T08:18:29 | 2012-04-20T12:48:06 | Java | UTF-8 | Java | false | false | 7,792 | java | /* Copyright (c) 2012-2013, University of Edinburgh.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* * Neither the name of the University of Edinburgh nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
* This software is derived from (and contains code from) QTItools and MathAssessEngine.
* QTItools is (c) 2008, University of Southampton.
* MathAssessEngine is (c) 2010, University of Edinburgh.
*/
package uk.ac.ed.ph.qtiworks.web.authn;
import uk.ac.ed.ph.qtiworks.QtiWorksLogicException;
import uk.ac.ed.ph.qtiworks.domain.entities.AnonymousUser;
import uk.ac.ed.ph.qtiworks.services.IdentityService;
import uk.ac.ed.ph.qtiworks.services.RequestTimestampContext;
import uk.ac.ed.ph.qtiworks.services.ServiceUtilities;
import uk.ac.ed.ph.qtiworks.services.dao.AnonymousUserDao;
import java.io.IOException;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.context.WebApplicationContext;
/**
* This filter "authenticates" an anonymous user when there is a requirement for the system to
* store information for the user. This works by creating a temporary {@link AnonymousUser}
* matched to the user's JSESSIONID for the user's visit.
*
* <h2>Further notes & issues</h2>
* <ul>
* <li>
* REST URLs are handled slightly differently. No HTTP session is created here, and a faked
* session ID is used instead. This was a late addition before QTIWorks 1.0.0 was released and
* would benefit from being tidied up slightly... (FIXME!)
* </li>
* <li>
* This class doesn't handle session ID collisions well.
* </li>
* </ul>
*
* @author David McKain
*/
public final class AnonymousAuthenticationFilter extends AbstractWebAuthenticationFilter {
private static final Logger logger = LoggerFactory.getLogger(AnonymousAuthenticationFilter.class);
/** Name of session Attribute that will contain the resulting {@link AnonymousUser} for the caller */
private static final String ANONYMOUS_USER_ID_ATTRIBUTE_NAME = "qtiworks.web.authn.anonymousUserId";
private IdentityService identityService;
private AnonymousUserDao anonymousUserDao;
private RequestTimestampContext requestTimestampContext;
@Override
protected void initWithApplicationContext(final FilterConfig filterConfig, final WebApplicationContext webApplicationContext)
throws Exception {
identityService = webApplicationContext.getBean(IdentityService.class);
anonymousUserDao = webApplicationContext.getBean(AnonymousUserDao.class);
requestTimestampContext = webApplicationContext.getBean(RequestTimestampContext.class);
}
@Override
protected void doFilterAuthentication(final HttpServletRequest httpServletRequest,
final HttpServletResponse httpServletResponse,
final FilterChain filterChain, final HttpSession httpSession)
throws IOException, ServletException {
/* See if we already have something in the session */
AnonymousUser anonymousUser = null;
final String pathInfo = httpServletRequest.getPathInfo();
if ("/simplerestrunner".equals(pathInfo)) {
/* Create a special user with HTTP session for REST URLs */
anonymousUser = createRestUser();
logger.debug("Created REST User {} for this request", anonymousUser);
}
else {
final Long anonymousUserId = (Long) httpSession.getAttribute(ANONYMOUS_USER_ID_ATTRIBUTE_NAME);
if (anonymousUserId!=null) {
/* Try to reuse existing anonymous user */
anonymousUser = anonymousUserDao.findById(anonymousUserId);
}
if (anonymousUserId==null || anonymousUser==null) {
/* Nothing in session or user with existing ID not found, so create new anonymous user */
anonymousUser = createAnonymousUser(httpSession);
httpSession.setAttribute(ANONYMOUS_USER_ID_ATTRIBUTE_NAME, anonymousUser.getId());
logger.debug("Created AnonymousUser {} for this session", anonymousUser);
}
}
/* Make sure account is available (slightly pathological here) */
if (anonymousUser.isLoginDisabled()) {
httpServletResponse.sendError(HttpServletResponse.SC_FORBIDDEN, "Your account is currently disabled");
return;
}
identityService.setCurrentThreadUser(anonymousUser);
try {
filterChain.doFilter(httpServletRequest, httpServletResponse);
}
finally {
identityService.setCurrentThreadUser(null);
}
}
private AnonymousUser createAnonymousUser(final HttpSession httpSession) {
final String sessionId = httpSession.getId();
AnonymousUser anonymousUser = anonymousUserDao.findBySessionId(sessionId);
if (anonymousUser!=null) {
throw new QtiWorksLogicException("AnonymousUser with session ID " + sessionId + " already exists in DB");
}
anonymousUser = new AnonymousUser();
anonymousUser.setFirstName("Anonymous User");
anonymousUser.setLastName(sessionId);
anonymousUser.setSessionId(sessionId);
anonymousUserDao.persist(anonymousUser);
return anonymousUser;
}
private AnonymousUser createRestUser() {
final String restRequestId = createRestRequestId();
final AnonymousUser anonymousUser = new AnonymousUser();
anonymousUser.setFirstName("REST User");
anonymousUser.setLastName(restRequestId);
anonymousUser.setSessionId("REST-" + restRequestId);
anonymousUserDao.persist(anonymousUser);
return anonymousUser;
}
/**
* Creates a (hopefully unique) identifier for a REST request.
*/
private String createRestRequestId() {
final String idBuilder = "REST/"
+ requestTimestampContext.getCurrentRequestTimestamp().getTime()
+ "/" + Thread.currentThread().getId()
+ "/" + ServiceUtilities.createRandomAlphanumericToken(32);
return ServiceUtilities.computeSha1Digest(idBuilder);
}
}
| [
"david.mckain@ed.ac.uk"
] | david.mckain@ed.ac.uk |
437174fffa29ca106bef0a82809113d24e646f6a | 60386d67d984f99c518414d6e12458eb710b0026 | /src/main/java/com/easylinker/iot/v2/interceptor/LogInterceptor.java | 80217cae228098f43fd484f21ac6209139b9992a | [] | no_license | wanglanfeng/easylinker2 | 2c26204b5e7d0daae3ef49080088fb945972c29a | 10dadd97ac695bb330ae49eeccd128934f8fe818 | refs/heads/master | 2021-01-25T12:42:23.885633 | 2018-01-17T15:42:43 | 2018-01-17T15:42:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 922 | java | package com.easylinker.iot.v2.interceptor;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Created by wwhai on 2017/11/15.
* 登录日志拦截器
*/
public class LogInterceptor implements HandlerInterceptor {
@Override
public boolean preHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o) throws Exception {
return false;
}
@Override
public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception {
}
@Override
public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception {
}
}
| [
"751957846@qq.com"
] | 751957846@qq.com |
4392a4123b183abeb2a3bf41ba6e5c204bd19499 | 9c65284a0069cf6d0e3bf19919fc229fd74789ba | /gt_front_server/src/main/java/com/gt/service/front/FotcWebChatServiceImpl.java | 1e668d1e029d4a53827da84ea745ff41602ec747 | [] | no_license | moguli/powex | 95aa2699b6fbf92aef6ab7b5203864148af29467 | 56348db54db9456234010e5a20f9f8a09d234c64 | refs/heads/master | 2022-12-28T03:52:59.442332 | 2019-09-08T10:04:25 | 2019-09-08T10:04:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,036 | java | package com.gt.service.front;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gt.dao.FotcWebChatDAO;
import com.gt.entity.FotcWebChat;
import com.gt.service.front.FotcWebChatService;
@Service("fotcWebChatService")
public class FotcWebChatServiceImpl implements FotcWebChatService{
@Autowired
private FotcWebChatDAO fotcWebChatDAO;
@Override
public List<FotcWebChat> findAllFotcWebChat(String key, Object value) {
return fotcWebChatDAO.findAllFotcWebChat(key, value);
}
@Override
public Integer save(FotcWebChat obj) {
return fotcWebChatDAO.save(obj);
}
@Override
public void update(FotcWebChat obj) {
fotcWebChatDAO.update(obj);
}
@Override
public FotcWebChat queryById(Integer id) {
return fotcWebChatDAO.queryById(id);
}
@Override
public List<FotcWebChat> list(int firstResult, int maxResults, String filter, boolean isFY) {
return fotcWebChatDAO.list(firstResult, maxResults, filter, isFY);
}
}
| [
"185428479@qq.com"
] | 185428479@qq.com |
25ca8b1aaec72a5fedcfc9eb7a3be5d1ea87163e | 9066604412f38c469c92030f3d16e293c5ff861e | /src/main/java/com/flexible/afteradvice/GreetAfterAdvice.java | 4e6b360f43a0c83bce567db1d11c88c5f11957c9 | [] | no_license | chenanddom/SpringSection7 | fefdf1f67e02080d0441436ab2548e1b23216426 | f4c98592ecd8a23e76a4019992ce08a4e13607f8 | refs/heads/master | 2020-04-07T13:21:54.886594 | 2018-12-07T02:48:19 | 2018-12-07T02:48:19 | 158,404,491 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 528 | java | package com.flexible.afteradvice;
import org.springframework.aop.AfterReturningAdvice;
import org.springframework.aop.MethodBeforeAdvice;
import java.lang.reflect.Method;
/**
* Created with IntelliJ IDEA.
* Description:
* User: chendom
* Date: 2018-11-22
* Time: 9:25
*/
public class GreetAfterAdvice implements AfterReturningAdvice {
@Override
public void afterReturning(Object o, Method method, Object[] objects, Object o1) throws Throwable {
System.out.println("please enjoy yourself....");
}
}
| [
"772571631@qq.com"
] | 772571631@qq.com |
4a656dd5bc23518234391347aceff227ce01d4c3 | 96d09c117b6c9cafc3fc077acfac0bc0ad30bef5 | /java/src/consulo/google/protobuf/java/JavaGoogleProtobufSupportProvider.java | b8bd9558a0141882db62f9cdb92c5db347317708 | [
"Apache-2.0"
] | permissive | gidl/consulo-google-protobuf | a96fcfeea4f9abca7c8eeac2a2648e2ab2e4f046 | bb8396d1844767615f3c9f3fb689159ccfc01949 | refs/heads/master | 2021-06-16T19:23:41.473164 | 2017-04-28T23:17:13 | 2017-04-28T23:17:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,395 | java | package consulo.google.protobuf.java;
import java.util.ArrayList;
import java.util.List;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.psi.JavaPsiFacade;
import com.intellij.util.ArrayUtil;
import consulo.google.protobuf.module.extension.GoogleProtobufSupportProvider;
import consulo.java.module.extension.JavaModuleExtension;
import consulo.module.extension.ModuleExtension;
import consulo.psi.PsiPackage;
import protobuf.lang.psi.api.PbFile;
import protobuf.lang.psi.api.declaration.PbMessageDef;
import protobuf.lang.psi.api.member.PbOptionAssignment;
/**
* @author VISTALL
* @since 06.07.13.
*/
public class JavaGoogleProtobufSupportProvider implements GoogleProtobufSupportProvider
{
@NotNull
@Override
public Class<? extends ModuleExtension> getExtensionClass()
{
return JavaModuleExtension.class;
}
@Nullable
@Override
public PsiPackage findPackage(Module module, @NotNull String name)
{
return JavaPsiFacade.getInstance(module.getProject()).findPackage(name);
}
@NotNull
@Override
public String getExePath()
{
return SystemInfo.isWindows ? "protoc.exe" : "protoc";
}
@NotNull
@Override
public String[] getAdditionalArguments()
{
return new String[] {"--java_out=.", "$FileName$"};
}
@NotNull
@Override
public String[] getGeneratedFiles(@NotNull PbFile pbFile)
{
String packageName = getJavaPackageName(pbFile);
List<String> list = new ArrayList<String>();
for(String f : getJavaClassNames(pbFile))
{
StringBuilder builder = new StringBuilder();
builder.append("$OutPath$");
if(!StringUtil.isEmpty(packageName))
{
builder.append("/").append(packageName.replace(".", "/"));
}
builder.append("/").append(f).append(".java");
list.add(builder.toString());
}
return ArrayUtil.toStringArray(list);
}
/**
* Gets the Java package name for this file, looking first for the <code>option java_package...</code> declaration
* and falling back to the regular package definition.
*
* @return the Java package name
*/
private String getJavaPackageName(PbFile pbFile)
{
String packageName = pbFile.getPackageName();
final PbOptionAssignment[] optionAssignments = pbFile.getOptions();
for(PbOptionAssignment assignment : optionAssignments)
{
if("java_package".equals(assignment.getOptionName()))
{
packageName = assignment.getOptionValue();
break;
}
}
return packageName;
}
/**
* <p>Gets the Java class name(s) that will be generated from this file. This must be a List to allow for the behavior
* when the <code>option java_multiple_files...</code> declaration is used.</p>
* <p/>
* <p>Mimics the behavior of the protobuf compiler, considering the <code>option java_outer_classname...</code>
* declaration, and the <code>option java_multiple_files...</code> declaration, falling back to the camel-cased name
* of the .proto file.</p>
*
* @return the Java class name(s)
*/
public List<String> getJavaClassNames(PbFile pbFile)
{
List<String> classNames = new ArrayList<String>();
final PbOptionAssignment[] optionAssignments = pbFile.getOptions();
String name = pbFile.getName();
String fileName = name.substring(0, name.indexOf(".proto"));
boolean useMultipleFiles = false;
for(PbOptionAssignment assignment : optionAssignments)
{
// Note: java_outer_class_name and java_multiple_files are NOT mutually exclusive.
if("java_outer_classname".equals(assignment.getOptionName()))
{
fileName = assignment.getOptionValue();
}
else if("java_multiple_files".equals(assignment.getOptionName()))
{
useMultipleFiles = Boolean.valueOf(assignment.getOptionValue());
}
}
if(useMultipleFiles)
{
PbMessageDef[] messageDefs = pbFile.getMessageDefinitions();
for(PbMessageDef messageDef : messageDefs)
{
classNames.add(messageDef.getName());
}
// When using multiple files, a class containing the .proto file's descriptor and initialization code is also
// generated for the file containing the .proto defs.
classNames.add(StringUtil.capitalizeWords(fileName, "_", true, false));
}
else
{
classNames.add(StringUtil.capitalizeWords(fileName, "_", true, false));
}
return classNames;
}
}
| [
"vistall.valeriy@gmail.com"
] | vistall.valeriy@gmail.com |
ab029c7e16a75458943e56e2325e197f56650276 | 028cbe18b4e5c347f664c592cbc7f56729b74060 | /external/modules/weld/core/1.1.8.Final/tests-arquillian/src/test/java/org/jboss/weld/tests/beanManager/serializability/ManagerTest.java | 183168f63bc4547232f52ad5b98ce7d6db604407 | [] | no_license | dmatej/Glassfish-SVN-Patched | 8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e | 269e29ba90db6d9c38271f7acd2affcacf2416f1 | refs/heads/master | 2021-05-28T12:55:06.267463 | 2014-11-11T04:21:44 | 2014-11-11T04:21:44 | 23,610,469 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,044 | java | /*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat, Inc., and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* 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.jboss.weld.tests.beanManager.serializability;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.weld.literal.DefaultLiteral;
import org.jboss.weld.manager.BeanManagerImpl;
import org.jboss.weld.test.util.Utils;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import javax.enterprise.context.Dependent;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.inject.Inject;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
@RunWith(Arquillian.class)
public class ManagerTest {
@Deployment
public static Archive<?> deploy() {
return ShrinkWrap.create(WebArchive.class, "test.war")
.addPackage(ManagerTest.class.getPackage())
.addClass(Utils.class)
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
}
private static final Set<Annotation> DEFAULT_QUALIFIERS = Collections.<Annotation>singleton(DefaultLiteral.INSTANCE);
private static interface Dummy {
}
private static class DummyBean implements Bean<Dummy> {
private static final Set<Type> TYPES = new HashSet<Type>();
static {
TYPES.add(Dummy.class);
TYPES.add(Object.class);
}
public Set<Annotation> getQualifiers() {
return DEFAULT_QUALIFIERS;
}
public Set<InjectionPoint> getInjectionPoints() {
return Collections.emptySet();
}
public String getName() {
return null;
}
public Class<? extends Annotation> getScope() {
return Dependent.class;
}
public Set<Type> getTypes() {
return TYPES;
}
public boolean isNullable() {
return true;
}
public Dummy create(CreationalContext<Dummy> creationalContext) {
return null;
}
public void destroy(Dummy instance, CreationalContext<Dummy> creationalContext) {
}
public Class<?> getBeanClass() {
return Dummy.class;
}
public boolean isAlternative() {
return false;
}
public Set<Class<? extends Annotation>> getStereotypes() {
return Collections.emptySet();
}
}
@Inject
private BeanManagerImpl beanManager;
@Test
public void testRootManagerSerializability() throws Exception {
String rootManagerId = beanManager.getId();
BeanManagerImpl deserializedRootManager = (BeanManagerImpl) Utils.deserialize(Utils.serialize(beanManager));
Assert.assertEquals(rootManagerId, deserializedRootManager.getId());
Assert.assertEquals(1, beanManager.getBeans(Foo.class).size());
Assert.assertEquals(1, deserializedRootManager.getBeans(Foo.class).size());
Assert.assertEquals(
deserializedRootManager.getBeans(Foo.class).iterator().next(),
beanManager.getBeans(Foo.class).iterator().next());
}
@Test
public void testChildManagerSerializability() throws Exception {
BeanManagerImpl childManager = beanManager.createActivity();
Bean<?> dummyBean = new DummyBean();
childManager.addBean(dummyBean);
String childManagerId = childManager.getId();
BeanManagerImpl deserializedChildManager = (BeanManagerImpl) Utils.deserialize(Utils.serialize(childManager));
Assert.assertEquals(childManagerId, deserializedChildManager.getId());
Assert.assertEquals(1, childManager.getBeans(Dummy.class).size());
Assert.assertEquals(1, deserializedChildManager.getBeans(Dummy.class).size());
Assert.assertEquals(
deserializedChildManager.getBeans(Dummy.class).iterator().next(),
childManager.getBeans(Dummy.class).iterator().next());
}
}
| [
"jjsnyder83@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5"
] | jjsnyder83@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5 |
52d0197bc121364a8912b8423804be6ed2455675 | d7de50fc318ff59444caabc38d274f3931349f19 | /src/android/support/v4/app/FragmentPagerAdapter.java | e85845eb322908d247ab7459a7ddbd4857c9a393 | [] | no_license | reverseengineeringer/fr.dvilleneuve.lockito | 7bbd077724d61e9a6eab4ff85ace35d9219a0246 | ad5dbd7eea9a802e5f7bc77e4179424a611d3c5b | refs/heads/master | 2021-01-20T17:21:27.500016 | 2016-07-19T16:23:04 | 2016-07-19T16:23:04 | 63,709,932 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,433 | java | package android.support.v4.app;
import android.os.Parcelable;
import android.support.v4.view.PagerAdapter;
import android.view.View;
import android.view.ViewGroup;
public abstract class FragmentPagerAdapter
extends PagerAdapter
{
private static final boolean DEBUG = false;
private static final String TAG = "FragmentPagerAdapter";
private FragmentTransaction mCurTransaction = null;
private Fragment mCurrentPrimaryItem = null;
private final FragmentManager mFragmentManager;
public FragmentPagerAdapter(FragmentManager paramFragmentManager)
{
mFragmentManager = paramFragmentManager;
}
private static String makeFragmentName(int paramInt, long paramLong)
{
return "android:switcher:" + paramInt + ":" + paramLong;
}
public void destroyItem(ViewGroup paramViewGroup, int paramInt, Object paramObject)
{
if (mCurTransaction == null) {
mCurTransaction = mFragmentManager.beginTransaction();
}
mCurTransaction.detach((Fragment)paramObject);
}
public void finishUpdate(ViewGroup paramViewGroup)
{
if (mCurTransaction != null)
{
mCurTransaction.commitNowAllowingStateLoss();
mCurTransaction = null;
}
}
public abstract Fragment getItem(int paramInt);
public long getItemId(int paramInt)
{
return paramInt;
}
public Object instantiateItem(ViewGroup paramViewGroup, int paramInt)
{
if (mCurTransaction == null) {
mCurTransaction = mFragmentManager.beginTransaction();
}
long l = getItemId(paramInt);
Object localObject = makeFragmentName(paramViewGroup.getId(), l);
localObject = mFragmentManager.findFragmentByTag((String)localObject);
if (localObject != null) {
mCurTransaction.attach((Fragment)localObject);
}
for (paramViewGroup = (ViewGroup)localObject;; paramViewGroup = (ViewGroup)localObject)
{
if (paramViewGroup != mCurrentPrimaryItem)
{
paramViewGroup.setMenuVisibility(false);
paramViewGroup.setUserVisibleHint(false);
}
return paramViewGroup;
localObject = getItem(paramInt);
mCurTransaction.add(paramViewGroup.getId(), (Fragment)localObject, makeFragmentName(paramViewGroup.getId(), l));
}
}
public boolean isViewFromObject(View paramView, Object paramObject)
{
return ((Fragment)paramObject).getView() == paramView;
}
public void restoreState(Parcelable paramParcelable, ClassLoader paramClassLoader) {}
public Parcelable saveState()
{
return null;
}
public void setPrimaryItem(ViewGroup paramViewGroup, int paramInt, Object paramObject)
{
paramViewGroup = (Fragment)paramObject;
if (paramViewGroup != mCurrentPrimaryItem)
{
if (mCurrentPrimaryItem != null)
{
mCurrentPrimaryItem.setMenuVisibility(false);
mCurrentPrimaryItem.setUserVisibleHint(false);
}
if (paramViewGroup != null)
{
paramViewGroup.setMenuVisibility(true);
paramViewGroup.setUserVisibleHint(true);
}
mCurrentPrimaryItem = paramViewGroup;
}
}
public void startUpdate(ViewGroup paramViewGroup)
{
if (paramViewGroup.getId() == -1) {
throw new IllegalStateException("ViewPager with adapter " + this + " requires a view id");
}
}
}
/* Location:
* Qualified Name: android.support.v4.app.FragmentPagerAdapter
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
2663c708637857e092fe829d5b4fed65cbeb589f | bfc7a4cda00a0b89d4b984c83976770b0523f7f5 | /OA/JavaSource/com/icss/oa/votebbs/admin/ArticleOptionListServlet.java | 0e6845f55d2946bf4c01335dee073961d25239da | [] | no_license | liveqmock/oa | 100c4a554c99cabe0c3f9af7a1ab5629dcb697a6 | 0dfbb239210d4187e46a933661a031dba2711459 | refs/heads/master | 2021-01-18T05:02:00.704337 | 2015-03-03T06:47:30 | 2015-03-03T06:47:30 | 35,557,095 | 0 | 1 | null | 2015-05-13T15:26:06 | 2015-05-13T15:26:06 | null | GB18030 | Java | false | false | 2,104 | java | /*
* Created on 2004-12-4
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package com.icss.oa.votebbs.admin;
import java.io.IOException;
import java.sql.Connection;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.icss.j2ee.services.DBConnectionLocator;
import com.icss.j2ee.servlet.ServletBase;
import com.icss.j2ee.util.Globals;
import com.icss.oa.votebbs.handler.BbsVoteHandler;
/**
* @author firecoral
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class ArticleOptionListServlet extends ServletBase{
/* (non-Javadoc)
* @see com.icss.j2ee.servlet.ServletBase#performTask(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
protected void performTask(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// System.out.println("+++++++++++ArticleOptionListServlet++++++++");
Connection conn = null;
List list = null;
Integer mainid=request.getParameter("mainid")==null?new Integer(-1):Integer.valueOf(request.getParameter("mainid"));
try {
conn =
DBConnectionLocator.getInstance().getConnection(
Globals.DATASOURCEJNDI);
BbsVoteHandler handler = new BbsVoteHandler(conn);
// System.out.println("+++++++++++ArticleOptionListServlet++++++++"+mainid);
//得到显示列表
list=handler.getarticalOptionList(mainid);
request.setAttribute("list",list);
// System.out.println("+++++++++++ArticleOptionListServlet++++++list++"+list.size());
this.forward(request, response, "/votebbs/option_manager.jsp");
//
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (conn != null)
conn.close();
} catch (Exception e1) {
e1.printStackTrace();
}
}
}
}
| [
"peijn1026@gmail.com"
] | peijn1026@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.