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
7b126f4b24aff0b822b8e9f1192dbdcc2be71f4b
f08191da262305786287bd1a4a41671a1c1960f7
/MiuiSystemUI/raphael/systemui/volume/ZenFooter.java
0b31f014cfc4a4cf25b08ed9916bba2715baf3a3
[]
no_license
lmjssjj/arsc_compare
f75acb947d890503defb9189e78e7019cb9b58e4
bf5ce3bb50f6b1595d373cd159f83b6b800dff37
refs/heads/master
2022-11-11T02:42:10.896103
2020-07-08T00:46:54
2020-07-08T00:46:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,441
java
package com.android.systemui.volume; import android.animation.LayoutTransition; import android.animation.ValueAnimator; import android.content.Context; import android.service.notification.Condition; import android.service.notification.ZenModeConfig; import android.util.AttributeSet; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.android.systemui.Prefs; import com.android.systemui.plugins.R; import com.android.systemui.statusbar.policy.ZenModeController; import java.util.Objects; public class ZenFooter extends LinearLayout { private static final String TAG = Util.logTag(ZenFooter.class); private ZenModeConfig mConfig; private final ConfigurableTexts mConfigurableTexts; private final Context mContext; private ZenModeController mController; private TextView mEndNowButton; private ImageView mIcon; private TextView mSummaryLine1; private TextView mSummaryLine2; private int mZen = -1; private final ZenModeController.Callback mZenCallback = new ZenModeController.Callback() { public void onConditionsChanged(Condition[] conditionArr) { } public void onEffectsSupressorChanged() { } public void onManualRuleChanged(ZenModeConfig.ZenRule zenRule) { } public void onNextAlarmChanged() { } public void onZenAvailableChanged(boolean z) { } public void onZenChanged(int i) { ZenFooter.this.setZen(i); } public void onConfigChanged(ZenModeConfig zenModeConfig) { ZenFooter.this.setConfig(zenModeConfig); } }; private View mZenIntroduction; private View mZenIntroductionConfirm; private TextView mZenIntroductionMessage; public ZenFooter(Context context, AttributeSet attributeSet) { super(context, attributeSet); this.mContext = context; this.mConfigurableTexts = new ConfigurableTexts(this.mContext); LayoutTransition layoutTransition = new LayoutTransition(); layoutTransition.setDuration(new ValueAnimator().getDuration() / 2); setLayoutTransition(layoutTransition); } /* access modifiers changed from: protected */ public void onFinishInflate() { super.onFinishInflate(); this.mIcon = (ImageView) findViewById(R.id.volume_zen_icon); this.mSummaryLine1 = (TextView) findViewById(R.id.volume_zen_summary_line_1); this.mSummaryLine2 = (TextView) findViewById(R.id.volume_zen_summary_line_2); this.mEndNowButton = (TextView) findViewById(R.id.volume_zen_end_now); this.mZenIntroduction = findViewById(R.id.zen_introduction); this.mZenIntroductionMessage = (TextView) findViewById(R.id.zen_introduction_message); this.mConfigurableTexts.add(this.mZenIntroductionMessage, R.string.zen_alarms_introduction); this.mZenIntroductionConfirm = findViewById(R.id.zen_introduction_confirm); this.mZenIntroductionConfirm.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { ZenFooter.this.confirmZenIntroduction(); } }); Util.setVisOrGone(this.mZenIntroduction, shouldShowIntroduction()); this.mConfigurableTexts.add(this.mSummaryLine1); this.mConfigurableTexts.add(this.mSummaryLine2); this.mConfigurableTexts.add(this.mEndNowButton, R.string.volume_zen_end_now); } /* access modifiers changed from: private */ public void setZen(int i) { if (this.mZen != i) { this.mZen = i; update(); updateIntroduction(); } } /* access modifiers changed from: private */ public void setConfig(ZenModeConfig zenModeConfig) { if (!Objects.equals(this.mConfig, zenModeConfig)) { this.mConfig = zenModeConfig; update(); } } /* access modifiers changed from: private */ public void confirmZenIntroduction() { Prefs.putBoolean(this.mContext, "DndConfirmedAlarmIntroduction", true); updateIntroduction(); } private boolean isZenPriority() { return this.mZen == 1; } private boolean isZenAlarms() { return this.mZen == 3; } private boolean isZenNone() { return this.mZen == 2; } public void update() { String str; this.mIcon.setImageResource(isZenNone() ? R.drawable.ic_dnd_total_silence : R.drawable.ic_dnd); if (isZenPriority()) { str = this.mContext.getString(R.string.interruption_level_priority); } else if (isZenAlarms()) { str = this.mContext.getString(R.string.interruption_level_alarms); } else { str = isZenNone() ? this.mContext.getString(R.string.interruption_level_none) : null; } Util.setText(this.mSummaryLine1, str); Util.setText(this.mSummaryLine2, ZenModeConfig.getConditionSummary(this.mContext, this.mConfig, this.mController.getCurrentUser(), true)); } public boolean shouldShowIntroduction() { if (Prefs.getBoolean(this.mContext, "DndConfirmedAlarmIntroduction", false) || !isZenAlarms()) { return false; } return true; } public void updateIntroduction() { Util.setVisOrGone(this.mZenIntroduction, shouldShowIntroduction()); } }
[ "viiplycn@gmail.com" ]
viiplycn@gmail.com
f531b2c72508f276d1c2b2d868da5f6241499933
7b82d70ba5fef677d83879dfeab859d17f4809aa
/tmp/sys/fastquery/src/main/java/org/fastquery/where/Operator.java
349a57fee967b776a70797bb9f45ade339669e2e
[ "Apache-2.0" ]
permissive
apollowesley/jun_test
fb962a28b6384c4097c7a8087a53878188db2ebc
c7a4600c3f0e1b045280eaf3464b64e908d2f0a2
refs/heads/main
2022-12-30T20:47:36.637165
2020-10-13T18:10:46
2020-10-13T18:10:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,124
java
/* * Copyright (c) 2016-2016, fastquery.org and/or its affiliates. All rights reserved. * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * For more information, please see http://www.fastquery.org/. * */ package org.fastquery.where; /** * * @author xixifeng (fastquery@126.com) */ public enum Operator { /** * = 相等 EQ 是 equal的缩写 */ EQ("="), /** * < LT 是 less than的缩写 */ LT("<"), /** * > GT 是 greater than的缩写 */ GT(">"), /** * <> 不等与 NE 是 not equal的缩写 */ NE("<>"), /** * != 不等与 */ NEQ("!="), /** * !>(不大于)not greater than */ NGT("!>"), /** * !<(不小于) not less than */ NLT("!<"), /** * >=(大于等于) greater or equal */ GE(">="), /** * <=(小于等于) less or equal */ LE("<="), /** * LIKE 像 */ LIKE("LIKE"), /** * IN */ IN("IN"), /** * NOT */ NOT("NOT"), /** * IS */ IS("IS"), /** * NULL */ NULL("NULL"), /** * BETWEEN */ BETWEEN("BETWEEN"), /** * SOME */ SOME("SOME"), NONE(""); // http://www.cnblogs.com/libingql/p/4097460.html // http://www.jb51.net/article/57342.htm // http://www.w3school.com.cn/sql/sql_in.asp private String name; private Operator(String name) { this.name = name; } public String getVal() { return name; } }
[ "wujun728@hotmail.com" ]
wujun728@hotmail.com
9b72eb7798d26aef4535e10b0b793e0ed6780fec
1e19314a8b1f0b64ae442a485d79fa9151a1107e
/src/by/it/akhmelev/jd01_08/_01_Card/CardRunner.java
8a8f4083ed7ef18395e498b2342bddd5b7000d9a
[]
no_license
igorkiselev93/JD2017-12-16
2271cdc1c161eabc10009b0638de8b194489d581
7bb21bfe1358cf9611bce9684907fb2d7e8b0e44
refs/heads/master
2021-05-10T08:34:50.864238
2018-02-22T10:21:57
2018-02-22T10:21:57
118,894,315
1
0
null
2018-01-25T09:50:05
2018-01-25T09:50:04
null
UTF-8
Java
false
false
1,001
java
package by.it.akhmelev.jd01_08._01_Card; public class CardRunner { public static void main(String[ ] args) { CardAction dc1 = new CardAction(); CardAction dc2 = new CreditCardAction(); CreditCardAction cc = new CreditCardAction(); // CreditCardAction cca = new CardAction(); // ошибка компиляции dc1.doPayment(15.5); // метод класса CardAction dc2.doPayment(21.2); // полиморфный метод класса CreditCardAction cc.doPayment(7.0); // полиморфный метод класса CreditCardAction cc.checkCreditLimit(); // неполиморфный метод класса CreditCardAction // dc2.checkCreditLimit(); // ошибка компиляции – неполиморфный метод ((CreditCardAction)dc1).checkCreditLimit(); // ошибка времени выполнения ((CreditCardAction)dc2).checkCreditLimit(); // ок } }
[ "375336849110@tut.by" ]
375336849110@tut.by
d68ab8f500b6040c92db7d220e46e47eb1f6e923
2b8c47031dddd10fede8bcf16f8db2b52521cb4f
/subject SPLs and test cases/BerkeleyDB(5)/BerkeleyDB_P3/evosuite-tests2/com/sleepycat/je/log/LogException_ESTest_scaffolding2.java
b2de289fd7b38de8901144d8da9beb1fb82eb07a
[]
no_license
psjung/SRTST_experiments
6f1ff67121ef43c00c01c9f48ce34f31724676b6
40961cb4b4a1e968d1e0857262df36832efb4910
refs/heads/master
2021-06-20T04:45:54.440905
2019-09-06T04:05:38
2019-09-06T04:05:38
206,693,757
1
0
null
2020-10-13T15:50:41
2019-09-06T02:10:06
Java
UTF-8
Java
false
false
1,444
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Apr 22 00:59:45 KST 2017 */ package com.sleepycat.je.log; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class LogException_ESTest_scaffolding2 { @org.junit.Rule public org.junit.rules.Timeout globalTimeout = new org.junit.rules.Timeout(4000); 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 = "com.sleepycat.je.log.LogException"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } }
[ "psjung@kaist.ac.kr" ]
psjung@kaist.ac.kr
902919945ff19c0089853536e7ed5d423e514ff9
f7c2f1c1e6fa27374fce19f422e5fa86e1595990
/my-admin-01/app-module/app-jooq-mybatis-mapper/app-db-jooq-mybatis-mapper/src/main/java/org/yuan/boot/app/db/module/mybatis/jooq/mapper/module/dao/impl/AdminUserDaoImpl.java
c716472adcc0db2ed3a75828278a95a1aa157239
[]
no_license
yuan50697105/my-admin-2019
d3ecbe283fdcda67ad870bc436551eb5020f4944
29cc3e5e2e480277329352855c71eeacabec4314
refs/heads/master
2022-07-02T00:18:57.210467
2020-04-06T08:02:33
2020-04-06T08:02:33
253,431,240
0
0
null
2022-06-21T03:09:54
2020-04-06T07:53:13
Java
UTF-8
Java
false
false
1,327
java
package org.yuan.boot.app.db.module.mybatis.jooq.mapper.module.dao.impl; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import org.springframework.stereotype.Component; import org.yuan.boot.app.db.module.mybatis.jooq.mapper.commons.dao.impl.BaseDaoImpl; import org.yuan.boot.app.db.module.mybatis.jooq.mapper.module.dao.AdminUserDao; import org.yuan.boot.app.db.module.mybatis.jooq.mapper.module.mapper.AdminUserMapper; import org.yuan.boot.app.db.module.mybatis.jooq.mapper.module.pojo.AdminUser; import org.yuan.boot.app.db.module.mybatis.jooq.mapper.module.pojo.condition.AdminUserQuery; import org.yuan.boot.commons.base.module.mybatis.jooq.mapper.pojo.PageResult; import java.util.List; /** * @program: my-admin-01 * @description: * @author: yuane * @create: 2020-02-20 00:56 */ @Component public class AdminUserDaoImpl extends BaseDaoImpl<AdminUser, AdminUserMapper> implements AdminUserDao { @Override public PageResult<AdminUser> selectPageByCondition(AdminUserQuery condition) { PageHelper.startPage(condition); return new PageResult<>(PageInfo.of(baseMapper.selectByCondition(condition))); } @Override public List<AdminUser> selectListByCondition(AdminUserQuery condition) { return baseMapper.selectByCondition(condition); } }
[ "33301332+yuan50697105@users.noreply.github.com" ]
33301332+yuan50697105@users.noreply.github.com
66d5823a454cec3d103aaa11439a831722dc7682
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/21/21_6c5b23cb4769d46b6a9e13f1f89e34c2d6049fa8/DrawOrderManager/21_6c5b23cb4769d46b6a9e13f1f89e34c2d6049fa8_DrawOrderManager_s.java
3d3fb335b0d42ce417c44a470711096e97c74b37
[]
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,398
java
/* Copyright 2010 Ben Ruijl, Wouter Smeenk This file is part of Walled In. Walled In 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, or (at your option) any later version. Walled In 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 Walled In; see the file LICENSE. If not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ package walledin.game; import java.util.Collection; import java.util.Comparator; import java.util.HashSet; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; import org.apache.log4j.Logger; import walledin.engine.Renderer; import walledin.game.entity.Attribute; import walledin.game.entity.Entity; import walledin.game.entity.MessageType; import walledin.game.network.server.Server; public class DrawOrderManager { private static final Logger LOG = Logger.getLogger(Server.class); private static class ZOrderComperator implements Comparator<Entity> { @Override public int compare(final Entity o1, final Entity o2) { final int zA = (Integer) o1.getAttribute(Attribute.Z_INDEX); final int zB = (Integer) o2.getAttribute(Attribute.Z_INDEX); if (zA == zB) { return o1.getName().compareTo(o2.getName()); } return zA - zB; } } private final SortedSet<Entity> entities; private final Set<Entity> addLater; private final Set<Entity> removeLater; public DrawOrderManager() { super(); entities = new TreeSet<Entity>(new ZOrderComperator()); addLater = new HashSet<Entity>(); removeLater = new HashSet<Entity>(); } /** * Add a list of entities to a list sorted on z-index * * @param Collection * of entities to be added */ public void add(final Collection<Entity> entitiesList) { for (final Entity en : entitiesList) { add(en); } } /** * Add entity to a list sorted on z-index * * @param e * Entity to be added * @return True if added, false if not */ public boolean add(final Entity e) { if (!e.hasAttribute(Attribute.Z_INDEX)) { return false; } return addLater.add(e); } public void removeEntity(final Entity entity) { if (entity == null) { LOG.debug("removing null!"); } removeLater.add(entity); } public SortedSet<Entity> getList() { return entities; } public void draw(final Renderer renderer) { entities.addAll(addLater); entities.removeAll(removeLater); addLater.clear(); removeLater.clear(); /* Draw all entities in the correct order */ for (final Entity ent : entities) { ent.sendMessage(MessageType.RENDER, renderer); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
5b0518dcf941fc852ea1ff38bb47c8c151373d27
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/digits/317aa7055d3b7337ab43b73863692d1288ca246c473f9fd176bc737a7c3e1e08c37a15603cfb7bfc86f7bc2dcc239967b79b605aec11f86ae3ab90dc140b540f/004/mutations/99/digits_317aa705_004.java
1f14ebf9e99672c2b2cb43b1872cf70185e55c70
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,191
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class digits_317aa705_004 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { digits_317aa705_004 mainClass = new digits_317aa705_004 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { IntObj integer = new IntObj (), i = new IntObj (), digit = new IntObj (); output += (String.format ("\nEnter an integer > ")); integer.value = scanner.nextInt (); digit.value = 0; for (i.value = 1; i.value <= 10; i.value += 1) { integer.value = (integer.value) / 10 if (integer.value == 0) { output += (String.format ("0\n")); break; } else if (Math.abs (digit.value) < 10) { digit.value = Math.abs (digit.value); output += (String.format ("%d\n", digit.value)); } integer.value = integer.value / 10; if (Math.abs (integer.value) < 10 && integer.value != 0) { output += (String.format ("%d\n", integer.value)); break; } } output += (String.format ("\nThat's all, have a nice day!\n")); if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
3352baada63aa6e37557c25a0b29ccf25ce572cf
377b93826d2efa2b15d347a1dfa6d723433da4eb
/WebServer_v15_1_JS/WebServer_v15_1_JS/src/main/java/com/tedu/webserver/http/HttpResponse.java
f52660652770fc8abd1030706631898c0b1c218d
[]
no_license
ladanniel/WebServer_v15_1_JS
072965bf39fde4ce9437dd38d055b1f0b5381786
948d74fa1b0cb7b2c7f7184eaf24585a7c6cc790
refs/heads/master
2020-04-06T15:28:52.411594
2018-11-14T16:45:15
2018-11-14T16:45:15
157,580,040
0
0
null
null
null
null
UTF-8
Java
false
false
4,214
java
package com.tedu.webserver.http; import java.io.File; import java.io.FileInputStream; import java.io.OutputStream; import java.net.Socket; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Set; /** * 响应对象 该类的每个实例用于表示一个服务端发送给客户端的 响应内容 * * @author adminitartor * */ public class HttpResponse { private Socket socket; private OutputStream out; /* * 状态行相关信息定义 */ // 状态代码 private int statusCode; /* * 响应头相关信息定义 */ private Map<String, String> headers = new HashMap<String, String>(); /* * 响应正文相关信息定义 */ // 要响应的实体文件 private File entity; public HttpResponse(Socket socket) { try { this.socket = socket; this.out = socket.getOutputStream(); } catch (Exception e) { e.printStackTrace(); } } /** * 将响应内容按照HTTP协议格式发送给客户端 */ public void flush() { /* * 响应客户端做三件事 1:发送状态行 2:发送响应头 3:发送响应正文 */ sendStatusLine(); sendHeaders(); sendContent(); } /** * 发送状态行 */ private void sendStatusLine() { try { String line = "HTTP/1.1" + " " + statusCode + " " + HttpContext.getStatusReason(statusCode); println(line); } catch (Exception e) { e.printStackTrace(); } } /** * 发送响应头 */ private void sendHeaders() { try { // 遍历headers,将所有消息头发送至客户端 Set<Entry<String, String>> set = headers.entrySet(); for (Entry<String, String> header : set) { // 获取消息头的名字 String name = header.getKey(); // 获取消息头对应的值 String value = header.getValue(); String line = name + ": " + value; println(line); } // 表示响应头部分发送完毕 println(""); } catch (Exception e) { e.printStackTrace(); } } /** * 发送响应正文 */ private void sendContent() { if (entity != null) { try (FileInputStream fis = new FileInputStream(entity);) { byte[] data = new byte[1024 * 10]; int len = -1; while ((len = fis.read(data)) != -1) { out.write(data, 0, len); } } catch (Exception e) { e.printStackTrace(); } } } /** * 将给定字符串按行发送给客户端(以CRLF结尾) * * @param line */ private void println(String line) { try { out.write(line.getBytes("ISO8859-1")); out.write(13);// written CR out.write(10);// written LF } catch (Exception e) { e.printStackTrace(); } } /** * 从定向到指定路径 * * @param url */ public void sendRedirect(String url) { // 设置代码 this.statusCode = 302; this.headers.put("location", url); } public int getStatusCode() { return statusCode; } public void setStatusCode(int statusCode) { this.statusCode = statusCode; } public File getEntity() { return entity; } /** * 设置响应的实体文件数据 该方法会自动添加对应的两个响应头: Content-Type与Content-Length * * @param entity */ public void setEntity(File entity) { this.entity = entity; /* * 1:添加响应头Content-Length */ this.headers.put("Content-Length", entity.length() + ""); /* * 2:添加响应头Content-Type 2.1:先通过entity获取该文件的名字 2.2:获取该文件名的后缀名 * 2.3:通过HttpContext根据该后缀名获取到 对应的Content-Type的值 2.4:向headers中设置该响应头信息 */ // 2.1 例如:xxx.png String name = entity.getName(); // 2.2 png String ext = name.substring(name.lastIndexOf(".") + 1); // 2.3 String type = HttpContext.getMimeType(ext); // 2.4 this.headers.put("Content-Type", type); } /** * 添加一个响应头 * * @param name * 响应头的名字 * @param value * 响应头对应的值 */ public void putHeaders(String name, String value) { this.headers.put(name, value); } }
[ "ldanniel@sina.com" ]
ldanniel@sina.com
486659959a744de923d6a9b412098443d7c46c98
6a94ce565aba7eff2963b100763e7462417f0f1a
/src/main/java/module-info.java
0a040f4a648177c4e6b3d90b9be431e8bdc6152a
[]
no_license
consulo/consulo-markdown
23cfa1d18cc3260e4355f0839b163739580d8413
e3b8797229ab2a5c0d605560268dc4fd81fce55f
refs/heads/master
2023-08-22T23:03:14.261062
2023-05-17T07:01:40
2023-05-17T07:01:40
62,490,817
0
0
null
null
null
null
UTF-8
Java
false
false
265
java
/** * @author VISTALL * @since 14/01/2023 */ open module consulo.markdown { requires consulo.ide.api; // TODO remove this in future requires consulo.ide.impl; requires java.desktop; requires forms.rt; requires loboevolution; requires markdown; }
[ "vistall.valeriy@gmail.com" ]
vistall.valeriy@gmail.com
6d17517b2dafde6f3693363fb3d3e7d0d53fe539
3a59bd4f3c7841a60444bb5af6c859dd2fe7b355
/sources/com/google/firebase/internal/api/FirebaseNoSignedInUserException.java
578da4f5bd3edbdd9ba05d0d19ad3532089f152b
[]
no_license
sengeiou/KnowAndGo-android-thunkable
65ac6882af9b52aac4f5a4999e095eaae4da3c7f
39e809d0bbbe9a743253bed99b8209679ad449c9
refs/heads/master
2023-01-01T02:20:01.680570
2020-10-22T04:35:27
2020-10-22T04:35:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
446
java
package com.google.firebase.internal.api; import androidx.annotation.NonNull; import com.google.android.gms.common.annotation.KeepForSdk; import com.google.firebase.FirebaseException; @KeepForSdk /* compiled from: com.google.firebase:firebase-common@@16.0.2 */ public class FirebaseNoSignedInUserException extends FirebaseException { @KeepForSdk public FirebaseNoSignedInUserException(@NonNull String str) { super(str); } }
[ "joshuahj.tsao@gmail.com" ]
joshuahj.tsao@gmail.com
8832d51396da6dddfa0531bfe7e38b11c7160386
bf6db3b2adfe4f765540aad9fbd647e69a02f881
/src/main/java/toucan/algorithms/princeton/HexDump.java
adfb2cb1cd4dc4f6fa08a6efcb3d129c2dd2da19
[]
no_license
slevental/tank_bot
637f371db1920f9c3612979f52e4b5c8336740b0
7c87ae56c35809e5fad51a8b73613ce220164022
refs/heads/master
2020-04-21T14:31:52.226186
2017-03-21T17:15:20
2017-03-21T17:15:20
15,182,295
1
0
null
null
null
null
UTF-8
Java
false
false
1,428
java
package toucan.algorithms.princeton; /************************************************************************* * Compilation: javac org.eslion.HexDump.java * Execution: java org.eslion.HexDump < file * Dependencies: org.eslion.BinaryStdIn.java * Data file: http://introcs.cs.princeton.edu/stdlib/abra.txt * * Reads in a binary file and writes out the bytes in hex, 16 per line. * * % more abra.txt * ABRACADABRA! * * % java org.eslion.HexDump 16 < abra.txt * 41 42 52 41 43 41 44 41 42 52 41 21 * 96 bits * * % hexdump < abra.txt * * % od -t x1 < abra.txt * 0000000 41 42 52 41 43 41 44 41 42 52 41 21 * 0000014 * *************************************************************************/ public class HexDump { public static void main(String[] args) { int BYTES_PER_LINE = 16; if (args.length == 1) { BYTES_PER_LINE = Integer.parseInt(args[0]); } int i; for (i = 0; !BinaryStdIn.isEmpty(); i++) { if (BYTES_PER_LINE == 0) { BinaryStdIn.readChar(); continue; } if (i == 0) StdOut.printf(""); else if (i % BYTES_PER_LINE == 0) StdOut.printf("\n", i); else StdOut.print(" "); char c = BinaryStdIn.readChar(); StdOut.printf("%02x", c & 0xff); } if (BYTES_PER_LINE != 0) StdOut.println(); StdOut.println((i*8) + " bits"); } }
[ "stanislav.levetal@gmail.com" ]
stanislav.levetal@gmail.com
b4494d7aa69af92183715d78a4ef6d835ce83fcb
5455505da953e3078ed13eff45a4731ab1ea21cd
/sources/com/businesslogic/guestprofilefeedback/IProfileFeedbackView.java
b1ea66ca4a9057171e1502e5fcb7807ad1db3a77
[]
no_license
pavankvch/Jel
b673523dc7a1b33655d36d1cb62b7b8f31881397
f35cf5ea71288e588cc642fc691a78c4dcd1c250
refs/heads/master
2020-04-29T10:37:00.566486
2019-03-17T07:34:39
2019-03-17T07:34:39
176,067,567
0
0
null
null
null
null
UTF-8
Java
false
false
303
java
package com.businesslogic.guestprofilefeedback; import com.businesslogic.framework.IBaseView; import com.data.utils.APIError; public interface IProfileFeedbackView extends IBaseView { void onError(APIError aPIError); void onFeedbackSubmitSuccess(); void showSwipeToRefresh(boolean z); }
[ "pavankvch@gmail.com" ]
pavankvch@gmail.com
f7dfc83d6a741f9876315d601f92947eef40ccc2
61602d4b976db2084059453edeafe63865f96ec5
/com/xunlei/downloadprovider/download/privatespace/at.java
0073a2a590bf49c55d9946b9067dbf5371f9c933
[]
no_license
ZoranLi/thunder
9d18fd0a0ec0a5bb3b3f920f9413c1ace2beb4d0
0778679ef03ba1103b1d9d9a626c8449b19be14b
refs/heads/master
2020-03-20T23:29:27.131636
2018-06-19T06:43:26
2018-06-19T06:43:26
137,848,886
12
1
null
null
null
null
UTF-8
Java
false
false
535
java
package com.xunlei.downloadprovider.download.privatespace; import android.view.View; import android.view.View.OnClickListener; import com.xunlei.downloadprovider.download.privatespace.ui.PrivateSpaceFindPwdActivity; /* compiled from: VerifyPrivateSpaceDialog */ final class at implements OnClickListener { final /* synthetic */ ao a; at(ao aoVar) { this.a = aoVar; } public final void onClick(View view) { an.c("forget_password"); PrivateSpaceFindPwdActivity.a(this.a.getContext()); } }
[ "lizhangliao@xiaohongchun.com" ]
lizhangliao@xiaohongchun.com
ff0680bc605ae4d771ffee43c3defb92486bb0f2
d528fe4f3aa3a7eca7c5ba4e0aee43421e60857f
/main/com/zfsoft/xgxt/rcsw/txhd/xmjg/TxhdXmjgDao.java
37097f1c835dc06f264cb81c6c66d5f4c4101477
[]
no_license
gxlioper/xajd
81bd19a7c4b9f2d1a41a23295497b6de0dae4169
b7d4237acf7d6ffeca1c4a5a6717594ca55f1673
refs/heads/master
2022-03-06T15:49:34.004924
2019-11-19T07:43:25
2019-11-19T07:43:25
null
0
0
null
null
null
null
GB18030
Java
false
false
4,539
java
/** * @部门:学工产品事业部 * @日期:2014-6-24 上午09:39:48 */ package com.zfsoft.xgxt.rcsw.txhd.xmjg; import java.util.HashMap; import java.util.List; import java.util.Map; import xgxt.comm.search.SearchService; import xgxt.form.User; import com.zfsoft.xgxt.base.dao.impl.SuperDAOImpl; /** * @系统名称: 学生工作管理系统 * @模块名称: XXXX管理模块 * @类功能描述: TODO(这里用一句话描述这个类的作用) * @作者: 夏夏[工号:1104] * @时间: 2014-6-24 上午09:39:48 * @版本: V1.0 * @修改记录: 类修改者-修改日期-修改说明 */ public class TxhdXmjgDao extends SuperDAOImpl<TxhdXmjgForm> { /* * 描述: @see * com.zfsoft.xgxt.base.dao.impl.SuperDAOImpl#getPageList(java.lang.Object) */ @Override public List<HashMap<String, String>> getPageList(TxhdXmjgForm t) throws Exception { // TODO 自动生成方法存根 return null; } /* * 描述: @see * com.zfsoft.xgxt.base.dao.impl.SuperDAOImpl#getPageList(java.lang.Object, * xgxt.form.User) */ @Override public List<HashMap<String, String>> getPageList(TxhdXmjgForm t, User user) throws Exception { String searchTj = SearchService.getSearchTj(t.getSearchModel()); String searchTjByUser = SearchService.getSearchTjByUser(user, "", "xydm", "bjdm"); String[] inputV = SearchService.getTjInput(t.getSearchModel()); StringBuffer sql = new StringBuffer(); sql.append("select * from ( "); sql.append("select a.*,(select xqmc from xqdzb b where a.xq=b.xqdm)xqmc, "); sql.append("(select lbmc from xg_rcsw_txhd_lbdm b where a.lbdm=b.lbdm)lbmc, "); sql.append("hdkssj||' 至 '||hdjssj hdsj, "); sql.append("b.xm,b.xb,b.nj,b.xydm,b.xymc,b.zydm,b.zymc,b.bjdm,b.bjmc from XG_RCSW_TXHD_JGB a "); sql.append("left join view_xsbfxx b on b.xh=a.xh ) where 1=1 "); sql.append(searchTjByUser); sql.append(" "); sql.append(searchTj); return this.getPageList(t, sql.toString(), inputV); } /** * * @描述:活动增加判断 * @作者:夏夏[工号:1104] * @日期:2014-09-25 上午09:12:37 * @修改记录: 修改者名字-修改日期-修改内容 * @param qjsqid * @return boolean 返回类型 * @throws */ public boolean isAdd(TxhdXmjgForm myForm) { StringBuffer sb = new StringBuffer(); sb .append("select * from xg_rcsw_txhd_jgb where xh=? and xn=? and xq=? and xmmc=?"); Map<String, String> map = dao.getMapNotOut(sb.toString(), new String[] { myForm.getXh(), myForm.getXn(), myForm.getXq(), myForm.getXmmc() }); String xh = map.get("xh"); if (xh == null) { return true; } return xh.equals(myForm.getXh()) ? false : true; } /** * 删除对应申请信息 * @描述:TODO(这里用一句话描述这个方法的作用) * @作者:张昌路[工号:982] * @日期:2014-6-26 下午04:27:56 * @修改记录: 修改者名字-修改日期-修改内容 * @param sqid * @return * @throws Exception * int 返回类型 */ public int deleteForSh(String sqid) throws Exception { StringBuffer sb = new StringBuffer(); sb.append("delete xg_rcsw_txhd_jgb where sqid=?"); return dao.runDelete(sb.toString(), new String[] { sqid }); } /* * 描述: @see com.zfsoft.xgxt.base.dao.impl.SuperDAOImpl#setTableInfo() */ @Override protected void setTableInfo() { this.setKey("guid"); this.setTableName("xg_rcsw_txhd_jgb"); this.setClass(TxhdXmjgForm.class); } /** * * @描述:单个查看活动结果 * @作者:cq [工号:785] * @日期:2014-6-29 下午05:56:42 * @修改记录: 修改者名字-修改日期-修改内容 * @param id * @return * Map<String,String> 返回类型 * @throws */ public HashMap<String, String> getOneHdjgList(String id) { StringBuilder sql = new StringBuilder(); sql.append("select a.*,c.xm,(case when a.xckssj is null then a.xckssj else substr(a.xckssj,length(a.xckssj)-2,length(a.xckssj)-1)||'时' end)kshour,"); sql.append("(case when a.xcjssj is null then a.xcjssj else substr(a.xcjssj,length(a.xcjssj)-2,length(a.xcjssj)-1)||'时' end)jshour,"); sql.append("(select lbmc from xg_rcsw_txhd_lbdm b where a.lbdm = b.lbdm) lbmc,"); sql.append("(select xqmc from xqdzb b where a.xq=b.xqdm) xqmc "); sql.append("from xg_rcsw_txhd_jgb a left join xsxxb c on a.xh=c.xh where guid= ? "); return dao.getMapNotOut(sql.toString(), new String[] { id }); } }
[ "1398796456@qq.com" ]
1398796456@qq.com
43c1c35463bffa5fea6e4afde8643b2fd6b09541
5376359f80a0d36468608d5424c2150f5aa6d7a9
/app/src/main/java/com/int403/jabong/gifviewer3/glide/load/Option.java
b0075c8a4a18045cefeaa5f4870ceebb88ec8bb0
[]
no_license
dey2929/GifViewer3
6fe21af48c80e04ea159b7f191cffccf4ddd1513
979d84e17442d03fab660a90a10051ffdc4c748f
refs/heads/master
2021-01-20T20:05:29.975256
2016-07-18T09:59:33
2016-07-18T09:59:33
63,481,067
0
0
null
null
null
null
UTF-8
Java
false
false
5,343
java
package com.int403.jabong.gifviewer3.glide.load; import android.support.annotation.Nullable; import com.int403.jabong.gifviewer3.glide.util.Preconditions; import java.security.MessageDigest; /** * Defines available component (decoders, encoders, model loaders etc.) options with optional * default values and the ability to affect the resource disk cache key used by {@link * com.int403.jabong.gifviewer3.glide.load.engine.DiskCacheStrategy#RESOURCE}. * * <p> * Implementations must either be unique (usually declared as static final variables), or * implement {@link #equals(Object)} and {@link #hashCode()}. * </p> * * <p> * Implementations can implement {@link #update(Object, MessageDigest)} to make sure that * the disk cache key includes the specific option set. * </p> * * @param <T> The type of the option ({@link Integer}, {@link * android.graphics.Bitmap.CompressFormat} etc.), must implement {@link #equals(Object)} and * {@link #hashCode()}. */ public final class Option<T> { private static final CacheKeyUpdater<Object> EMPTY_UPDATER = new CacheKeyUpdater<Object>() { @Override public void update(byte[] keyBytes, Object value, MessageDigest messageDigest) { // Do nothing. } }; private final T defaultValue; private final CacheKeyUpdater<T> cacheKeyUpdater; private final String key; private volatile byte[] keyBytes; /** * Returns a new {@link Option} that does not affect disk cache keys with a {@code null} default * value. * * @param key A unique package prefixed {@link String} that identifies this option (must be * stable across builds, so {@link Class#getName()} should <em>not</em> be used). */ public static <T> Option<T> memory(String key) { return new Option<>(key, null /*defaultValue*/, Option.<T>emptyUpdater()); } /** * Returns a new {@link Option} that does not affect disk cache keys with the given value as the * default value. * * @param key A unique package prefixed {@link String} that identifies this option (must be * stable across builds, so {@link Class#getName()} should <em>not</em> be used). */ public static <T> Option<T> memory(String key, T defaultValue) { return new Option<>(key, defaultValue, Option.<T>emptyUpdater()); } /** * Returns a new {@link Option} that uses the given {@link * com.int403.jabong.gifviewer3.glide.load.Option.CacheKeyUpdater} to update disk cache keys. * * @param key A unique package prefixed {@link String} that identifies this option (must be * stable across builds, so {@link Class#getName()} should <em>not</em> be used). */ public static <T> Option<T> disk(String key, CacheKeyUpdater<T> cacheKeyUpdater) { return new Option<>(key, null /*defaultValue*/, cacheKeyUpdater); } /** * Returns a new {@link Option} that uses the given {@link * com.int403.jabong.gifviewer3.glide.load.Option.CacheKeyUpdater} to update disk cache keys and provides * the given value as the default value. * * @param key A unique package prefixed {@link String} that identifies this option (must be * stable across builds, so {@link Class#getName()} should <em>not</em> be used). */ public static <T> Option<T> disk(String key, T defaultValue, CacheKeyUpdater<T> cacheKeyUpdater) { return new Option<>(key, defaultValue, cacheKeyUpdater); } Option(String key, T defaultValue, CacheKeyUpdater<T> cacheKeyUpdater) { this.key = Preconditions.checkNotEmpty(key); this.defaultValue = defaultValue; this.cacheKeyUpdater = Preconditions.checkNotNull(cacheKeyUpdater); } /** * Returns a reasonable default to use if no other value is set, or {@code null}. */ @Nullable public T getDefaultValue() { return defaultValue; } /** * Updates the given {@link MessageDigest} used to construct a cache key with the given * value using the {@link com.int403.jabong.gifviewer3.glide.load.Option.CacheKeyUpdater} optionally provided in * the constructor. */ public void update(T value, MessageDigest messageDigest) { cacheKeyUpdater.update(getKeyBytes(), value, messageDigest); } private byte[] getKeyBytes() { if (keyBytes == null) { keyBytes = key.getBytes(Key.CHARSET); } return keyBytes; } @Override public boolean equals(Object o) { if (o instanceof Option) { Option<?> other = (Option<?>) o; return key.equals(other.key); } return false; } @Override public int hashCode() { return key.hashCode(); } @SuppressWarnings("unchecked") private static <T> CacheKeyUpdater<T> emptyUpdater() { return (CacheKeyUpdater<T>) EMPTY_UPDATER; } @Override public String toString() { return "Option{" + "key='" + key + '\'' + '}'; } /** * An interface that updates a {@link MessageDigest} with the given value as part of a process to * generate a disk cache key. * * @param <T> The type of the option. */ public interface CacheKeyUpdater<T> { /** * Updates the given {@link MessageDigest} with the bytes of the given key (to avoid incidental * value collisions when values are not particularly unique) and value. */ void update(byte[] keyBytes, T value, MessageDigest messageDigest); } }
[ "deyanand2929@gmail.com" ]
deyanand2929@gmail.com
2b400bcc949857b743b819e361ef1f5919d32494
bf4c38f33e9352d9fae0f1581862677af21ab5ca
/IoT2/fr.inria.diverse.iot2.iot2/src-gen/fr/inria/diverse/iot2/iot2/aspects/Expression_LargerAspectExpression_LargerAspectProperties.java
4d591841c622c4d71cba279158e6c09a77368992
[]
no_license
diverse-project/melange-examples
c0a2b7ecb0659a22e21e1c18202b3682579c7ffa
f6b809429a625104f68f0d8321dd10861de724bf
refs/heads/master
2021-01-19T06:29:01.262950
2017-06-28T13:09:43
2017-06-28T13:09:43
95,668,567
0
1
null
null
null
null
UTF-8
Java
false
false
144
java
package fr.inria.diverse.iot2.iot2.aspects; @SuppressWarnings("all") public class Expression_LargerAspectExpression_LargerAspectProperties { }
[ "degueule@cwi.nl" ]
degueule@cwi.nl
37987cc23b4cd7df79775f5b86966727f94e7a65
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/25/25_24cd2881cf084ebc0065a0a449a3ab52f6638820/JoystickHandler/25_24cd2881cf084ebc0065a0a449a3ab52f6638820_JoystickHandler_t.java
e2a4fd61729351e0516a1d7ff4b556149f1d7d5e
[]
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
4,083
java
/* Copyright (C) 2013 Patrik Wållgren 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 bgsep.model; import android.widget.ImageView; import bgsep.communication.CommunicationNotifier; /** * Subclass of Joystick that handles joystick movements. * @author patrik * */ public class JoystickHandler extends Joystick { private int stickLeftID, stickRightID, stickUpID, stickDownID; private int prevPosX, prevPosY; private boolean leftRightEnabled, upDownEnabled; private boolean indicateKeyPress; /** * Takes a positioned boundary ImageView and a positioned * stick ImageView. Enabled by default. * @param boundary an ImageView */ public JoystickHandler(ImageView boundary, ImageView stick) { super(boundary, stick); leftRightEnabled = upDownEnabled = false; prevPosX = prevPosY = 0; indicateKeyPress = false; stickLeftID = stickRightID = stickUpID = stickDownID = 0; } public void setLeftRightJoystickID(int left, int right) { stickLeftID = left; stickRightID = right; leftRightEnabled = true; } public void setUpDownJoystickID(int up, int down) { stickUpID = up; stickDownID = down; upDownEnabled = true; } public void releaseJoystick() { if(leftRightEnabled) { notifyComm(new CommunicationNotifier(stickLeftID, 0)); notifyComm(new CommunicationNotifier(stickRightID, 0)); } if(upDownEnabled) { notifyComm(new CommunicationNotifier(stickUpID, 0)); notifyComm(new CommunicationNotifier(stickDownID, 0)); } } /** * Determines Left/Right/Up/Down and notifies the observers observers. */ @Override public void onStickMovement() { // Update views setChanged(); notifyObservers(); if(leftRightEnabled && upDownEnabled) { // The axis with highest value got the highest priority if(getX() > getY()) { prevPosX = axisValueChanged(getX(), prevPosX, stickRightID, stickLeftID); prevPosY = axisValueChanged(getY(), prevPosY, stickUpID, stickDownID); } else { prevPosY = axisValueChanged(getY(), prevPosY, stickUpID, stickDownID); prevPosX = axisValueChanged(getX(), prevPosX, stickRightID, stickLeftID); } } else { if(leftRightEnabled) prevPosX = axisValueChanged(getX(), prevPosX, stickRightID, stickLeftID); else if(upDownEnabled) prevPosY = axisValueChanged(getY(), prevPosY, stickUpID, stickDownID); } } private int axisValueChanged(float currPos, int prevPos, int stickIDpos, int stickIDneg) { int rounding = (int)(currPos*10); if((rounding % 2) != 0) { rounding += currPos > rounding ? 1 : -1; } if(prevPos != rounding) { float value = ((float)Math.abs(rounding))/10; if(rounding > 0) { notifyComm(new CommunicationNotifier(stickIDpos, value)); notifyComm(new CommunicationNotifier(stickIDneg, 0)); } else if(rounding < 0) { notifyComm(new CommunicationNotifier(stickIDneg, value)); notifyComm(new CommunicationNotifier(stickIDpos, 0)); } else { notifyComm(new CommunicationNotifier(stickIDpos, 0)); notifyComm(new CommunicationNotifier(stickIDneg, 0)); } return rounding; } return prevPos; } public boolean isIndicateKeyPress() { return indicateKeyPress; } private void notifyComm(CommunicationNotifier notifier) { setChanged(); notifyObservers(notifier); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
93cd6930bd557d75e4add5d5a967979038597783
59a28030b9bbfce8b6c7ad51a9e5cbb7aadc36b9
/QdmKnimeTranslator/src/main/java/edu/phema/jaxb/ihe/svs/ActStatusNormal.java
dc18be70da99edaeb54b997fe238aed28feeb08a
[]
no_license
PheMA/qdm-knime
c3970566c7fe529eefe94a9311d7beeed6d39dc8
fb3e2925a6cd15ebba83ba5fc95bb604a54ff564
refs/heads/master
2020-12-24T14:27:42.708153
2016-05-25T21:42:57
2016-05-25T21:42:57
29,319,651
1
0
null
null
null
null
UTF-8
Java
false
false
1,980
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2014.12.15 at 03:09:44 PM CST // package edu.phema.jaxb.ihe.svs; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; /** * <p>Java class for ActStatusNormal. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="ActStatusNormal"> * &lt;restriction base="{urn:ihe:iti:svs:2008}cs"> * &lt;enumeration value="normal"/> * &lt;enumeration value="aborted"/> * &lt;enumeration value="active"/> * &lt;enumeration value="cancelled"/> * &lt;enumeration value="completed"/> * &lt;enumeration value="held"/> * &lt;enumeration value="new"/> * &lt;enumeration value="suspended"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlEnum public enum ActStatusNormal { @XmlEnumValue("normal") NORMAL("normal"), @XmlEnumValue("aborted") ABORTED("aborted"), @XmlEnumValue("active") ACTIVE("active"), @XmlEnumValue("cancelled") CANCELLED("cancelled"), @XmlEnumValue("completed") COMPLETED("completed"), @XmlEnumValue("held") HELD("held"), @XmlEnumValue("new") NEW("new"), @XmlEnumValue("suspended") SUSPENDED("suspended"); private final String value; ActStatusNormal(String v) { value = v; } public String value() { return value; } public static ActStatusNormal fromValue(String v) { for (ActStatusNormal c: ActStatusNormal.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v.toString()); } }
[ "thompsow@r1001-lt-100-f.enhnet.org" ]
thompsow@r1001-lt-100-f.enhnet.org
8d1e1daae4ce739cefdecaf7ae40c05ee4c86170
ddd32884a47eb643ae4acb09287139fe83243920
/app/src/main/java/com/hjy/wisdommedical/ui/personal/adapter/InquiryDoctorListAdapter.java
97a245d3c3a5afe133d1f8a7e44d5a30e6188220
[]
no_license
SetAdapter/WisdomMedical
408b31e67bce7c60f33d38f0796414d00e0c9468
60b96eced5c5713fb8f055a2b5b8d03d38b8f848
refs/heads/master
2020-04-23T13:48:19.275452
2019-02-18T03:45:14
2019-02-18T03:45:14
171,209,620
0
0
null
null
null
null
UTF-8
Java
false
false
1,944
java
package com.hjy.wisdommedical.ui.personal.adapter; import android.support.annotation.Nullable; import android.widget.ImageView; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import com.example.handsomelibrary.model.ListConsultDocBean; import com.hedgehog.ratingbar.RatingBar; import com.hjy.wisdommedical.R; import java.util.List; /** * 问诊 关注 医生列表Adapter * Created by Stefan on 2018/7/9. */ public class InquiryDoctorListAdapter extends BaseQuickAdapter<ListConsultDocBean, BaseViewHolder> { private RatingBar ratingBar; public InquiryDoctorListAdapter(@Nullable List<ListConsultDocBean> data) { super(R.layout.item_doctor_list, data); } @Override protected void convert(BaseViewHolder helper, ListConsultDocBean item) { if (item != null) { helper.setText(R.id.tv_docName, item.getDocName())//医生名字 .setText(R.id.tv_hospicalName, item.getHospicalName()) .setText(R.id.tv_departmentName, item.getDepartmentName()); ImageView isFollow = helper.getView(R.id.iv_isFollow); if (item.getIsFollow() == 1) { isFollow.setBackgroundResource(R.mipmap.icon_followed); }else { isFollow.setBackgroundResource(R.mipmap.icon_follow); } ratingBar = helper.getView(R.id.RatingBar); setRatingBar(); ratingBar.setStar((float) item.getScore()); helper.addOnClickListener(R.id.iv_isFollow); } } private void setRatingBar() { ratingBar.setStarEmptyDrawable(mContext.getResources().getDrawable(R.mipmap.icon_star_light)); ratingBar.setStarFillDrawable(mContext.getResources().getDrawable(R.mipmap.icon_star_fill)); ratingBar.setStarHalfDrawable(mContext.getResources().getDrawable(R.mipmap.icon_star_half)); } }
[ "383411934@qq.com" ]
383411934@qq.com
cd05fa87985a5707b75c579d2156a8bedfc85e6d
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/kotlinx/coroutines/channels/ChannelsKt__Channels_commonKt$elementAtOrElse$1.java
98459a85f1e58a9ca216ab176677ccd9212a1c16
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
914
java
package kotlinx.coroutines.channels; import kotlin.coroutines.C47919b; import kotlin.coroutines.jvm.internal.C7540d; import kotlin.coroutines.jvm.internal.ContinuationImpl; @C7540d(mo19421b = "Channels.common.kt", mo19422c = {189, 189}, mo19423d = "elementAtOrElse", mo19424e = "kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt") public final class ChannelsKt__Channels_commonKt$elementAtOrElse$1 extends ContinuationImpl { int I$0; int I$1; Object L$0; Object L$1; Object L$2; Object L$3; Object L$4; Object L$5; int label; /* synthetic */ Object result; public ChannelsKt__Channels_commonKt$elementAtOrElse$1(C47919b bVar) { super(bVar); } public final Object invokeSuspend(Object obj) { this.result = obj; this.label |= Integer.MIN_VALUE; return C48136c.m149268a(null, 0, null, (C47919b<? super E>) this); } }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
e89eac8facd0828b53f422a2e700e0f6abad2e33
e245461a20ff4a3015dd3f579928b7a49062414e
/simple-nacos-ribbon-consumer/src/main/java/com/laibao/simple/nacos/ribbon/consumer/SimpleNacosRibbonConsumerApplication.java
01a6afb584a354d10214eee75fa593674e3afd5b
[]
no_license
wanglaibao/Spring-Cloud-Alibaba-Study
6472c7f7c29130fd7587432216a52d4c22597e9a
a3e5f2a39d278b8501d65e3bc550c69693083619
refs/heads/master
2022-06-21T10:20:40.644622
2020-05-10T04:46:25
2020-05-10T04:46:25
262,178,902
0
0
null
null
null
null
UTF-8
Java
false
false
759
java
package com.laibao.simple.nacos.ribbon.consumer; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.loadbalancer.LoadBalanced; import org.springframework.context.annotation.Bean; import org.springframework.web.client.RestTemplate; @SpringBootApplication @EnableDiscoveryClient public class SimpleNacosRibbonConsumerApplication { @Bean @LoadBalanced public RestTemplate restTemplate() { return new RestTemplate(); } public static void main(String[] args) { SpringApplication.run(SimpleNacosRibbonConsumerApplication.class, args); } }
[ "wanglaibao2010@gmail.com" ]
wanglaibao2010@gmail.com
12116ea23170f8217b96f9a721bb4884f09f9507
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_dede61921eb1377b566fd2bb63d81f7ce4ad45f3/BreakpointLocationVerifier/5_dede61921eb1377b566fd2bb63d81f7ce4ad45f3_BreakpointLocationVerifier_s.java
51e9af0670366e1d3c9b0f338e9539fe4d9b837a
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,837
java
package org.eclipse.jdt.internal.debug.ui.actions; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.jdt.internal.compiler.parser.InvalidInputException; import org.eclipse.jdt.internal.compiler.parser.Scanner; import org.eclipse.jdt.internal.compiler.parser.TerminalSymbols; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; public class BreakpointLocationVerifier { /** * Returns the line number closest to the given line number that represents a * valid location for a breakpoint in the given document, or -1 is a valid location * cannot be found. */ public int getValidBreakpointLocation(IDocument doc, int lineNumber) { Scanner scanner= new Scanner(); boolean found= false; int start= 0, length= 0, token= 0; while (!found) { try { start= doc.getLineOffset(lineNumber); length= doc.getLineLength(lineNumber); char[] txt= doc.get(start, length).toCharArray(); scanner.setSourceBuffer(txt); token= scanner.getNextToken(); while (token != TerminalSymbols.TokenNameEOF) { if (token == TerminalSymbols.TokenNamebreak || token == TerminalSymbols.TokenNamecontinue || token == TerminalSymbols.TokenNameIdentifier || token == TerminalSymbols.TokenNamereturn || token == TerminalSymbols.TokenNamethis) { found= true; break; } else { token= scanner.getNextToken(); } } if (!found) { lineNumber++; } } catch (BadLocationException ble) { return -1; } catch (InvalidInputException ie) { return -1; } } // add 1 to the line number - Document is 0 based, JDI is 1 based return lineNumber + 1; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
eb76c9835b699005d93201f39222c33b5cccfd9a
1aef4669e891333de303db570c7a690c122eb7dd
/src/main/java/com/alipay/api/domain/UpdateCodeResult.java
1595b6161f17eb001d357a3b4ff9982ef90576b1
[ "Apache-2.0" ]
permissive
fossabot/alipay-sdk-java-all
b5d9698b846fa23665929d23a8c98baf9eb3a3c2
3972bc64e041eeef98e95d6fcd62cd7e6bf56964
refs/heads/master
2020-09-20T22:08:01.292795
2019-11-28T08:12:26
2019-11-28T08:12:26
224,602,331
0
0
Apache-2.0
2019-11-28T08:12:26
2019-11-28T08:12:25
null
UTF-8
Java
false
false
2,116
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 更新S码返回结果 * * @author auto create * @since 1.0, 2019-11-13 15:15:41 */ public class UpdateCodeResult extends AlipayObject { private static final long serialVersionUID = 1269281154456526831L; /** * biz_id,唯一,业务id,用于业务请求的幂等标志 */ @ApiField("biz_id") private String bizId; /** * 码值,对应码平台的token,https://qr.alipay.com/${token} 中的token */ @ApiField("code_token") private String codeToken; /** * context_data,发码的上下文信息,比如子业务code,场景code等。此值为一个Map<string, string>类型的json串字符,传入规则如下: {"key1":"val2","key2":"val2"}。必填业务字段:SUB_BIZ_TYPE,SCENE等,具体咨询对接技术人员 */ @ApiField("context_data") private String contextData; /** * 错误码 */ @ApiField("error_code") private String errorCode; /** * 错误描述 */ @ApiField("error_message") private String errorMessage; /** * 是否成功 */ @ApiField("success") private Boolean success; public String getBizId() { return this.bizId; } public void setBizId(String bizId) { this.bizId = bizId; } public String getCodeToken() { return this.codeToken; } public void setCodeToken(String codeToken) { this.codeToken = codeToken; } public String getContextData() { return this.contextData; } public void setContextData(String contextData) { this.contextData = contextData; } public String getErrorCode() { return this.errorCode; } public void setErrorCode(String errorCode) { this.errorCode = errorCode; } public String getErrorMessage() { return this.errorMessage; } public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } public Boolean getSuccess() { return this.success; } public void setSuccess(Boolean success) { this.success = success; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
63ce07a5f4533763f279c798d2e5f5ce2238b522
4a704025929af77b705f1f44972f7bcc6173c8ad
/tcs3/src/main/java/tcs3/repository/RequestSampleRepository.java
90141ad95b946546bda748594cad7a3033503b9f
[]
no_license
dss-most/tcs3
96c77d397fc403714518bd4312375318b10f426d
e6ff25a5be25f968591d7d40cab6b6f393d73dcc
refs/heads/master
2021-06-08T17:30:38.970200
2021-04-22T08:31:03
2021-04-22T08:31:03
156,492,729
1
0
null
2018-11-07T05:01:46
2018-11-07T05:01:46
null
UTF-8
Java
false
false
336
java
package tcs3.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.querydsl.QueryDslPredicateExecutor; import tcs3.model.lab.RequestSample; public interface RequestSampleRepository extends JpaRepository<RequestSample, Long>, QueryDslPredicateExecutor<RequestSample> { }
[ "dbuaklee@hotmail.com" ]
dbuaklee@hotmail.com
afd48de303e75700e95d11da57c1f95b43587b7f
156286d1ddb500afd03cb388f564e3869e3948bc
/discovery-plugin-framework/src/main/java/com/nepxion/discovery/plugin/framework/listener/impl/IpAddressFilterRegisterListener.java
c22e0142a9b77d1252f497e2c6c179462d5c7dc9
[ "Apache-2.0" ]
permissive
SoftwareKing/Discovery
dea37b86fb71e827df28b22c4753b12cb4c4aeb3
81ae3fa74effddc247c398380bab63a8b960b07a
refs/heads/master
2020-03-21T20:59:19.095034
2018-06-28T14:54:56
2018-06-28T14:54:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,327
java
package com.nepxion.discovery.plugin.framework.listener.impl; /** * <p>Title: Nepxion Discovery</p> * <p>Description: Nepxion Discovery</p> * <p>Copyright: Copyright (c) 2017-2050</p> * <p>Company: Nepxion</p> * @author Haojun Ren * @version 1.0 */ import java.util.ArrayList; import java.util.List; import java.util.Map; import org.apache.commons.collections4.CollectionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cloud.client.serviceregistry.Registration; import org.springframework.cloud.netflix.eureka.serviceregistry.EurekaRegistration; import com.nepxion.discovery.plugin.framework.entity.FilterEntity; import com.nepxion.discovery.plugin.framework.entity.FilterType; import com.nepxion.discovery.plugin.framework.entity.RegisterEntity; import com.nepxion.discovery.plugin.framework.entity.RuleEntity; import com.nepxion.discovery.plugin.framework.exception.PluginException; import com.nepxion.discovery.plugin.framework.listener.AbstractRegisterListener; public class IpAddressFilterRegisterListener extends AbstractRegisterListener { private static final Logger LOG = LoggerFactory.getLogger(IpAddressFilterRegisterListener.class); @Autowired private RuleEntity ruleEntity; @Override public void onRegister(Registration registration) { String serviceId = registration.getServiceId(); String ipAddress = null; if (registration instanceof EurekaRegistration) { EurekaRegistration eurekaRegistration = (EurekaRegistration) registration; ipAddress = eurekaRegistration.getInstanceConfig().getIpAddress(); } applyIpAddressFilter(serviceId, ipAddress); } private void applyIpAddressFilter(String serviceId, String ipAddress) { RegisterEntity registerEntity = ruleEntity.getRegisterEntity(); if (registerEntity == null) { return; } FilterEntity filterEntity = registerEntity.getFilterEntity(); if (filterEntity == null) { return; } FilterType filterType = filterEntity.getFilterType(); List<String> globalFilterValueList = filterEntity.getFilterValueList(); Map<String, List<String>> filterMap = filterEntity.getFilterMap(); List<String> filterValueList = filterMap.get(serviceId); List<String> allFilterValueList = new ArrayList<String>(); if (CollectionUtils.isNotEmpty(globalFilterValueList)) { allFilterValueList.addAll(globalFilterValueList); } if (CollectionUtils.isNotEmpty(filterValueList)) { allFilterValueList.addAll(filterValueList); } switch (filterType) { case BLACKLIST: validateBlacklist(allFilterValueList, ipAddress); break; case WHITELIST: validateWhitelist(allFilterValueList, ipAddress); break; } } private void validateBlacklist(List<String> allFilterValueList, String ipAddress) { LOG.info("********** IP address blacklist={}, current ip address={} **********", allFilterValueList, ipAddress); for (String filterValue : allFilterValueList) { if (ipAddress.startsWith(filterValue)) { throw new PluginException(ipAddress + " isn't allowed to register to Eureka server, because it is in blacklist"); } } } private void validateWhitelist(List<String> allFilterValueList, String ipAddress) { LOG.info("********** IP address whitelist={}, current ip address={} **********", allFilterValueList, ipAddress); boolean matched = true; for (String filterValue : allFilterValueList) { if (ipAddress.startsWith(filterValue)) { matched = false; break; } } if (matched) { throw new PluginException(ipAddress + " isn't allowed to register to Eureka server, because it isn't in whitelist"); } } @Override public void onDeregister(Registration registration) { } @Override public void onSetStatus(Registration registration, String status) { } @Override public void onClose() { } }
[ "1394997@qq.com" ]
1394997@qq.com
25f6f01504f52ca29f8a8376cf896d30ed4657fd
9682e6250cb6dd3d5f3e5e1b18dc28bd2c697e68
/model/api/src/main/java/org/keycloak/models/CredentialValidationOutput.java
70e4093ab53869eb896cf6e1b0f904468a4fe128
[ "Apache-2.0" ]
permissive
ajayhirapara/keycloak
f9d2dda36e96de56b196e869618fc6bc868084eb
d74214cf56889b20023262d6fc96917eba5a2717
refs/heads/master
2021-01-24T02:58:40.594935
2015-03-03T12:03:11
2015-03-03T12:03:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,472
java
package org.keycloak.models; import java.util.HashMap; import java.util.Map; /** * Output of credential validation * * @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a> */ public class CredentialValidationOutput { private final UserModel authenticatedUser; // authenticated user. private final Status authStatus; // status whether user is authenticated or more steps needed private final Map<String, Object> state; // Additional state related to authentication. It can contain data to be sent back to client or data about used credentials. public CredentialValidationOutput(UserModel authenticatedUser, Status authStatus, Map<String, Object> state) { this.authenticatedUser = authenticatedUser; this.authStatus = authStatus; this.state = state; } public static CredentialValidationOutput failed() { return new CredentialValidationOutput(null, CredentialValidationOutput.Status.FAILED, new HashMap<String, Object>()); } public UserModel getAuthenticatedUser() { return authenticatedUser; } public Status getAuthStatus() { return authStatus; } public Map<String, Object> getState() { return state; } public CredentialValidationOutput merge(CredentialValidationOutput that) { throw new IllegalStateException("Not supported yet"); } public static enum Status { AUTHENTICATED, FAILED, CONTINUE } }
[ "mposolda@gmail.com" ]
mposolda@gmail.com
647a962290e90e43c21db850f9dc20f353c399d4
3cee619f9d555e75625bfff889ae5c1394fd057a
/app/src/main/java/org/tensorflow/lite/examples/imagesegmentation/p000a/p013b/p020e/p028g/C0240h.java
427e2a556c65bd496a7fa8f1bb4ea48c1355559c
[]
no_license
randauto/imageerrortest
6fe12d92279e315e32409e292c61b5dc418f8c2b
06969c68b9d82ed1c366d8b425c87c61db933f15
refs/heads/master
2022-04-21T18:21:56.836502
2020-04-23T16:18:49
2020-04-23T16:18:49
258,261,084
0
0
null
null
null
null
UTF-8
Java
false
false
4,598
java
package p000a.p013b.p020e.p028g; import java.util.concurrent.Callable; import java.util.concurrent.Future; import java.util.concurrent.atomic.AtomicReferenceArray; import p000a.p013b.p017b.C0166b; import p000a.p013b.p020e.p021a.C0192a; /* renamed from: a.b.e.g.h */ /* compiled from: ScheduledRunnable */ public final class C0240h extends AtomicReferenceArray<Object> implements C0166b, Runnable, Callable<Object> { /* renamed from: b */ static final Object f476b = new Object(); /* renamed from: c */ static final Object f477c = new Object(); /* renamed from: d */ static final Object f478d = new Object(); /* renamed from: e */ static final Object f479e = new Object(); private static final long serialVersionUID = -6120223772001106981L; /* renamed from: a */ final Runnable f480a; public C0240h(Runnable runnable, C0192a aVar) { super(3); this.f480a = runnable; lazySet(0, aVar); } public Object call() { run(); return null; } public void run() { Object obj; Object obj2; lazySet(2, Thread.currentThread()); try { this.f480a.run(); } catch (Throwable th) { lazySet(2, null); Object obj3 = get(0); if (!(obj3 == f476b || !compareAndSet(0, obj3, f479e) || obj3 == null)) { ((C0192a) obj3).mo362c(this); } do { obj2 = get(1); if (obj2 == f477c || obj2 == f478d) { throw th; } } while (!compareAndSet(1, obj2, f479e)); throw th; } lazySet(2, null); Object obj4 = get(0); if (!(obj4 == f476b || !compareAndSet(0, obj4, f479e) || obj4 == null)) { ((C0192a) obj4).mo362c(this); } do { obj = get(1); if (obj == f477c || obj == f478d) { return; } } while (!compareAndSet(1, obj, f479e)); } /* renamed from: a */ public void mo433a(Future<?> future) { Object obj; do { obj = get(1); if (obj != f479e) { if (obj == f477c) { future.cancel(false); return; } else if (obj == f478d) { future.cancel(true); return; } } else { return; } } while (!compareAndSet(1, obj, future)); } /* JADX WARNING: Removed duplicated region for block: B:0:0x0000 A[LOOP_START] */ /* renamed from: a */ /* Code decompiled incorrectly, please refer to instructions dump. */ public void mo349a() { /* r5 = this; L_0x0000: r0 = 1 java.lang.Object r1 = r5.get(r0) java.lang.Object r2 = f479e r3 = 0 if (r1 == r2) goto L_0x0035 java.lang.Object r2 = f477c if (r1 == r2) goto L_0x0035 java.lang.Object r2 = f478d if (r1 != r2) goto L_0x0013 goto L_0x0035 L_0x0013: r2 = 2 java.lang.Object r2 = r5.get(r2) java.lang.Thread r4 = java.lang.Thread.currentThread() if (r2 == r4) goto L_0x0020 r2 = 1 goto L_0x0021 L_0x0020: r2 = 0 L_0x0021: if (r2 == 0) goto L_0x0026 java.lang.Object r4 = f478d goto L_0x0028 L_0x0026: java.lang.Object r4 = f477c L_0x0028: boolean r0 = r5.compareAndSet(r0, r1, r4) if (r0 == 0) goto L_0x0000 if (r1 == 0) goto L_0x0035 java.util.concurrent.Future r1 = (java.util.concurrent.Future) r1 r1.cancel(r2) L_0x0035: java.lang.Object r0 = r5.get(r3) java.lang.Object r1 = f479e if (r0 == r1) goto L_0x0052 java.lang.Object r1 = f476b if (r0 == r1) goto L_0x0052 if (r0 != 0) goto L_0x0044 goto L_0x0052 L_0x0044: java.lang.Object r1 = f476b boolean r1 = r5.compareAndSet(r3, r0, r1) if (r1 == 0) goto L_0x0035 a.b.e.a.a r0 = (p000a.p013b.p020e.p021a.C0192a) r0 r0.mo362c(r5) return L_0x0052: return */ throw new UnsupportedOperationException("Method not decompiled: p000a.p013b.p020e.p028g.C0240h.mo349a():void"); } }
[ "tuanlq@funtap.vn" ]
tuanlq@funtap.vn
817035dadb7dea77268247aea0257f90edeee6bf
67a1b5e8dc998ce3594c1c3bb2ec89c30850dee7
/GooglePlay6.0.5/app/src/main/java/com/google/android/finsky/services/PlayAfwAppService.java
ff17d83a1d520126310160f55dacfcb977b781a6
[ "Apache-2.0" ]
permissive
matrixxun/FMTech
4a47bd0bdd8294cc59151f1bffc6210567487bac
31898556baad01d66e8d87701f2e49b0de930f30
refs/heads/master
2020-12-29T01:31:53.155377
2016-01-07T04:39:43
2016-01-07T04:39:43
49,217,400
2
0
null
2016-01-07T16:51:44
2016-01-07T16:51:44
null
UTF-8
Java
false
false
6,080
java
package com.google.android.finsky.services; import android.accounts.Account; import android.app.Service; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Binder; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; import com.google.android.finsky.FinskyApp; import com.google.android.finsky.appstate.AppStates; import com.google.android.finsky.appstate.InstallerDataStore; import com.google.android.finsky.appstate.InstallerDataStore.InstallerData; import com.google.android.finsky.appstate.PackageStateRepository; import com.google.android.finsky.appstate.PackageStateRepository.PackageState; import com.google.android.finsky.appstate.WriteThroughInstallerDataStore; import com.google.android.finsky.experiments.FinskyExperiments; import com.google.android.finsky.library.AccountLibrary; import com.google.android.finsky.library.Libraries; import com.google.android.finsky.library.LibraryAppEntry; import com.google.android.gms.common.GoogleSignatureVerifier; import java.util.Iterator; import java.util.List; public class PlayAfwAppService extends Service { private PlayAfwAppServiceImpl mPlayAfwAppService; public IBinder onBind(Intent paramIntent) { return this.mPlayAfwAppService; } public void onCreate() { super.onCreate(); this.mPlayAfwAppService = new PlayAfwAppServiceImpl(FinskyApp.get().mLibraries, FinskyApp.get().mPackageStateRepository, FinskyApp.get().mAppStates, FinskyApp.get().getExperiments(), new ServiceCallerVerifier(), this); } static final class PlayAfwAppServiceImpl extends IPlayAfwAppService.Stub { private final AppStates mAppStates; private final Context mContext; private final FinskyExperiments mExperiments; private final Libraries mLibraries; private final PackageStateRepository mPackageStateRepository; private final PlayAfwAppService.ServiceCallerVerifier mServiceCallerVerifier; public PlayAfwAppServiceImpl(Libraries paramLibraries, PackageStateRepository paramPackageStateRepository, AppStates paramAppStates, FinskyExperiments paramFinskyExperiments, PlayAfwAppService.ServiceCallerVerifier paramServiceCallerVerifier, Context paramContext) { this.mLibraries = paramLibraries; this.mPackageStateRepository = paramPackageStateRepository; this.mAppStates = paramAppStates; this.mExperiments = paramFinskyExperiments; this.mServiceCallerVerifier = paramServiceCallerVerifier; this.mContext = paramContext; } public final Bundle validateWorkPackageByPlay(String paramString) throws RemoteException { Bundle localBundle = new Bundle(); if (!this.mExperiments.isEnabled(12603513L)) {} int j; do { int i; do { PackageStateRepository.PackageState localPackageState; do { return localBundle; if (!PlayAfwAppService.ServiceCallerVerifier.isUidAfwApp(this.mContext.getPackageManager())) { throw new SecurityException("Only AfwApp can access this service"); } localBundle.putBoolean("IsValid", false); localPackageState = this.mPackageStateRepository.get(paramString); } while (localPackageState == null); this.mAppStates.load(null); this.mLibraries.blockingLoad(); Iterator localIterator = this.mLibraries.getAppOwners(localPackageState.packageName, localPackageState.certificateHashes).iterator(); LibraryAppEntry localLibraryAppEntry; do { Account localAccount; do { boolean bool = localIterator.hasNext(); i = 0; if (!bool) { break; } localAccount = (Account)localIterator.next(); } while (!"com.google.work".equals(localAccount.type)); localLibraryAppEntry = this.mLibraries.getAccountLibrary(localAccount).getAppEntry(paramString); } while ((localLibraryAppEntry == null) || (!localLibraryAppEntry.isOwnedViaLicense)); i = 1; } while (i == 0); this.mAppStates.mStateStore.load(); InstallerDataStore.InstallerData localInstallerData = this.mAppStates.mStateStore.get(paramString); if (localInstallerData == null) { break; } j = localInstallerData.persistentFlags; } while (((j & 0x4) == 0) || ((j & 0x2) != 0)); localBundle.putBoolean("IsValid", true); return localBundle; } } protected static final class ServiceCallerVerifier { public static boolean isUidAfwApp(PackageManager paramPackageManager) { int i = Binder.getCallingUid(); GoogleSignatureVerifier localGoogleSignatureVerifier = GoogleSignatureVerifier.getInstance(); String[] arrayOfString1 = paramPackageManager.getPackagesForUid(i); boolean bool; if ((arrayOfString1 == null) || (arrayOfString1.length == 0)) { bool = false; if (bool) { break label46; } } for (;;) { return false; bool = localGoogleSignatureVerifier.isPackageGoogleSigned(paramPackageManager, arrayOfString1[0]); break; label46: String[] arrayOfString2 = paramPackageManager.getPackagesForUid(i); if (arrayOfString2 != null) { int j = arrayOfString2.length; for (int k = 0; k < j; k++) { if ("com.google.android.apps.work.core".equals(arrayOfString2[k])) { return true; } } } } } } } /* Location: F:\apktool\apktool\Google_Play_Store6.0.5\classes-dex2jar.jar * Qualified Name: com.google.android.finsky.services.PlayAfwAppService * JD-Core Version: 0.7.0.1 */
[ "jiangchuna@126.com" ]
jiangchuna@126.com
fa0b9fd28c9045446914c5f4b98f2611d317351a
e119cd833db9ffbb7783ccdc6982075b91dc6542
/police-stories-lastaflute/src/main/java/org/docksidestage/dbflute/cbean/cq/ciq/ProductCategoryCIQ.java
dcf566d30c4e0f05caa4ab85ef0f13b3045ea59d
[ "Apache-2.0" ]
permissive
dbflute-utflute/police-stories
be3d414e30142ee0765c119cbc2b6793b6afe46f
b06c32b5d723ebb17ea952f12e47c1df8e6d8ade
refs/heads/master
2021-04-15T16:33:35.633065
2018-03-25T23:50:38
2018-03-25T23:50:38
126,748,544
0
0
null
null
null
null
UTF-8
Java
false
false
6,934
java
/* * Copyright 2014-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.docksidestage.dbflute.cbean.cq.ciq; import java.util.Map; import org.dbflute.cbean.*; import org.dbflute.cbean.ckey.*; import org.dbflute.cbean.coption.ConditionOption; import org.dbflute.cbean.cvalue.ConditionValue; import org.dbflute.cbean.sqlclause.SqlClause; import org.dbflute.exception.IllegalConditionBeanOperationException; import org.docksidestage.dbflute.cbean.*; import org.docksidestage.dbflute.cbean.cq.bs.*; import org.docksidestage.dbflute.cbean.cq.*; /** * The condition-query for in-line of PRODUCT_CATEGORY. * @author DBFlute(AutoGenerator) */ public class ProductCategoryCIQ extends AbstractBsProductCategoryCQ { // =================================================================================== // Attribute // ========= protected BsProductCategoryCQ _myCQ; // =================================================================================== // Constructor // =========== public ProductCategoryCIQ(ConditionQuery referrerQuery, SqlClause sqlClause , String aliasName, int nestLevel, BsProductCategoryCQ myCQ) { super(referrerQuery, sqlClause, aliasName, nestLevel); _myCQ = myCQ; _foreignPropertyName = _myCQ.xgetForeignPropertyName(); // accept foreign property name _relationPath = _myCQ.xgetRelationPath(); // accept relation path _inline = true; } // =================================================================================== // Override about Register // ======================= protected void reflectRelationOnUnionQuery(ConditionQuery bq, ConditionQuery uq) { throw new IllegalConditionBeanOperationException("InlineView cannot use Union: " + bq + " : " + uq); } @Override protected void setupConditionValueAndRegisterWhereClause(ConditionKey k, Object v, ConditionValue cv, String col) { regIQ(k, v, cv, col); } @Override protected void setupConditionValueAndRegisterWhereClause(ConditionKey k, Object v, ConditionValue cv, String col, ConditionOption op) { regIQ(k, v, cv, col, op); } @Override protected void registerWhereClause(String wc) { registerInlineWhereClause(wc); } @Override protected boolean isInScopeRelationSuppressLocalAliasName() { if (_onClause) { throw new IllegalConditionBeanOperationException("InScopeRelation on OnClause is unsupported."); } return true; } // =================================================================================== // Override about Query // ==================== protected ConditionValue xgetCValueProductCategoryCode() { return _myCQ.xdfgetProductCategoryCode(); } public String keepProductCategoryCode_ExistsReferrer_ProductList(ProductCQ sq) { throwIICBOE("ExistsReferrer"); return null; } public String keepProductCategoryCode_ExistsReferrer_ProductCategorySelfList(ProductCategoryCQ sq) { throwIICBOE("ExistsReferrer"); return null; } public String keepProductCategoryCode_NotExistsReferrer_ProductList(ProductCQ sq) { throwIICBOE("NotExistsReferrer"); return null; } public String keepProductCategoryCode_NotExistsReferrer_ProductCategorySelfList(ProductCategoryCQ sq) { throwIICBOE("NotExistsReferrer"); return null; } public String keepProductCategoryCode_SpecifyDerivedReferrer_ProductList(ProductCQ sq) { throwIICBOE("(Specify)DerivedReferrer"); return null; } public String keepProductCategoryCode_SpecifyDerivedReferrer_ProductCategorySelfList(ProductCategoryCQ sq) { throwIICBOE("(Specify)DerivedReferrer"); return null; } public String keepProductCategoryCode_QueryDerivedReferrer_ProductList(ProductCQ sq) { throwIICBOE("(Query)DerivedReferrer"); return null; } public String keepProductCategoryCode_QueryDerivedReferrer_ProductListParameter(Object vl) { throwIICBOE("(Query)DerivedReferrer"); return null; } public String keepProductCategoryCode_QueryDerivedReferrer_ProductCategorySelfList(ProductCategoryCQ sq) { throwIICBOE("(Query)DerivedReferrer"); return null; } public String keepProductCategoryCode_QueryDerivedReferrer_ProductCategorySelfListParameter(Object vl) { throwIICBOE("(Query)DerivedReferrer"); return null; } protected ConditionValue xgetCValueProductCategoryName() { return _myCQ.xdfgetProductCategoryName(); } protected ConditionValue xgetCValueParentCategoryCode() { return _myCQ.xdfgetParentCategoryCode(); } protected Map<String, Object> xfindFixedConditionDynamicParameterMap(String pp) { return null; } public String keepScalarCondition(ProductCategoryCQ sq) { throwIICBOE("ScalarCondition"); return null; } public String keepSpecifyMyselfDerived(ProductCategoryCQ sq) { throwIICBOE("(Specify)MyselfDerived"); return null;} public String keepQueryMyselfDerived(ProductCategoryCQ sq) { throwIICBOE("(Query)MyselfDerived"); return null;} public String keepQueryMyselfDerivedParameter(Object vl) { throwIICBOE("(Query)MyselfDerived"); return null;} public String keepMyselfExists(ProductCategoryCQ sq) { throwIICBOE("MyselfExists"); return null;} protected void throwIICBOE(String name) { throw new IllegalConditionBeanOperationException(name + " at InlineView is unsupported."); } // =================================================================================== // Very Internal // ============= // very internal (for suppressing warn about 'Not Use Import') protected String xinCB() { return ProductCategoryCB.class.getName(); } protected String xinCQ() { return ProductCategoryCQ.class.getName(); } }
[ "dbflute@gmail.com" ]
dbflute@gmail.com
349268bd9de4ef92f091990c6ea737860b602aea
35b2ee390bb6cacba4fe1852f6f92a956dbd58e5
/src/behavioral/mediator/wikiexample/mediator/ConcreteMediator.java
92405e7897d1294d89eb923688d0e799341ca367
[]
no_license
zhukis/patterns
17d52ed8cb24bb123c07bfb6fe0336a00d5d59a8
bb220a092870172b4ab8f37fe58908641fca54dd
refs/heads/master
2021-01-20T23:09:18.691724
2017-09-08T14:08:27
2017-09-08T14:08:27
101,793,269
0
0
null
null
null
null
UTF-8
Java
false
false
800
java
package behavioral.mediator.wikiexample.mediator; import behavioral.mediator.wikiexample.component.Colleague; import behavioral.mediator.wikiexample.component.ConcreteCollegue1; import behavioral.mediator.wikiexample.component.ConcreteCollegue2; public class ConcreteMediator extends Mediator { ConcreteCollegue1 collegue1; ConcreteCollegue2 collegue2; public void setCollegue1(ConcreteCollegue1 collegue1) { this.collegue1 = collegue1; } public void setCollegue2(ConcreteCollegue2 collegue2) { this.collegue2 = collegue2; } @Override public void send(String message, Colleague colleague) { if (colleague.equals(collegue2)) { collegue1.notify(message); } else { collegue2.notify(message); } } }
[ "izhu@ericpol.com" ]
izhu@ericpol.com
3ecd4bbfd6cb3a6937f8621d336ac24f9f52ac66
3c5e0a73867838bc2afbc3b431dcc53ef8ea3af0
/src/com/ulane/running/model/pap/PapQueOpt.java
b7b75bc10d7585ba794a4931c327fead3c50444a
[]
no_license
cjp472/crm
5f5d21c9b2307ab5d144ca8a762f374823a950c4
d4a7f4dbf2983f0d3abb38ba0d0a916c08cb0c86
refs/heads/master
2020-03-19T09:48:34.976163
2018-05-05T07:47:27
2018-05-05T07:47:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,794
java
package com.ulane.running.model.pap; /* * 北京优创融联科技有限公司 综合客服管理系统 -- http://www.ulane.cn * Copyright (C) 2008-2010 Beijing Ulane Technology Co., LTD */ import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.EqualsBuilder; /** * * @author cf0666@gmail.com * */ /** * PapQueOpt Base Java Bean, base class for the.base.model, mapped directly to database table * * Avoid changing this file if not necessary, will be overwritten. * * */ public class PapQueOpt extends com.htsoft.core.model.BaseModel { protected Long optId; protected String optContent; protected Short disorder; protected Short isDefault; protected Short staId; protected com.ulane.running.model.pap.PapQue papQue; protected java.util.Set papAnsDetails = new java.util.HashSet(); /** * Default Empty Constructor for class PapQueOpt */ public PapQueOpt () { super(); } /** * Default Key Fields Constructor for class PapQueOpt */ public PapQueOpt ( Long in_optId ) { this.setOptId(in_optId); } public com.ulane.running.model.pap.PapQue getPapQue () { return papQue; } public void setPapQue (com.ulane.running.model.pap.PapQue in_papQue) { this.papQue = in_papQue; } public java.util.Set getPapAnsDetails () { return papAnsDetails; } public void setPapAnsDetails (java.util.Set in_papAnsDetails) { this.papAnsDetails = in_papAnsDetails; } /** * 题项内码 * @return Long * @hibernate.id column="OPT_ID" type="java.lang.Long" generator-class="native" */ public Long getOptId() { return this.optId; } /** * Set the optId */ public void setOptId(Long aValue) { this.optId = aValue; } /** * 题目编号ID * @return Long */ public Long getQueId() { return this.getPapQue()==null?null:this.getPapQue().getQueId(); } /** * Set the queId */ public void setQueId(Long aValue) { if (aValue==null) { papQue = null; } else if (papQue == null) { papQue = new com.ulane.running.model.pap.PapQue(aValue); papQue.setVersion(new Integer(0));//set a version to cheat hibernate only } else { // papQue.setQueId(aValue); } } /** * 题项 * @return String * @hibernate.property column="OPT_CONTENT" type="java.lang.String" length="2048" not-null="true" unique="false" */ public String getOptContent() { return this.optContent; } /** * Set the optContent * @spring.validator type="required" */ public void setOptContent(String aValue) { this.optContent = aValue; } /** * 序号 * @return Short * @hibernate.property column="DISORDER" type="java.lang.Short" length="5" not-null="true" unique="false" */ public Short getDisorder() { return this.disorder; } /** * Set the disorder * @spring.validator type="required" */ public void setDisorder(Short aValue) { this.disorder = aValue; } /** * 是否默认&YorN * @return Short * @hibernate.property column="IS_DEFAULT" type="java.lang.Short" length="5" not-null="true" unique="false" */ public Short getIsDefault() { return this.isDefault; } /** * Set the isDefault * @spring.validator type="required" */ public void setIsDefault(Short aValue) { this.isDefault = aValue; } /** * 状态:有效、注销&PAP_ZT * @return Short * @hibernate.property column="STA_ID" type="java.lang.Short" length="5" not-null="true" unique="false" */ public Short getStaId() { return this.staId; } /** * Set the staId * @spring.validator type="required" */ public void setStaId(Short aValue) { this.staId = aValue; } /** * @see java.lang.Object#equals(Object) */ public boolean equals(Object object) { if (!(object instanceof PapQueOpt)) { return false; } PapQueOpt rhs = (PapQueOpt) object; return new EqualsBuilder() .append(this.optId, rhs.optId) .append(this.optContent, rhs.optContent) .append(this.disorder, rhs.disorder) .append(this.isDefault, rhs.isDefault) .append(this.staId, rhs.staId) .isEquals(); } /** * @see java.lang.Object#hashCode() */ public int hashCode() { return new HashCodeBuilder(-82280557, -700257973) .append(this.optId) .append(this.optContent) .append(this.disorder) .append(this.isDefault) .append(this.staId) .toHashCode(); } /** * @see java.lang.Object#toString() */ public String toString() { return new ToStringBuilder(this) .append("optId", this.optId) .append("optContent", this.optContent) .append("disorder", this.disorder) .append("isDefault", this.isDefault) .append("staId", this.staId) .toString(); } }
[ "huyang3868@163.com" ]
huyang3868@163.com
01311d912de7535c43224b74a554150cb713e69d
e245da2da841089900f82ddefe3636c817b1d4a9
/src/com/sinosoft/lis/rulelibrary/LRRuleAddBL.java
661fb6d887904aa824dffcfa766489402ee29763
[]
no_license
ssdtfarm/Productoin_CMS
46820daa441b449bd96ec699c554bb594017b63e
753818ca1ddb1b05e5d459b8028580b7ac8250b5
refs/heads/master
2020-04-12T22:54:13.456687
2016-04-14T06:44:57
2016-04-14T06:44:57
60,250,819
0
3
null
2016-06-02T09:29:06
2016-06-02T09:29:05
null
UTF-8
Java
false
false
5,795
java
/* ************************************************************************* * Copyright (C) 2010-2012, Sinosoft Corporation and others. * * All Rights Reserved. * ************************************************************************* */ package com.sinosoft.lis.rulelibrary; import com.sinosoft.Resource.bundle; import com.sinosoft.lis.pubfun.GlobalInput; import com.sinosoft.lis.pubfun.MMap; import com.sinosoft.lis.pubfun.PubFun; import com.sinosoft.lis.pubfun.PubFun1; import com.sinosoft.lis.pubfun.PubSubmit; import com.sinosoft.utility.CError; import com.sinosoft.utility.CErrors; import com.sinosoft.utility.ExeSQL; import com.sinosoft.utility.SSRS; import com.sinosoft.utility.TransferData; import com.sinosoft.utility.VData; public class LRRuleAddBL { /** 错误处理类,每个需要错误处理的类中都放置该类 */ public CErrors mErrors = new CErrors(); private String mOperate;// 数据操作字符串 private GlobalInput mGlobalInput = new GlobalInput();// 全局数据 private MMap mMap = new MMap(); private VData mResult = new VData();// 存放返回数据的容器 private String mIndexCode = ""; private String mIndexName = ""; private String mBranchType = ""; private String mBranchType2 = ""; private String mDescription = ""; private String mWageCode = ""; private String mTestArea = ""; private String mDataType = ""; private String mLogicType = ""; private String mIndexType = ""; private String mState = ""; private String mJson; private String mIndexSet; private String currentDate = PubFun.getCurrentDate(); private String currentTime = PubFun.getCurrentTime(); public LRRuleAddBL() { } /** * 传输数据的公共方法 */ public boolean check() { return true; } public boolean submitData(VData cInputData, String cOperate) { // 将操作数据拷贝到本类中 this.mOperate = cOperate; // 得到外部传入的数据,将数据备份到本类中 if (!getInputData(cInputData)) { return false; } if (!check()) { return false; } // 进行业务处理 if (!dealData()) { if (!mErrors.needDealError()) { CError.buildErr(this, bundle.getString("Src_BL_dealDateErr")); } return false; } // 开始提交 VData tVData = new VData(); tVData.add(mMap); PubSubmit tPubSubmit = new PubSubmit(); if (!tPubSubmit.submitData(tVData, "")) { // @@错误处理 CError.buildErr(this, bundle.getString("Src_pubSubmitErr")); return false; } return true; } /** * 从输入数据中得到所有对象 输出:如果没有得到足够的业务数据对象,则返回false,否则返回true */ public boolean getInputData(VData cInputData) { // 全局变量 mGlobalInput = (GlobalInput) cInputData.get(0); TransferData transferData = (TransferData) cInputData.get(1); mWageCode = (String) transferData.getValueByName("WageCode"); mIndexCode = (String) transferData.getValueByName("IndexCode"); mIndexName = (String) transferData.getValueByName("IndexName"); mBranchType = (String) transferData.getValueByName("BranchType"); mBranchType2 = (String) transferData.getValueByName("BranchType2"); mDescription = (String) transferData.getValueByName("Description"); mTestArea = (String) transferData.getValueByName("TestArea"); mDataType = (String) transferData.getValueByName("DataType"); mLogicType = (String) transferData.getValueByName("LogicType"); mJson = (String) transferData.getValueByName("Json"); mIndexSet = (String) transferData.getValueByName("IndexSet"); mIndexType = (String) transferData.getValueByName("IndexType"); mState = (String)transferData.getValueByName("State"); if (mGlobalInput == null) { CError.buildErr(this, bundle.getString("Src_UI_getInputDataErr")); return false; } return true; } /** * 业务处理主函数 * * @return boolean */ public boolean dealData() { if (mOperate.equals("save")) { // TODO 保存 // CError.buildErr(this, "后台还没有实现这个方法:保存"); // return false; String indexcode = "R" + PubFun1.CreateMaxNo("LRAssess", 9); String sql = "insert into LRAssessIndexLibrary(indexcode,indexname,branchtype,Description,wagecode,DataType,CalType,indextype,branchtype2,state) values('" + indexcode + "','" + mIndexName + "','" + mBranchType + "','" + mDescription + "','" + mWageCode + "','" + mDataType + "','" + mLogicType + "','" + mIndexType + "','"+mBranchType2+"','"+mState+"')"; mMap.put(sql, "INSERT"); } return true; } /** * 这个方法返回的结果中存放程序执行后的结果 如果程序需要返回数据,可以通过这个方法实现 * * @return 返回一个VData容器 */ public VData getResult() { return mResult; } // public static void main(String[] args) { // String sql = "select bomid,id,name from LRTerm order by bomid"; // ExeSQL exe = new ExeSQL(); // SSRS ssrs = exe.execSQL(sql); // StringBuffer sb = new StringBuffer("{"); // String currBomid = null; // boolean startbom = false; // for (int i = 1; i <= ssrs.MaxRow; i++) { // String bomid = ssrs.GetText(i, 1); // String id = ssrs.GetText(i, 2); // String name = ssrs.GetText(i, 3); // // if (!bomid.equals(currBomid)) { // currBomid = bomid; // if (i > 1) { // sb.append("],"); // } // sb.append(currBomid).append(":["); // startbom = true; // } // if (startbom) { // startbom = false; // } else { // sb.append(","); // } // sb.append("{id:'").append(id).append("',name:'").append(name) // .append("'}"); // if (i == ssrs.MaxRow) { // sb.append("]"); // } // } // sb.append("}"); // // ssrs.GetText(1, 1); // } }
[ "ja_net@163.com" ]
ja_net@163.com
753e0dc67304530eb0d62a42245ece59e293fa06
e98b8ae1f0fae0d3948d0f3a85539d6639a87d14
/src/main/java/com/google/gson/internal/bind/JsonTreeReader.java
6cd93f06209fa1e7ee73ff24d72ff9211fe327e0
[ "Apache-2.0" ]
permissive
bpiwowar/gson
8c1d9cf77ddbd92edaa0f2ea7d1fbec2f0852072
4a8a3b246795d606049be80929311c7166be8c8d
refs/heads/master
2016-09-05T21:31:44.332477
2016-01-25T21:25:47
2016-01-25T21:25:47
25,075,587
0
2
null
null
null
null
UTF-8
Java
false
false
7,412
java
/* * Copyright (C) 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.gson.internal.bind; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonToken; import java.io.IOException; import java.io.Reader; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map; /** * This reader walks the elements of a JsonElement as if it was coming from a * character stream. * * @author Jesse Wilson */ public final class JsonTreeReader extends JsonReader { private static final Reader UNREADABLE_READER = new Reader() { @Override public int read(char[] buffer, int offset, int count) throws IOException { throw new AssertionError(); } @Override public void close() throws IOException { throw new AssertionError(); } }; private static final Object SENTINEL_CLOSED = new Object(); private final List<Object> stack = new ArrayList<Object>(); public JsonTreeReader(JsonElement element) { super(UNREADABLE_READER); stack.add(element); } /** * Gets the JsonObject and advance the stream up to the end of the object. * * This avoids creating new objects * * @return A Json Object * @throws IOException If an error occurs * @since 2.4 */ public JsonObject getJsonObject() throws IOException { expect(JsonToken.BEGIN_OBJECT); JsonObject object = (JsonObject) peekStack(); popStack(); // object return object; } @Override public void beginArray() throws IOException { expect(JsonToken.BEGIN_ARRAY); JsonArray array = (JsonArray) peekStack(); stack.add(array.iterator()); } @Override public void endArray() throws IOException { expect(JsonToken.END_ARRAY); popStack(); // empty iterator popStack(); // array } @Override public void beginObject() throws IOException { expect(JsonToken.BEGIN_OBJECT); JsonObject object = (JsonObject) peekStack(); stack.add(object.entrySet().iterator()); } @Override public void endObject() throws IOException { expect(JsonToken.END_OBJECT); popStack(); // empty iterator popStack(); // object } @Override public boolean hasNext() throws IOException { JsonToken token = peek(); return token != JsonToken.END_OBJECT && token != JsonToken.END_ARRAY; } @Override public JsonToken peek() throws IOException { if (stack.isEmpty()) { return JsonToken.END_DOCUMENT; } Object o = peekStack(); if (o instanceof Iterator) { boolean isObject = stack.get(stack.size() - 2) instanceof JsonObject; Iterator<?> iterator = (Iterator<?>) o; if (iterator.hasNext()) { if (isObject) { return JsonToken.NAME; } else { stack.add(iterator.next()); return peek(); } } else { return isObject ? JsonToken.END_OBJECT : JsonToken.END_ARRAY; } } else if (o instanceof JsonObject) { return JsonToken.BEGIN_OBJECT; } else if (o instanceof JsonArray) { return JsonToken.BEGIN_ARRAY; } else if (o instanceof JsonPrimitive) { JsonPrimitive primitive = (JsonPrimitive) o; if (primitive.isString()) { return JsonToken.STRING; } else if (primitive.isBoolean()) { return JsonToken.BOOLEAN; } else if (primitive.isNumber()) { return JsonToken.NUMBER; } else { throw new AssertionError(); } } else if (o instanceof JsonNull) { return JsonToken.NULL; } else if (o == SENTINEL_CLOSED) { throw new IllegalStateException("JsonReader is closed"); } else { throw new AssertionError(); } } private Object peekStack() { return stack.get(stack.size() - 1); } private Object popStack() { return stack.remove(stack.size() - 1); } private void expect(JsonToken expected) throws IOException { if (peek() != expected) { throw new IllegalStateException("Expected " + expected + " but was " + peek()); } } @Override public String nextName() throws IOException { expect(JsonToken.NAME); Iterator<?> i = (Iterator<?>) peekStack(); Map.Entry<?, ?> entry = (Map.Entry<?, ?>) i.next(); stack.add(entry.getValue()); return (String) entry.getKey(); } @Override public String nextString() throws IOException { JsonToken token = peek(); if (token != JsonToken.STRING && token != JsonToken.NUMBER) { throw new IllegalStateException("Expected " + JsonToken.STRING + " but was " + token); } return ((JsonPrimitive) popStack()).getAsString(); } @Override public boolean nextBoolean() throws IOException { expect(JsonToken.BOOLEAN); return ((JsonPrimitive) popStack()).getAsBoolean(); } @Override public void nextNull() throws IOException { expect(JsonToken.NULL); popStack(); } @Override public double nextDouble() throws IOException { JsonToken token = peek(); if (token != JsonToken.NUMBER && token != JsonToken.STRING) { throw new IllegalStateException("Expected " + JsonToken.NUMBER + " but was " + token); } double result = ((JsonPrimitive) peekStack()).getAsDouble(); if (!isLenient() && (Double.isNaN(result) || Double.isInfinite(result))) { throw new NumberFormatException("JSON forbids NaN and infinities: " + result); } popStack(); return result; } @Override public long nextLong() throws IOException { JsonToken token = peek(); if (token != JsonToken.NUMBER && token != JsonToken.STRING) { throw new IllegalStateException("Expected " + JsonToken.NUMBER + " but was " + token); } long result = ((JsonPrimitive) peekStack()).getAsLong(); popStack(); return result; } @Override public int nextInt() throws IOException { JsonToken token = peek(); if (token != JsonToken.NUMBER && token != JsonToken.STRING) { throw new IllegalStateException("Expected " + JsonToken.NUMBER + " but was " + token); } int result = ((JsonPrimitive) peekStack()).getAsInt(); popStack(); return result; } @Override public void close() throws IOException { stack.clear(); stack.add(SENTINEL_CLOSED); } @Override public void skipValue() throws IOException { if (peek() == JsonToken.NAME) { nextName(); } else { popStack(); } } @Override public String toString() { return getClass().getSimpleName(); } public void promoteNameToValue() throws IOException { expect(JsonToken.NAME); Iterator<?> i = (Iterator<?>) peekStack(); Map.Entry<?, ?> entry = (Map.Entry<?, ?>) i.next(); stack.add(entry.getValue()); stack.add(new JsonPrimitive((String)entry.getKey())); } }
[ "benjamin@bpiwowar.net" ]
benjamin@bpiwowar.net
a186c973b4d9a0c0cd6e3d1cdbef7e952ff2d60b
00d5b3580fb8f52474d263e49264cb249feaeb3c
/src/main/java/uk/ac/stand/dcs/asa/storage/persistence/interfaces/INameAttributedPersistentObjectBinding.java
96b9723689567fa7ea068df5c8d7f02202ed804f
[]
no_license
stacs-srg/asa
62e8ee71125ce2a2d199b3d43939ef5fa90dbd19
ee5341b515119fdb8a4e756c9240e93ecd3f9a40
refs/heads/master
2021-03-27T00:52:30.190130
2017-04-23T12:52:43
2017-04-23T12:52:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
441
java
/* * Created on Jun 17, 2005 at 9:25:04 AM. */ package uk.ac.stand.dcs.asa.storage.persistence.interfaces; /** * @author al */ public interface INameAttributedPersistentObjectBinding { /** * Gets the name. * * @return the name */ String getName(); /** * Gets the IAttributedStatefulObject. * * @return the IAttributedStatefulObject */ IAttributedStatefulObject getObject(); }
[ "sic2@st-andrews.ac.uk" ]
sic2@st-andrews.ac.uk
5764a1dfe6913237336c8f5b4bb1445e370d8de1
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/4/4_22ca1491bcf554339e835fbdc30576972f194356/TunnelId/4_22ca1491bcf554339e835fbdc30576972f194356_TunnelId_s.java
2fd9c84eef46dc4a3ceeeb65b77b489aabec3609
[]
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,248
java
package net.i2p.data; /* * free (adj.): unencumbered; not under the control of others * Written by jrandom in 2003 and released into the public domain * with no warranty of any kind, either expressed or implied. * It probably won't make your computer catch on fire, or eat * your children, but it might. Use at your own risk. * */ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import net.i2p.util.Log; /** * Defines the tunnel ID that messages are passed through on a set of routers. * This is not globally unique, but must be unique on each router making up * the tunnel (otherwise they would get confused and send messages down the * wrong one). * * @author jrandom */ public class TunnelId extends DataStructureImpl { private final static Log _log = new Log(TunnelId.class); private long _tunnelId; private int _type; public static final long MAX_ID_VALUE = (1l<<32l)-1l; public final static int TYPE_UNSPECIFIED = 0; public final static int TYPE_INBOUND = 1; public final static int TYPE_OUTBOUND = 2; public final static int TYPE_PARTICIPANT = 3; public TunnelId() { _tunnelId = -1; _type = TYPE_UNSPECIFIED; } public TunnelId(long id) { if (id <= 0) throw new IllegalArgumentException("wtf, tunnelId " + id); _tunnelId = id; _type = TYPE_UNSPECIFIED; } public TunnelId(long id, int type) { if (id <= 0) throw new IllegalArgumentException("wtf, tunnelId " + id); _tunnelId = id; _type = type; } public long getTunnelId() { return _tunnelId; } public void setTunnelId(long id) { _tunnelId = id; if (id <= 0) throw new IllegalArgumentException("wtf, tunnelId " + id); } /** * is this tunnel inbound, outbound, or a participant (kept in memory only and used only for the router).s * * @return type of tunnel (per constants TYPE_UNSPECIFIED, TYPE_INBOUND, TYPE_OUTBOUND, TYPE_PARTICIPANT) */ public int getType() { return _type; } public void setType(int type) { _type = type; } public void readBytes(InputStream in) throws DataFormatException, IOException { _tunnelId = DataHelper.readLong(in, 4); } public void writeBytes(OutputStream out) throws DataFormatException, IOException { if (_tunnelId < 0) throw new DataFormatException("Invalid tunnel ID: " + _tunnelId); DataHelper.writeLong(out, 4, _tunnelId); } public int writeBytes(byte target[], int offset) throws DataFormatException { if (_tunnelId < 0) throw new DataFormatException("Invalid tunnel ID: " + _tunnelId); DataHelper.toLong(target, offset, 4, _tunnelId); return 4; } public boolean equals(Object obj) { if ( (obj == null) || !(obj instanceof TunnelId)) return false; return getTunnelId() == ((TunnelId)obj).getTunnelId(); } public int hashCode() { return (int)getTunnelId(); } public String toString() { return "[TunnelID: " + getTunnelId() + "]"; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
d450cafe5c42e71d3a67bd3b06fe98ce181b3ba1
ff5107cf2f495b2a07329cdf7190ff6469a1a834
/apps/microservices/ad/src/main/java/com/adloveyou/ms/ad/repository/MediaRepository.java
abf27f130b1fefeee4cf16abc4c07052c562a10a
[]
no_license
icudroid/addonf-microservice
596e341cf282e1190c3752f6adf5a2c210976032
db9e80617b206ff3c1122e56f3c6de14e555692e
refs/heads/master
2021-05-09T02:15:47.863941
2018-01-27T20:29:48
2018-01-27T20:29:48
119,200,152
0
0
null
null
null
null
UTF-8
Java
false
false
358
java
package com.adloveyou.ms.ad.repository; import com.adloveyou.ms.ad.domain.Media; import org.springframework.stereotype.Repository; import org.springframework.data.jpa.repository.*; /** * Spring Data JPA repository for the Media entity. */ @SuppressWarnings("unused") @Repository public interface MediaRepository extends JpaRepository<Media, Long> { }
[ "dimitri@d-kahn.net" ]
dimitri@d-kahn.net
7a2c248a123757183da4a7701d290e062a966dc3
9856541e29e2597f2d0a7ef4729208190d9bbebe
/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverAnnotationTests.java
0708a987754a0e498e8735d841a0e68bdc6e40a1
[ "Apache-2.0" ]
permissive
lakeslove/springSourceCodeTest
74bffc0756fa5ea844278827d86a085b9fe4c14e
25caac203de57c4b77268be60df2dcb2431a03e1
refs/heads/master
2020-12-02T18:10:14.048955
2017-07-07T00:41:55
2017-07-07T00:41:55
96,483,747
1
0
null
null
null
null
UTF-8
Java
false
false
1,568
java
/* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.aop.aspectj; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import org.aspectj.lang.ProceedingJoinPoint; import org.junit.Test; /** * Additional parameter name discover tests that need Java 5. * Yes this will re-run the tests from the superclass, but that * doesn't matter in the grand scheme of things... * * @author Adrian Colyer * @author Chris Beams */ public final class AspectJAdviceParameterNameDiscoverAnnotationTests extends AspectJAdviceParameterNameDiscovererTests { @Retention(RetentionPolicy.RUNTIME) @interface MyAnnotation {} public void pjpAndAnAnnotation(ProceedingJoinPoint pjp, MyAnnotation ann) {} @Test public void testAnnotationBinding() { assertParameterNames(getMethod("pjpAndAnAnnotation"), "execution(* *(..)) && @annotation(ann)", new String[] {"thisJoinPoint","ann"}); } }
[ "lakeslove@126.com" ]
lakeslove@126.com
a849c48eda3a58f13dff7b00ed8e963c11a5fb81
6240a87133481874e293b36a93fdb64ca1f2106c
/taobao/src/com/taobao/api/response/ItemJointPropimgResponse.java
aedac117df1ea2e54953b702873d1b00f1415cfe
[]
no_license
mrzeng/comments-monitor
596ba8822d70f8debb630f40b548f62d0ad48bd4
1451ec9c14829c7dc29a2297a6f3d6c4e490dc13
refs/heads/master
2021-01-15T08:58:05.997787
2013-07-17T16:29:23
2013-07-17T16:29:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
651
java
package com.taobao.api.response; import com.taobao.api.internal.mapping.ApiField; import com.taobao.api.domain.PropImg; import com.taobao.api.TaobaoResponse; /** * TOP API: taobao.item.joint.propimg response. * * @author auto create * @since 1.0, null */ public class ItemJointPropimgResponse extends TaobaoResponse { private static final long serialVersionUID = 1567585634126234571L; /** * 属性图片对象信息 */ @ApiField("prop_img") private PropImg propImg; public void setPropImg(PropImg propImg) { this.propImg = propImg; } public PropImg getPropImg( ) { return this.propImg; } }
[ "qujian@gionee.com" ]
qujian@gionee.com
0000bc9730a4be2e0de8a77bf2f6091bdddc7568
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
/aliyun-java-sdk-eas/src/main/java/com/aliyuncs/eas/transform/v20210701/CreateResourceInstancesResponseUnmarshaller.java
ac9430a9090c6119108438fbd18f550940e7df2d
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk
a263fa08e261f12d45586d1b3ad8a6609bba0e91
e19239808ad2298d32dda77db29a6d809e4f7add
refs/heads/master
2023-09-03T12:28:09.765286
2023-09-01T09:03:00
2023-09-01T09:03:00
39,555,898
1,542
1,317
NOASSERTION
2023-09-14T07:27:05
2015-07-23T08:41:13
Java
UTF-8
Java
false
false
1,595
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.eas.transform.v20210701; import java.util.ArrayList; import java.util.List; import com.aliyuncs.eas.model.v20210701.CreateResourceInstancesResponse; import com.aliyuncs.transform.UnmarshallerContext; public class CreateResourceInstancesResponseUnmarshaller { public static CreateResourceInstancesResponse unmarshall(CreateResourceInstancesResponse createResourceInstancesResponse, UnmarshallerContext _ctx) { createResourceInstancesResponse.setRequestId(_ctx.stringValue("CreateResourceInstancesResponse.RequestId")); createResourceInstancesResponse.setMessage(_ctx.stringValue("CreateResourceInstancesResponse.Message")); List<String> instanceIds = new ArrayList<String>(); for (int i = 0; i < _ctx.lengthValue("CreateResourceInstancesResponse.InstanceIds.Length"); i++) { instanceIds.add(_ctx.stringValue("CreateResourceInstancesResponse.InstanceIds["+ i +"]")); } createResourceInstancesResponse.setInstanceIds(instanceIds); return createResourceInstancesResponse; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
f07b80dd29dac99c6f7d00abe69380a00ea44950
64f6b54df29d67b13d7984037ac5f403f8b2bb77
/YWPT/ywpt_V1.0/src/com/xiangxun/atms/common/system/web/SysIndexModelCtl.java
e868896922eaaabc2c6ad99638886c45a2fbc0bd
[]
no_license
Darlyyuhui/history
3e8f3f576180811f0aca1a7576106baaa47ff097
6338dc4e9514038b65f12a8f174e49d41ecb71b6
refs/heads/master
2021-01-22T21:17:43.422744
2017-10-10T02:52:02
2017-10-10T02:52:02
100,677,394
0
0
null
null
null
null
UTF-8
Java
false
false
6,441
java
package com.xiangxun.atms.common.system.web; import java.lang.reflect.InvocationTargetException; import java.util.Map; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.lang.StringUtils; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import com.xiangxun.atms.common.system.service.SysIndexModelService; import com.xiangxun.atms.common.system.vo.SysIndexModel; import com.xiangxun.atms.framework.base.BaseCtl; import com.xiangxun.atms.framework.base.Page; import com.xiangxun.atms.framework.log.anotation.LogAspect; import com.xiangxun.atms.framework.util.Servlets; import com.xiangxun.atms.framework.util.SessionParameter; import com.xiangxun.atms.framework.util.UuidGenerateUtil; import com.xiangxun.atms.framework.validator.ResponseEntity; /*** * @author YanTao * @Apr 26, 2013 5:39:59 PM */ @Controller @RequestMapping(value="system/sysindexmodel") public class SysIndexModelCtl extends BaseCtl{ @Resource SysIndexModelService sysIndexModelService; @RequestMapping(value="list/{menuid}/") public String list(@PathVariable String menuid,ModelMap model,@RequestParam(value = "sortType", defaultValue = "id") String sortType, @RequestParam(value = "page", defaultValue = "0") int pageNumber,HttpServletRequest request){ Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_"); //解决返回后 搜索条件消失问题 更新SESSION级别的参数状态 SessionParameter sp = new SessionParameter(); sp.updateSessionMap(request, menuid, searchParams); Page page = sysIndexModelService.getByCondition(searchParams,pageNumber,Page.DEFAULT_PAGE_SIZE,sortType); model.addAttribute("menuid", menuid); model.addAttribute("sortType", sortType); model.addAttribute("pageList", page); // 将搜索条件编码成字符串,用于排序,分页的URL model.addAttribute("searchParams", Servlets.encodeParameterStringWithPrefix(searchParams, "search_")); SysIndexModel sysIndexModel = new SysIndexModel(); try { BeanUtils.populate(sysIndexModel, searchParams); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } model.addAttribute("sysIndexModel", sysIndexModel); return "system/sysindexmodel/list"; } /*** * 删除一个首页显示组件 * @param ids * @param resp */ @RequestMapping(value="delete/{ids}/",method = RequestMethod.DELETE) @ResponseBody @LogAspect(desc="删除了一个首页显示组件") public ResponseEntity delete(@PathVariable String ids){ ResponseEntity entity = new ResponseEntity(); try { String[] id = ids.split(","); for (String string : id) { sysIndexModelService.deleteById(string); } entity.setResult("ok"); return entity; } catch (Exception e) { entity.setResult("error"); return entity; } } /*** * 添加一个首页显示组件 * @param menuid * @param redirectAttributes * @return */ @RequestMapping(value = "doAdd", method = RequestMethod.POST) @LogAspect(desc="添加一个首页显示组件") public String doAdd(SysIndexModel sysIndexModel,String menuid,RedirectAttributes redirectAttributes){ sysIndexModel.setId(UuidGenerateUtil.getUUID()); sysIndexModelService.save(sysIndexModel); redirectAttributes.addFlashAttribute("message","首页显示组件添加成功"); return "redirect:/system/sysindexmodel/list/"+menuid+"/"; } /*** * @param id * @param model * @return */ @RequestMapping(value = "update/{id}/{menuid}/", method = RequestMethod.GET) public String updateForm(@PathVariable("id") String id,@PathVariable("menuid") String menuid,String page,Model model) { model.addAttribute("sysIndexModel",sysIndexModelService.getById(id)); model.addAttribute("menuid",menuid); model.addAttribute("page",page); return "system/sysindexmodel/update"; } /*** * @param menuid * @param redirectAttributes * @return */ @RequestMapping(value = "doUpdate", method = RequestMethod.POST) @LogAspect(desc="修改首页显示组件信息") public String doUpdate(@ModelAttribute("preload")SysIndexModel sysIndexModel,String page,String menuid,RedirectAttributes redirectAttributes) { sysIndexModelService.updateByIdSelective(sysIndexModel); redirectAttributes.addFlashAttribute("message", "修改成功"); return "redirect:/system/sysindexmodel/list/"+menuid+"/?page="+page; } /*** * @param req * @param nameExist * @return */ @RequestMapping(value = "codeExist") @ResponseBody public String nmaeExist(HttpServletRequest req, @RequestParam(value = "code") String code) { SysIndexModel sysIndexModel = sysIndexModelService.getByCode(code); String returnStr = Boolean.FALSE.toString(); if (sysIndexModel == null) { returnStr = Boolean.TRUE.toString(); } String oper = req.getParameter("oper"); //不为空说明是修改 if(StringUtils.isNotBlank(oper)){ if(code.equals(oper)){ return Boolean.TRUE.toString(); } } return returnStr; } /*** * 获取详情信息 * @param id * @param model * @return */ @RequestMapping(value = "view/{id}/{menuid}/", method = RequestMethod.GET) public String view(@PathVariable("id") String id,@PathVariable("menuid") String menuid,String page,Model model) { SysIndexModel sysIndexModel = sysIndexModelService.getById(id); model.addAttribute("sysIndexModel", sysIndexModel); model.addAttribute("menuid",menuid); model.addAttribute("page",page); return "system/sysindexmodel/view"; } /*** * 先根据form的id从数据库查出首页显示组件 * @param id * @return */ @ModelAttribute("preload") public SysIndexModel getSysIndexModel(@RequestParam(value = "id", required = false) String id) { if (id != null) { return sysIndexModelService.getById(id); } return null; } }
[ "598596582@qq.com" ]
598596582@qq.com
555dd35938664ee160ea66b6468c8fe675aeb812
ca24ad13cf4dba63971c6791b5c7de321bb7f8f7
/weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/CouponType.java
358d749266f8dacc5c9756b6b3949ac4aa6df0c5
[ "Apache-2.0" ]
permissive
lyzhanghai/weixin4j
966f892ebe5c559bf529b11c1b8d020ac2ed7d21
f62985f69df71151cb3a2076c3f6923c11aa787e
refs/heads/master
2020-12-03T08:14:10.709030
2016-07-08T02:29:27
2016-07-08T02:29:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
455
java
package com.foxinmy.weixin4j.type; /** * 代金券类型 * * @className CouponType * @author jinyu(foxinmy@gmail.com) * @date 2015年3月27日 * @since JDK 1.6 * @see */ public enum CouponType { /** * 使用无门槛 */ NO_THRESHOLD(1), /** * 使用有门槛 */ HAS_THRESHOLD(2), /** * 门槛叠加 */ THRESHOLD_PLUS(3); private int val; CouponType(int val) { this.val = val; } public int getVal() { return val; } }
[ "foxinmy@gmail.com" ]
foxinmy@gmail.com
141521193dfa14ef116d3429fec0936d6c170800
f5b0c9be6293194dd81d3af987bd513ab4e87221
/src/com/hackerearth/competitions/hack_a_heart/TaskA.java
91fc70723a63c2c7aeab36ae515a02642ab47de8
[]
no_license
rahulkhairwar/dsa-library
13f8eb7765d3fa4e8cf2a746a3007e3a9447b2f8
b14d14b4e3227ef596375bab55e88d50c7b950a6
refs/heads/master
2022-04-28T06:37:16.098693
2020-04-04T19:00:11
2020-04-04T19:00:11
43,200,287
3
1
null
null
null
null
UTF-8
Java
false
false
2,470
java
package com.hackerearth.competitions.hack_a_heart; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.InputMismatchException; public final class TaskA { public static void main(String[] args) { InputReader in = new InputReader(System.in); PrintWriter out = new PrintWriter(System.out); Solver solver = new Solver(in, out); solver.solve(); in.close(); out.flush(); out.close(); } static class Solver { int n, arr[]; double x, y; double ans; InputReader in; PrintWriter out; void solve() { n = in.nextInt(); arr = in.nextIntArray(n); ans = Double.MAX_VALUE; fun(0); out.printf("%.6f", ans); } void fun(int pos) { if (pos == n) { if (x == 0 || y == 0) return; ans = Math.min(ans, Math.min(Math.abs(1.0 - x / y), Math.abs(1.0 - y / x))); return; } fun(pos + 1); x += arr[pos]; fun(pos + 1); x -= arr[pos]; y += arr[pos]; fun(pos + 1); y -= arr[pos]; } public Solver(InputReader in, PrintWriter out) { this.in = in; this.out = out; } } static class InputReader { private InputStream stream; private byte[] buf = new byte[1024]; private int curChar; private int numChars; public InputReader(InputStream stream) { this.stream = stream; } public int read() { if (numChars == -1) throw new InputMismatchException(); if (curChar >= numChars) { curChar = 0; try { numChars = stream.read(buf); } catch (IOException e) { throw new InputMismatchException(); } if (numChars <= 0) return -1; } return buf[curChar++]; } public int nextInt() { int c = read(); while (isSpaceChar(c)) c = read(); int sgn = 1; if (c == '-') { sgn = -1; c = read(); } int res = 0; do { if (c < '0' || c > '9') throw new InputMismatchException(); res *= 10; res += c & 15; c = read(); } while (!isSpaceChar(c)); return res * sgn; } public int[] nextIntArray(int arraySize) { int array[] = new int[arraySize]; for (int i = 0; i < arraySize; i++) array[i] = nextInt(); return array; } public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } public void close() { try { stream.close(); } catch (IOException e) { e.printStackTrace(); } } } }
[ "rahulkhairwar@gmail.com" ]
rahulkhairwar@gmail.com
1f44ae42b7265742f3b9a584463ba3a494ff63f1
823471e6a384e6c552df936f1832e56a67a74669
/app/src/main/java/com/bw/combatsample/view/widget/MyView.java
57908b5af4534ec5b660ee595ec7c6a994bfb64c
[]
no_license
tongchexinfeitao/CombatSample
0acc8eddb382d2cf2f4df0f5a2e0d33d2316b2ef
3c9aebce3fa8baae18967ce8748acbef76b3db3d
refs/heads/master
2020-09-21T21:57:34.761848
2019-12-12T09:21:48
2019-12-12T09:21:48
224,946,405
0
2
null
null
null
null
UTF-8
Java
false
false
2,049
java
package com.bw.combatsample.view.widget; import android.annotation.SuppressLint; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.RectF; import android.os.Build; import android.support.annotation.Nullable; import android.support.annotation.RequiresApi; import android.util.AttributeSet; import android.view.View; public class MyView extends View { private Paint paint; //直接 new MyView的时候调用 public MyView(Context context) { super(context); } //在xml中使用 MyView 的时候 public MyView(Context context, @Nullable AttributeSet attrs) { super(context, attrs); paint = new Paint(); //设置画笔颜色 paint.setColor(Color.GREEN); //设置画笔的粗细 paint.setStrokeWidth(10); //设置是否填充 paint.setStyle(Paint.Style.STROKE); //抗锯齿 paint.setAntiAlias(true); } //专门用来画东西, 绘制 @SuppressLint("DrawAllocation") @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); //画线 canvas.drawLine(10, 10, 150, 150, paint); //画圆 canvas.drawCircle(300, 300, 200, paint); //画矩形 paint.setColor(Color.BLACK); canvas.drawRect(150, 150, 550, 450, paint); //画弧 false, 画扇形是true , paint.setColor(Color.RED); //STROKE只画轮廓、 FILL填充 paint.setStyle(Paint.Style.FILL); RectF rect = new RectF(150, 150, 450, 450); canvas.drawArc(rect, 0, 90, true, paint); paint.setColor(Color.BLACK); canvas.drawArc(rect, 90, 90, true, paint); paint.setColor(Color.YELLOW); canvas.drawArc(rect, 180, 90, true, paint); paint.setColor(Color.WHITE); canvas.drawArc(rect, 270, 90, true, paint); } }
[ "tongchexinfeitao@sina.cn" ]
tongchexinfeitao@sina.cn
efd156e3ff5a0b438f9f7b54a8f37a06ce45f41a
beae390bdb143973a6c03e79fab6fa5bd105511d
/streaming/src/test/java/com/huawei/streaming/view/FirstLevelStreamTest.java
2180b50ed6e236526b324edac4b837f8a28f2004
[ "Apache-2.0" ]
permissive
jack6215/StreamCQL
3b0d8b66a0439d7bcd09ded1f5672dc52d57afa8
e727c7d6bdee1d73ed05ac225366a15270f5f3f4
refs/heads/master
2021-01-24T20:32:50.744448
2015-10-15T01:22:51
2015-10-15T01:22:51
44,169,651
1
0
null
2015-10-15T01:12:35
2015-10-13T10:45:06
Java
UTF-8
Java
false
false
2,684
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.huawei.streaming.view; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.HashMap; import java.util.Map; import org.junit.Before; import org.junit.Test; import com.huawei.streaming.event.IEvent; import com.huawei.streaming.event.IEventType; import com.huawei.streaming.event.TupleEvent; import com.huawei.streaming.support.SupportEventMng; import com.huawei.streaming.support.SupportView; /** * * <FirstLevelStreamTest> * <功能详细描述> * */ public class FirstLevelStreamTest { private FirstLevelStream stream = null; private SupportView childView = null; private SupportEventMng mng = null; private IEventType eventType = null; /** * <setup> * @throws Exception 异常 */ @Before public void setUp() throws Exception { stream = new FirstLevelStream(); childView = new SupportView(); stream.addView(childView); mng = new SupportEventMng(); eventType = mng.getInput(); } /** * <testAdd> * <功能详细描述> */ @Test public void testAdd() { Map<String, Object> values = new HashMap<String, Object>(); values.put("a", 1); values.put("b", 1); values.put("c", "c1"); IEvent event1 = new TupleEvent("stream", eventType, values); childView.clearLastNewData(); stream.add(event1); assertTrue(childView.getLastNewData() != null); assertEquals(1, childView.getLastNewData().length); assertEquals(event1, childView.getLastNewData()[0]); // Remove view childView.clearLastNewData(); stream.removeView(childView); stream.add(event1); assertTrue(childView.getLastNewData() == null); } }
[ "absolute005@qq.com" ]
absolute005@qq.com
c6b9177cb63fb24b7df1d3cd0fe8d452bef510b3
6eb9945622c34e32a9bb4e5cd09f32e6b826f9d3
/src/com/facebook/share/internal/LikeActionController$11.java
deb11da76e49d0aa1ce0d1ec1ee2bf5f3a5c6e11
[]
no_license
alexivaner/GadgetX-Android-App
6d700ba379d0159de4dddec4d8f7f9ce2318c5cc
26c5866be12da7b89447814c05708636483bf366
refs/heads/master
2022-06-01T09:04:32.347786
2020-04-30T17:43:17
2020-04-30T17:43:17
260,275,241
0
0
null
null
null
null
UTF-8
Java
false
false
2,453
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.facebook.share.internal; import com.facebook.GraphRequestBatch; import com.facebook.LoggingBehavior; import com.facebook.internal.Logger; import com.facebook.internal.Utility; // Referenced classes of package com.facebook.share.internal: // LikeActionController class uestCompletionCallback implements com.facebook.ck { final LikeActionController this$0; final uestCompletionCallback val$completionHandler; final OGObjectIdRequestWrapper val$objectIdRequest; final PageIdRequestWrapper val$pageIdRequest; public void onBatchCompleted(GraphRequestBatch graphrequestbatch) { LikeActionController.access$1602(LikeActionController.this, val$objectIdRequest.verifiedObjectId); if (Utility.isNullOrEmpty(LikeActionController.access$1600(LikeActionController.this))) { LikeActionController.access$1602(LikeActionController.this, val$pageIdRequest.verifiedObjectId); LikeActionController.access$2302(LikeActionController.this, val$pageIdRequest.objectIsPage); } if (Utility.isNullOrEmpty(LikeActionController.access$1600(LikeActionController.this))) { Logger.log(LoggingBehavior.DEVELOPER_ERRORS, LikeActionController.access$100(), "Unable to verify the FB id for '%s'. Verify that it is a valid FB object or page", new Object[] { LikeActionController.access$2200(LikeActionController.this) }); LikeActionController likeactioncontroller = LikeActionController.this; if (val$pageIdRequest.error != null) { graphrequestbatch = val$pageIdRequest.error; } else { graphrequestbatch = val$objectIdRequest.error; } LikeActionController.access$2400(likeactioncontroller, "get_verified_id", graphrequestbatch); } if (val$completionHandler != null) { val$completionHandler.onComplete(); } } uestCompletionCallback() { this$0 = final_likeactioncontroller; val$objectIdRequest = ogobjectidrequestwrapper; val$pageIdRequest = pageidrequestwrapper; val$completionHandler = uestCompletionCallback.this; super(); } }
[ "hutomoivan@gmail.com" ]
hutomoivan@gmail.com
5a8781d32c1f60dab0c50f56272a758b8b547dbb
45ae550416c4891e59c99b9372185ebd78ff1998
/src/dObjectOriented1/No5_1/ReturnThis.java
0f1b9e9b491eaf49afed78d2d3e35f127f7f6c8f
[]
no_license
HenryXi/javaCrazy
5cf79da2aa990bfe940f6245ac8b957a09a00f6c
007712f9c912e0ef9078a9c442140aff7a3184bb
refs/heads/master
2016-09-06T08:10:26.941483
2016-01-07T10:37:10
2016-01-07T10:37:10
39,567,352
0
0
null
null
null
null
GB18030
Java
false
false
614
java
package dObjectOriented1.No5_1; /** * Description: * <br/>Copyright (C), 2005-2008, Yeeku.H.Lee * <br/>This program is protected by copyright laws. * <br/>Program Name: * <br/>Date: * @author Yeeku.H.Lee kongyeeku@163.com * @version 1.0 */ public class ReturnThis { public int age; public ReturnThis grow() { age++; //return this,返回调用该方法的对象 return this; } public static void main(String[] args) { ReturnThis rt = new ReturnThis(); //可以连续调用同一个方法 rt.grow() .grow() .grow(); System.out.println("rt的age属性值是:" + rt.age); } }
[ "xxy668@foxmail.com" ]
xxy668@foxmail.com
3906b5443704f3e856c79bdc3bad94ace2232c26
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project58/src/test/java/org/gradle/test/performance58_5/Test58_457.java
b61c6f4445a298c0c9566d2f4361738190b4a339
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
292
java
package org.gradle.test.performance58_5; import static org.junit.Assert.*; public class Test58_457 { private final Production58_457 production = new Production58_457("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
141dda20bcab8fa54840ad56cb4bc6449fa356f3
3f7a5d7c700199625ed2ab3250b939342abee9f1
/src/gcom/faturamento/bean/ContaHistoricoRelatoriosHelper.java
d701ae04cedc837eea63cc4ebecd93efce406c74
[]
no_license
prodigasistemas/gsan-caema
490cecbd2a784693de422d3a2033967d8063204d
87a472e07e608c557e471d555563d71c76a56ec5
refs/heads/master
2021-01-01T06:05:09.920120
2014-10-08T20:10:40
2014-10-08T20:10:40
24,958,220
1
0
null
null
null
null
ISO-8859-1
Java
false
false
5,320
java
/* * Copyright (C) 2007-2007 the GSAN - Sistema Integrado de Gestão de Serviços de Saneamento * * This file is part of GSAN, an integrated service management system for Sanitation * * GSAN is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License. * * GSAN is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ /* * GSAN - Sistema Integrado de Gestão de Serviços de Saneamento * Copyright (C) <2007> * Adriano Britto Siqueira * Alexandre Santos Cabral * Ana Carolina Alves Breda * Ana Maria Andrade Cavalcante * Aryed Lins de Araújo * Bruno Leonardo Rodrigues Barros * Carlos Elmano Rodrigues Ferreira * Cláudio de Andrade Lira * Denys Guimarães Guenes Tavares * Eduardo Breckenfeld da Rosa Borges * Fabíola Gomes de Araújo * Flávio Leonardo Cavalcanti Cordeiro * Francisco do Nascimento Júnior * Homero Sampaio Cavalcanti * Ivan Sérgio da Silva Júnior * José Edmar de Siqueira * José Thiago Tenório Lopes * Kássia Regina Silvestre de Albuquerque * Leonardo Luiz Vieira da Silva * Márcio Roberto Batista da Silva * Maria de Fátima Sampaio Leite * Micaela Maria Coelho de Araújo * Nelson Mendonça de Carvalho * Newton Morais e Silva * Pedro Alexandre Santos da Silva Filho * Rafael Corrêa Lima e Silva * Rafael Francisco Pinto * Rafael Koury Monteiro * Rafael Palermo de Araújo * Raphael Veras Rossiter * Roberto Sobreira Barbalho * Rodrigo Avellar Silveira * Rosana Carvalho Barbosa * Sávio Luiz de Andrade Cavalcante * Tai Mu Shih * Thiago Augusto Souza do Nascimento * Tiago Moreno Rodrigues * Vivianne Barbosa Sousa * * Este programa é software livre; você pode redistribuí-lo e/ou * modificá-lo sob os termos de Licença Pública Geral GNU, conforme * publicada pela Free Software Foundation; versão 2 da * Licença. * Este programa é distribuído na expectativa de ser útil, mas SEM * QUALQUER GARANTIA; sem mesmo a garantia implícita de * COMERCIALIZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM * PARTICULAR. Consulte a Licença Pública Geral GNU para obter mais * detalhes. * Você deve ter recebido uma cópia da Licença Pública Geral GNU * junto com este programa; se não, escreva para Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307, USA. */ package gcom.faturamento.bean; import gcom.faturamento.conta.ContaHistorico; import gcom.util.Util; import java.math.BigDecimal; import java.util.Date; /** * [CRC:1710] - Botões de imprimir nas abas de Consultar Imovel.<br/><br/> * * Classe que servirá para exibir os dados dos Debitos Automáticos * no RelatorioDadosComplementaresImovel. * OBS: Pode ser utilizada por qualquer outro relatorio tambem de modo * que não mude o que já existe. * * @author Marlon Patrick * @since 23/09/2009 */ public class ContaHistoricoRelatoriosHelper { public ContaHistoricoRelatoriosHelper() { } public ContaHistoricoRelatoriosHelper(ContaHistorico c) { this.contaHistorico = c; } private ContaHistorico contaHistorico; public ContaHistorico getContaHistorico() { return contaHistorico; } public void setContaHistorico(ContaHistorico c) { this.contaHistorico = c; } public String getAnoMesReferenciaContabil(){ if(this.contaHistorico!=null){ return Util.formatarMesAnoReferencia(this.contaHistorico.getAnoMesReferenciaContabil()); } return ""; } public Date getDataVencimentoConta(){ if(this.contaHistorico!=null){ return this.contaHistorico.getDataVencimentoConta(); } return null; } public BigDecimal getValorAgua(){ if(this.contaHistorico!=null){ return this.contaHistorico.getValorAgua(); } return null; } public BigDecimal getValorEsgoto(){ if(this.contaHistorico!=null){ return this.contaHistorico.getValorEsgoto(); } return null; } public BigDecimal getValorDebitos(){ if(this.contaHistorico!=null){ return this.contaHistorico.getValorDebitos(); } return null; } public BigDecimal getValorCreditos(){ if(this.contaHistorico!=null){ return this.contaHistorico.getValorCreditos(); } return null; } public BigDecimal getValorImposto(){ if(this.contaHistorico!=null){ return this.contaHistorico.getValorImposto(); } return null; } public BigDecimal getValorTotal(){ if(this.contaHistorico!=null){ return this.contaHistorico.getValorTotal(); } return null; } public String getDescricaoAbreviadaCreditoSituacaoAtual(){ if(this.contaHistorico!=null && this.contaHistorico.getDebitoCreditoSituacaoAtual()!=null){ return this.contaHistorico.getDebitoCreditoSituacaoAtual().getDescricaoAbreviada(); } return ""; } }
[ "felipesantos2089@gmail.com" ]
felipesantos2089@gmail.com
bcccadfb9a6a4a12f5c8656d0abe35cdc910259d
260ffca605956d7cb9490a8c33e2fe856e5c97bf
/src/com/google/android/gms/games/multiplayer/turnbased/TurnBasedMultiplayer$LoadMatchResult.java
e92f060d30d4293b92dc52f782eb6c19f4b36599
[]
no_license
yazid2016/com.incorporateapps.fakegps.fre
cf7f1802fcc6608ff9a1b82b73a17675d8068beb
44856c804cea36982fcc61d039a46761a8103787
refs/heads/master
2021-06-02T23:32:09.654199
2016-07-21T03:28:48
2016-07-21T03:28:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
429
java
package com.google.android.gms.games.multiplayer.turnbased; import com.google.android.gms.common.api.Result; public abstract interface TurnBasedMultiplayer$LoadMatchResult extends Result { public abstract TurnBasedMatch getMatch(); } /* Location: * Qualified Name: com.google.android.gms.games.multiplayer.turnbased.TurnBasedMultiplayer.LoadMatchResult * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
e6ff5a2995c61ac32dfd6dffad045770bd7e3faa
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/yauaa/learning/3743/TestUserAgentAnalysisMapperRaw.java
5d7e99197ce2f94c6b84067c88e1cbefff8a7e33
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,754
java
/* * Yet Another UserAgent Analyzer * Copyright (C) 2013-2018 Niels Basjes * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package nl.basjes.parse.useragent.flink; import nl.basjes.parse.useragent.analyze.InvalidParserConfigurationException; import nl.basjes.parse.useragent.annotate.YauaaField; import org.junit.Test; import static org.junit.Assert.assertEquals; public class TestUserAgentAnalysisMapperRaw { public static class TestMapper extends UserAgentAnalysisMapper<TestRecord> { @Override public String getUserAgentString(TestRecord record) { return record.useragent; } @YauaaField("DeviceClass") public void setDeviceClass(TestRecord record, String value) { record.deviceClass = value; } @YauaaField("AgentNameVersion") public void setAgentNameVersion(TestRecord record, String value) { record.agentNameVersion = value; } } @Test public void testUserAgentParser() { TestMapper mapper = new TestMapper(); mapper.open(null); TestRecord record = new TestRecord("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) " + "Chrome/48.0.2564.82 Safari/537.36"); record = mapper.map(record); assertEquals( new TestRecord( "Mozilla/5.0 (X11; Linux x86_64) " + "AppleWebKit/537.36 (KHTML, like Gecko) " + "Chrome/48.0.2564.82 Safari/537.36", "Desktop", "Chrome 48.0.2564.82", null), record); } public static class TestImpossibleFieldMapper extends UserAgentAnalysisMapper<TestRecord> { @Override public String getUserAgentString(TestRecord record) { return record.useragent; } @YauaaField("NielsBasjes") public void setImpossibleField(TestRecord record, String value) { record.agentNameVersion = value; } } @Test(expected = InvalidParserConfigurationException.class) public void testImpossibleField() { TestImpossibleFieldMapper mapper = new TestImpossibleFieldMapper(); mapper.open(null); } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
08b7b91f28447918d80a3feb888b25d6f7a43cd4
af9ee81e94a599c0f0a5146c8839363a833f258b
/src/main/java/q21/Solution.java
f5a6de44931d1023998ff2fb113e4150ad78c94f
[ "MIT" ]
permissive
jiangyuwise/leetcode
26b11aff9b3d99a23b5cf9bd6f7f2e75249c04f2
8322ad14eb36499c54adefb1d0905e6d85b085d0
refs/heads/master
2020-12-09T14:25:16.607489
2020-09-25T13:01:04
2020-09-25T13:01:04
233,332,890
0
0
null
null
null
null
UTF-8
Java
false
false
914
java
package q21; import util.ListNode; /** * 合并 2 个链表 * @author admin * @date 2020/8/23 14:35 */ public class Solution { public ListNode merge(ListNode l1, ListNode l2) { ListNode head = new ListNode(0), node = head, p1 = l1, p2 = l2; while (p1 != null || p2 != null) { if (p1 != null && p2 != null) { if (p1.val <= p2.val) { head.next = new ListNode(p1.val); p1 = p1.next; } else { head.next = new ListNode(p2.val); p2 = p2.next; } } else if (p1 != null) { head.next = new ListNode(p1.val); p1 = p1.next; } else { head.next = new ListNode(p2.val); p2 = p2.next; } head = head.next; } return node.next; } }
[ "jiangyuwise@gmail.com" ]
jiangyuwise@gmail.com
1fdb55e42ddde1f449a6d5fa3a21f757f97a6da0
58a8ed34f613c281a5faaaefe5da1788f5739d17
/Application_code_source/eMybaby/sources/com/tuya/sdk/timer/bean/DpTimerListBean.java
b017fce4c330566eedb95e51e0c9bbfc08992b5f
[]
no_license
wagnerwave/Dossier_Hacking_de_peluche
01c78629e52a94ed6a208e11ff7fcd268e10956e
514f81b1e72d88e2b8835126b2151e368dcad7fb
refs/heads/main
2023-03-31T13:28:06.247243
2021-03-25T23:03:38
2021-03-25T23:03:38
351,597,654
5
1
null
null
null
null
UTF-8
Java
false
false
575
java
package com.tuya.sdk.timer.bean; import java.util.ArrayList; public class DpTimerListBean { public CategoryStatusBean category; public ArrayList<GroupTimerBean> groups; public CategoryStatusBean getCategory() { return this.category; } public ArrayList<GroupTimerBean> getGroups() { return this.groups; } public void setCategory(CategoryStatusBean categoryStatusBean) { this.category = categoryStatusBean; } public void setGroups(ArrayList<GroupTimerBean> arrayList) { this.groups = arrayList; } }
[ "alexandre1.wagner@epitech.eu" ]
alexandre1.wagner@epitech.eu
c459fcb96f563ffbb5a93004ae6cbc0d6943b7ab
ff77098c5077fe6b6102779b01b1b779b653fe9a
/Algorithm/Level1/Tile.java
de9891465b473525637116c27001e6d4715994d4
[]
no_license
wjdrbs96/Programmers
9b3d0a683b8cc86e8f242b8a90880530162d569a
554d0f6be50ee7f3293f39bfa397531662f15459
refs/heads/master
2022-05-07T20:38:06.102608
2022-03-17T13:51:53
2022-03-17T13:51:53
237,273,836
5
3
null
null
null
null
UTF-8
Java
false
false
427
java
package Programmers.Algorithm.Level1; public class Tile { public static long solution(int N) { long[] list = new long[N]; list[0] = 1; list[1] = 1; for (int i = 2; i < N; ++i) { list[i] = list[i - 1] + list[i - 2]; } return 4 * list[N - 1] + 2 * list[N - 2]; } public static void main(String[] args) { System.out.println(solution(7)); } }
[ "wjdrbs966@naver.com" ]
wjdrbs966@naver.com
d191ad393491f4c9aaa26fc0b454ab9aa2ef0db4
5c52ad5c2dbccc649fe27cb3749b3e12d9ad70a3
/src/main/java/com/zea7ot/lc/lvl4/lc0688/SolutionApproach1DFSMemo.java
92bb8ac2f433bb06c0777af792f666d0f655d13f
[]
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
1,248
java
/** * https://leetcode.com/problems/knight-probability-in-chessboard/ * * Time Complexity: O() * Space Complexity: O() * * References: * https://leetcode.com/problems/knight-probability-in-chessboard/discuss/206720/Share-My-Intuitive-Recursive-Java-Solution */ package com.zea7ot.lc.lvl4.lc0688; import java.util.HashMap; import java.util.Map; public class SolutionApproach1DFSMemo { private static int[][] DIRS = new int[][]{{1, 2}, {2, 1}, {2, -1}, {1, -2}, {-1, -2}, {-2, -1}, {-2, 1}, {-1, 2}}; public double knightProbability(int N, int K, int r, int c) { Map<String, Double> memo = new HashMap<String, Double>(); return dfs(r, c, K, N, memo); } private double dfs(int row, int col, int K, int N, Map<String, Double> memo){ if(row < 0 || row >= N || col < 0 || col >= N || K < 0) return 0; if(K == 0) return 1; String key = K + "," + row + "," + col; if(memo.containsKey(key)) return memo.get(key); double res = 0; for(final int[] DIR : DIRS){ int r = row + DIR[0], c = col + DIR[1]; res += dfs(r, c, K - 1, N, memo); } memo.put(key, res / 8.0); return res / 8.0; } }
[ "yanglyu.leon.7@gmail.com" ]
yanglyu.leon.7@gmail.com
13678383233e9c2d5c108c00edd00054d9f85c2f
8d8776f923e7cc844196f4c70c21a337e5f5552e
/shared/src/main/java/se/spaced/shared/model/xmo/ExtendedMeshObject.java
664fdbc96807c0893f931b1e734046b3d5d5ffef
[]
no_license
FearlessGames/spaced
7853599f11258daf62a72ba4c8f40ef8c88beb85
27690cd19867c5b9b64186a1e9a26bd813497c87
refs/heads/master
2020-04-25T04:28:54.189030
2017-09-08T21:10:58
2017-09-08T21:10:58
172,511,474
0
0
null
null
null
null
UTF-8
Java
false
false
1,469
java
package se.spaced.shared.model.xmo; import com.ardor3d.math.Quaternion; import com.ardor3d.math.Vector3; public class ExtendedMeshObject { private String colladaFile; private String textureFile; private String physicsFile; private String xmoMaterialFile; private Vector3 position = new Vector3(); private Quaternion rotation = new Quaternion(); private Vector3 scale = new Vector3(1, 1, 1); public String getPhysicsFile() { return physicsFile; } public void setPhysicsFile(String physicsFile) { this.physicsFile = physicsFile; } public String getTextureFile() { return textureFile; } public void setTextureFile(String textureFile) { this.textureFile = textureFile; } public String getXmoMaterialFile() { return xmoMaterialFile; } public void setXmoMaterialFile(String xmoMaterialFile) { this.xmoMaterialFile = xmoMaterialFile; } public String getColladaFile() { return colladaFile; } public void setColladaFile(String colladaFile) { this.colladaFile = colladaFile; } public Vector3 getPosition() { return position; } public void setPosition(Vector3 position) { this.position = position; } public Quaternion getRotation() { return rotation; } public void setRotation(Quaternion rotation) { this.rotation = rotation; } public Vector3 getScale() { return scale; } public void setScale(Vector3 scale) { this.scale = scale; } @Override public String toString() { return colladaFile; } }
[ "per.malmen@gmail.com" ]
per.malmen@gmail.com
af93850827c60e650ade8475e0e5e5657ae36136
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/14/14_717dd04d9e9f8de7ec88e5e2a622c9c4ddfabb3d/BlackListPolicy/14_717dd04d9e9f8de7ec88e5e2a622c9c4ddfabb3d_BlackListPolicy_s.java
f7d8fba9998d2b1f724eb6be5f4d890ad3fe3724
[]
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
4,044
java
/******************************************************************************* * Copyright (c) 2006-2010 eBay 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 * *******************************************************************************/ package org.ebayopensource.turmeric.rateLimiterproviderImpl.Policy; import java.util.List; import org.ebayopensource.turmeric.security.v1.services.IsRateLimitedRequest; import org.ebayopensource.turmeric.security.v1.services.IsRateLimitedResponse; import org.ebayopensource.turmeric.security.v1.services.Policy; import org.ebayopensource.turmeric.security.v1.services.RateLimiterStatus; import org.ebayopensource.turmeric.security.v1.services.Subject; import org.ebayopensource.turmeric.security.v1.services.SubjectGroup; import org.ebayopensource.turmeric.services.ratelimiterservice.impl.RateLimiterException; /** * This class is used to. * * @author dcarver */ public class BlackListPolicy extends AbstractPolicy { private static List<Policy> blacklistPolicy; /** * Instantiates a new black list policy. * * @param rlRequest the rl request */ public BlackListPolicy(IsRateLimitedRequest rlRequest) { super(rlRequest); } /* (non-Javadoc) * @see org.ebayopensource.turmeric.rateLimiterproviderImpl.Policy.AbstractPolicy#isExcluded() */ @Override public boolean isExcluded() { return false; } /* (non-Javadoc) * @see org.ebayopensource.turmeric.rateLimiterproviderImpl.Policy.AbstractPolicy#isIncluded() */ @Override public boolean isIncluded() { return false; } /* (non-Javadoc) * @see org.ebayopensource.turmeric.rateLimiterproviderImpl.Policy.AbstractPolicy#isEmpty() */ @Override public boolean isEmpty() { return blacklistPolicy == null || blacklistPolicy.isEmpty(); } /* (non-Javadoc) * @see org.ebayopensource.turmeric.rateLimiterproviderImpl.Policy.AbstractPolicy#getPolicyType() */ @Override public String getPolicyType() { return "BLACKLIST"; } // check list against BlackList /** * Check black list. * * @param response the response * @param request the request * @param subjects the subjects * @param domain the domain * @return the checks if is rate limited response * @throws RateLimiterException the rate limiter exception */ public IsRateLimitedResponse checkBlackList(IsRateLimitedResponse response, IsRateLimitedRequest request, List<String> subjects, List<String> domain) throws RateLimiterException { blacklistPolicy = getPolicies(); if(blacklistPolicy!=null && !blacklistPolicy.isEmpty()) { for (Policy p : blacklistPolicy) { if (isPolicySubjectGroupValid(p)) { // check SubjectGroup for (SubjectGroup subjectGroup : p.getTarget().getSubjects() .getSubjectGroup()) { if (domain.contains(subjectGroup.getSubjectGroupName() .trim())) { response.setStatus(RateLimiterStatus.BLOCK); return response; } } // check subject for (Subject wl : p.getTarget().getSubjects().getSubject()) { if (subjects.contains(wl.getSubjectName().trim())) { response.setStatus(RateLimiterStatus.BLOCK); return response; } } } } } return response; } /* (non-Javadoc) * @see org.ebayopensource.turmeric.rateLimiterproviderImpl.Policy.AbstractPolicy#evaluate(org.ebayopensource.turmeric.security.v1.services.IsRateLimitedResponse, org.ebayopensource.turmeric.security.v1.services.IsRateLimitedRequest) */ @Override public IsRateLimitedResponse evaluate(IsRateLimitedResponse response, IsRateLimitedRequest rlRequest) throws RateLimiterException { return checkBlackList(response, rlRequest, super.requestSubjects, super.requestSubjectGroups); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
677b2c70b0093ffea4ad3984688714d685244bd6
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/11/11_91453733174e92ef378fd3582412efab1e5060ae/Issue/11_91453733174e92ef378fd3582412efab1e5060ae_Issue_s.java
90936fc76396136625901aff9c61de2d87171987
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,336
java
package com.ripple.core.types; import java.math.BigDecimal; /** * Represents a currency/issuer pair */ public class Issue { public static final Issue XRP = fromString("XRP"); Currency currency; AccountID issuer; public Issue(Currency currency, AccountID issuer) { this.currency = currency; this.issuer = issuer; } public static Issue fromString(String pair) { String[] split = pair.split("/"); return getIssue(split); } public static Issue getIssue(String[] split) { if (split.length == 2) { return new Issue(Currency.fromString(split[0]), AccountID.fromString(split[1])); } else if (split[0].equals("XRP")) { return new Issue(Currency.XRP, AccountID.ZERO); } else { throw new RuntimeException("Issue string must be XRP or $currency/$issuer"); } } public Currency currency() { return currency; } public AccountID issuer() { return issuer; } public Amount amount(BigDecimal value) { return new Amount(value, currency, issuer, this == XRP); } public Amount amount(Number value) { return new Amount(BigDecimal.valueOf(value.longValue()), currency, issuer, this == XRP); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
a3ef6f3082e4ce8af9d3dfbea812aa9ceafadb02
b280a34244a58fddd7e76bddb13bc25c83215010
/scmv6/center-batch/src/main/java/com/smate/center/batch/dao/pub/pubtopubsimple/PubToPubSimpleErrorLogDao.java
2275577b929ae38c1bec4ce3f84305af30791443
[]
no_license
hzr958/myProjects
910d7b7473c33ef2754d79e67ced0245e987f522
d2e8f61b7b99a92ffe19209fcda3c2db37315422
refs/heads/master
2022-12-24T16:43:21.527071
2019-08-16T01:46:18
2019-08-16T01:46:18
202,512,072
2
3
null
2022-12-16T05:31:05
2019-08-15T09:21:04
Java
UTF-8
Java
false
false
354
java
package com.smate.center.batch.dao.pub.pubtopubsimple; import org.springframework.stereotype.Repository; import com.smate.center.batch.model.pub.pubtopubsimple.PubToPubSimpleErrorLog; import com.smate.core.base.utils.data.SnsHibernateDao; @Repository public class PubToPubSimpleErrorLogDao extends SnsHibernateDao<PubToPubSimpleErrorLog, Long> { }
[ "zhiranhe@irissz.com" ]
zhiranhe@irissz.com
9d95caea1ac33b60026456d614a9c055bc9e544e
c164d8f1a6068b871372bae8262609fd279d774c
/src/main/java/edu/uiowa/slis/VIVOISF/Event/EventRO_0002234Type.java
f7a1588e4e1e73586acc25abd6ab4756b3eda0be
[ "Apache-2.0" ]
permissive
eichmann/VIVOISF
ad0a299df177d303ec851ff2453cbcbd7cae1ef8
e80cd8b74915974fac7ebae8e5e7be8615355262
refs/heads/master
2020-03-19T03:44:27.662527
2018-06-03T22:44:58
2018-06-03T22:44:58
135,757,275
0
1
null
null
null
null
UTF-8
Java
false
false
942
java
package edu.uiowa.slis.VIVOISF.Event; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspTagException; @SuppressWarnings("serial") public class EventRO_0002234Type extends edu.uiowa.slis.VIVOISF.TagLibSupport { static EventRO_0002234Type currentInstance = null; private static final Log log = LogFactory.getLog(EventRO_0002234Type.class); // object property public int doStartTag() throws JspException { try { EventRO_0002234Iterator theEventRO_0002234Iterator = (EventRO_0002234Iterator)findAncestorWithClass(this, EventRO_0002234Iterator.class); pageContext.getOut().print(theEventRO_0002234Iterator.getType()); } catch (Exception e) { log.error("Can't find enclosing Event for RO_0002234 tag ", e); throw new JspTagException("Error: Can't find enclosing Event for RO_0002234 tag "); } return SKIP_BODY; } }
[ "david-eichmann@uiowa.edu" ]
david-eichmann@uiowa.edu
d6ce05b9317e20849549ee0ee58f1086db604d47
071a9fa7cfee0d1bf784f6591cd8d07c6b2a2495
/corpus/class/sling/3869.java
42bc5dfb227d8536477d679ba77c2484164e62a4
[ "MIT" ]
permissive
masud-technope/ACER-Replication-Package-ASE2017
41a7603117f01382e7e16f2f6ae899e6ff3ad6bb
cb7318a729eb1403004d451a164c851af2d81f7a
refs/heads/master
2021-06-21T02:19:43.602864
2021-02-13T20:44:09
2021-02-13T20:44:09
187,748,164
0
0
null
null
null
null
UTF-8
Java
false
false
3,784
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.sling.resourceresolver.impl; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import org.apache.sling.api.resource.LoginException; import org.apache.sling.api.resource.Resource; import org.junit.Before; import org.junit.Test; /** Verify what happens when ResourceDecorator returns null */ public class ResourceDecoratorReturnsNullTest extends ResourceDecoratorTestBase { private Set<String> pathsThatReturnNull = new HashSet<String>(); /** Return null for resources that have a path in pathsThatReturnNull. * Will cause our test ResourceDecorator to return null for these resources */ protected Resource wrapResourceForTest(Resource r) { return isReturnNull(r) ? null : r; } private boolean isReturnNull(Resource r) { return pathsThatReturnNull.contains(r.getPath()); } private void assertResources(Iterator<Resource> it, String... paths) { assertNotNull("Expecting non-null Iterator", it); final List<String> actual = new ArrayList<String>(); while (it.hasNext()) { final Resource r = it.next(); assertNotNull("Expecting no null Resources in iterator", r); actual.add(r.getPath()); } for (String path : paths) { assertTrue("Expecting path " + path + " in " + actual, actual.contains(path)); } if (actual.size() != paths.length) { fail("Expecting the same number of items in " + Arrays.asList(paths) + " and " + actual); } } @Before public void setup() throws LoginException { super.setup(); pathsThatReturnNull.add("/tmp/D"); pathsThatReturnNull.add("/var/two"); } @Test public void testResolveNotNull() { assertExistent(resolver.resolve("/tmp/A"), true); } public void testGetNotNull() { assertExistent(resolver.getResource("/tmp/A"), true); } @Test public void testGetNull() { assertExistent(resolver.getResource("/tmp/D"), true); } @Test public void testResolveNull() { assertExistent(resolver.resolve("/tmp/D"), true); } @Test public void testRootChildren() { final Resource root = resolver.resolve("/"); assertNotNull(root); assertResources(resolver.listChildren(root), "/tmp", "/var"); } @Test public void testVarChildren() { final Resource var = resolver.resolve("/var"); assertNotNull(var); assertResources(resolver.listChildren(var), "/var/one", "/var/two", "/var/three"); } @Test public void testFind() { assertResources(resolver.findResources("foo", QUERY_LANGUAGE), "/tmp/C", "/tmp/D", "/var/one", "/var/two"); } }
[ "masudcseku@gmail.com" ]
masudcseku@gmail.com
0517ee141c8ab81bdd57d714ac3f0b219d3d5d44
1af49694004c6fbc31deada5618dae37255ce978
/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabProperties.java
09f4ada3994367d4c15dc85a035c1cb75e18d517
[ "BSD-3-Clause" ]
permissive
sadrulhc/chromium
59682b173a00269ed036eee5ebfa317ba3a770cc
a4b950c23db47a0fdd63549cccf9ac8acd8e2c41
refs/heads/master
2023-02-02T07:59:20.295144
2020-12-01T21:32:32
2020-12-01T21:32:32
317,678,056
3
0
BSD-3-Clause
2020-12-01T21:56:26
2020-12-01T21:56:25
null
UTF-8
Java
false
false
6,511
java
// Copyright 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.tasks.tab_management; import static org.chromium.chrome.browser.tasks.tab_management.TabListModel.CardProperties.CARD_ALPHA; import static org.chromium.chrome.browser.tasks.tab_management.TabListModel.CardProperties.CARD_TYPE; import android.content.res.ColorStateList; import android.graphics.drawable.Drawable; import android.view.View.AccessibilityDelegate; import androidx.annotation.IntDef; import org.chromium.components.browser_ui.widget.selectable_list.SelectionDelegate; import org.chromium.ui.modelutil.PropertyKey; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModel.WritableBooleanPropertyKey; import org.chromium.ui.modelutil.PropertyModel.WritableObjectPropertyKey; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** * List of properties to designate information about a single tab. */ public class TabProperties { /** IDs for possible types of UI in the tab list. */ @IntDef({UiType.SELECTABLE, UiType.CLOSABLE, UiType.STRIP, UiType.MESSAGE, UiType.DIVIDER, UiType.NEW_TAB_TILE}) @Retention(RetentionPolicy.SOURCE) public @interface UiType { int SELECTABLE = 0; int CLOSABLE = 1; int STRIP = 2; int MESSAGE = 3; int DIVIDER = 4; int NEW_TAB_TILE = 5; } public static final PropertyModel.WritableIntPropertyKey TAB_ID = new PropertyModel.WritableIntPropertyKey(); public static final WritableObjectPropertyKey<TabListMediator.TabActionListener> TAB_SELECTED_LISTENER = new WritableObjectPropertyKey<>(); public static final WritableObjectPropertyKey<TabListMediator.TabActionListener> TAB_CLOSED_LISTENER = new WritableObjectPropertyKey<>(); public static final WritableObjectPropertyKey<Drawable> FAVICON = new WritableObjectPropertyKey<>(); public static final WritableObjectPropertyKey<TabListMediator.ThumbnailFetcher> THUMBNAIL_FETCHER = new WritableObjectPropertyKey<>(true); public static final WritableObjectPropertyKey<TabListMediator.IphProvider> IPH_PROVIDER = new WritableObjectPropertyKey<>(); public static final WritableObjectPropertyKey<String> TITLE = new WritableObjectPropertyKey<>(); public static final WritableBooleanPropertyKey IS_SELECTED = new WritableBooleanPropertyKey(); public static final WritableObjectPropertyKey<ColorStateList> CHECKED_DRAWABLE_STATE_LIST = new WritableObjectPropertyKey<>(); public static final WritableObjectPropertyKey<TabListMediator.TabActionListener> CREATE_GROUP_LISTENER = new WritableObjectPropertyKey<>(); public static final PropertyModel.WritableIntPropertyKey CARD_ANIMATION_STATUS = new PropertyModel.WritableIntPropertyKey(); public static final PropertyModel.WritableObjectPropertyKey<TabListMediator.TabActionListener> SELECTABLE_TAB_CLICKED_LISTENER = new PropertyModel.WritableObjectPropertyKey<>(); public static final WritableObjectPropertyKey<SelectionDelegate<Integer>> TAB_SELECTION_DELEGATE = new WritableObjectPropertyKey<>(); public static final PropertyModel.ReadableBooleanPropertyKey IS_INCOGNITO = new PropertyModel.ReadableBooleanPropertyKey(); public static final PropertyModel.ReadableIntPropertyKey SELECTED_TAB_BACKGROUND_DRAWABLE_ID = new PropertyModel.ReadableIntPropertyKey(); public static final PropertyModel.ReadableIntPropertyKey TABSTRIP_FAVICON_BACKGROUND_COLOR_ID = new PropertyModel.ReadableIntPropertyKey(); public static final PropertyModel .WritableObjectPropertyKey<ColorStateList> SELECTABLE_TAB_ACTION_BUTTON_BACKGROUND = new PropertyModel.WritableObjectPropertyKey<>(); public static final PropertyModel.WritableObjectPropertyKey<ColorStateList> SELECTABLE_TAB_ACTION_BUTTON_SELECTED_BACKGROUND = new PropertyModel.WritableObjectPropertyKey<>(); public static final WritableObjectPropertyKey<String> URL_DOMAIN = new WritableObjectPropertyKey<>(); public static final PropertyModel .WritableObjectPropertyKey<AccessibilityDelegate> ACCESSIBILITY_DELEGATE = new PropertyModel.WritableObjectPropertyKey<>(); public static final WritableObjectPropertyKey<String> SEARCH_QUERY = new WritableObjectPropertyKey<>(); public static final WritableObjectPropertyKey<TabListMediator.ShoppingPersistedTabDataFetcher> SHOPPING_PERSISTED_TAB_DATA_FETCHER = new WritableObjectPropertyKey<>(true); public static final WritableObjectPropertyKey<TabListMediator.TabActionListener> PAGE_INFO_LISTENER = new WritableObjectPropertyKey<>(); public static final PropertyModel.WritableIntPropertyKey PAGE_INFO_ICON_DRAWABLE_ID = new PropertyModel.WritableIntPropertyKey(); public static final WritableObjectPropertyKey<String> CONTENT_DESCRIPTION_STRING = new WritableObjectPropertyKey<>(); public static final WritableObjectPropertyKey<String> CLOSE_BUTTON_DESCRIPTION_STRING = new WritableObjectPropertyKey<>(); public static final PropertyKey[] ALL_KEYS_TAB_GRID = new PropertyKey[] {TAB_ID, TAB_SELECTED_LISTENER, TAB_CLOSED_LISTENER, FAVICON, THUMBNAIL_FETCHER, IPH_PROVIDER, TITLE, IS_SELECTED, CHECKED_DRAWABLE_STATE_LIST, CREATE_GROUP_LISTENER, CARD_ALPHA, CARD_ANIMATION_STATUS, SELECTABLE_TAB_CLICKED_LISTENER, TAB_SELECTION_DELEGATE, IS_INCOGNITO, SELECTED_TAB_BACKGROUND_DRAWABLE_ID, TABSTRIP_FAVICON_BACKGROUND_COLOR_ID, SELECTABLE_TAB_ACTION_BUTTON_BACKGROUND, SELECTABLE_TAB_ACTION_BUTTON_SELECTED_BACKGROUND, URL_DOMAIN, ACCESSIBILITY_DELEGATE, SEARCH_QUERY, PAGE_INFO_LISTENER, PAGE_INFO_ICON_DRAWABLE_ID, CARD_TYPE, CONTENT_DESCRIPTION_STRING, CLOSE_BUTTON_DESCRIPTION_STRING, SHOPPING_PERSISTED_TAB_DATA_FETCHER}; public static final PropertyKey[] ALL_KEYS_TAB_STRIP = new PropertyKey[] {TAB_ID, TAB_SELECTED_LISTENER, TAB_CLOSED_LISTENER, FAVICON, IS_SELECTED, TITLE, TABSTRIP_FAVICON_BACKGROUND_COLOR_ID, IS_INCOGNITO}; }
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
dcc17cc0102d46dbdf4bf7a45d904729b84413ad
a3fb882d24eee1e1ce264e8067e7e6001c1584b5
/SortingDemo/src/com/keyur/action/EmployeeAction.java
0951736a0228b460e0b7a52802c568650eba718b
[]
no_license
keyur2714/CoreJava_FullStack-WebStack
683b96ae1045cd09d3e60394519a05b718b3080b
47149fe4a28a96bcacf04f29009b0d4e5ce60b15
refs/heads/master
2022-12-22T19:25:40.676810
2019-10-05T10:30:34
2019-10-05T10:30:34
147,930,629
1
0
null
2022-12-15T23:24:43
2018-09-08T12:17:13
Java
UTF-8
Java
false
false
3,856
java
package com.keyur.action; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; import com.keyur.dto.EmployeeDTO; import com.keyur.util.EmployeeComparator; import com.keyur.util.NameComparator; public class EmployeeAction { public static void main(String[] args) { List<EmployeeDTO> empList = getEmployeeList(); Map<String,List<EmployeeDTO>> deptEmployeeMap = new HashMap<>(); List<EmployeeDTO> tempList = new ArrayList<EmployeeDTO>(); for(EmployeeDTO employeeDTO : empList) { if(deptEmployeeMap.containsKey(employeeDTO.getDepartment())) { deptEmployeeMap.get(employeeDTO.getDepartment()).add(employeeDTO); }else { tempList.add(employeeDTO); deptEmployeeMap.put(employeeDTO.getDepartment(), tempList); tempList = new ArrayList<EmployeeDTO>(); } } for(Map.Entry<String, List<EmployeeDTO>> entry : deptEmployeeMap.entrySet()) { System.out.println(entry.getKey()+" "+entry.getValue().size()); } Iterator<EmployeeDTO> empListIterator = empList.iterator(); System.out.println("...Before Sorting...!"); while(empListIterator.hasNext()) { System.out.println(empListIterator.next()); } System.out.println("After Sorting with Comparable...!"); Collections.sort(empList); displayEmplList(empList); System.out.println("After Sorting with Name Comparator...!"); NameComparator nameComparator = new NameComparator(); nameComparator.setOrder("DESC"); Collections.sort(empList, nameComparator); displayEmplList(empList); System.out.println("After Sorting with Employee Comparator on salary field...!"); EmployeeComparator employeeComparator = new EmployeeComparator(); employeeComparator.setOrder("DESC"); employeeComparator.setFieldName("salary"); Collections.sort(empList, employeeComparator); displayEmplList(empList); System.out.println("After Sorting with Employee Comparator on Designation field...!"); EmployeeComparator employeeDComparator = new EmployeeComparator(); employeeDComparator.setOrder("DESC"); employeeDComparator.setFieldName("designation"); Set<EmployeeDTO> hasSet = new HashSet<>(empList); Collections.sort(empList, employeeDComparator); SortedSet<EmployeeDTO> sortedSet = new TreeSet<>(empList); //sortedSet.addAll(hasSet); System.out.println(empList.size()); System.out.println(sortedSet.size()); for (EmployeeDTO employeeDTO : hasSet) { System.out.println(employeeDTO); } } private static void displayEmplList(List<EmployeeDTO> empList) { for(EmployeeDTO employeeDTO : empList) { System.out.println(employeeDTO); } } static List<EmployeeDTO> getEmployeeList(){ EmployeeDTO employeeDTO1 = new EmployeeDTO(); employeeDTO1.setEmpId(26); employeeDTO1.setName("denish"); employeeDTO1.setDepartment("IT"); employeeDTO1.setDesignation("Tech Lead"); employeeDTO1.setSalary(11111); EmployeeDTO employeeDTO2 = new EmployeeDTO(); employeeDTO2.setEmpId(44); employeeDTO2.setName("vinit"); employeeDTO2.setDepartment("Sales"); employeeDTO2.setDesignation("Sales Executive"); employeeDTO2.setSalary(22111); EmployeeDTO employeeDTO3 = new EmployeeDTO(); employeeDTO3.setEmpId(27); employeeDTO3.setName("darsh"); employeeDTO3.setDepartment("IT"); employeeDTO3.setDesignation("Tech Lead"); employeeDTO3.setSalary(13111); List<EmployeeDTO> empList = new ArrayList<>(); empList.add(employeeDTO1); empList.add(employeeDTO2); empList.add(employeeDTO3); return empList; } }
[ "keyur.555kn@gmail.com" ]
keyur.555kn@gmail.com
9a9a724b57d9659521e843703f3d6b70e752396f
4e121bfe9778e3accb5c076ca0e57ae939b6b60e
/geoportal/src/com/esri/gpt/catalog/discovery/DiscoveryException.java
9541e5e76d49bcac706dd2919cb31ca949df32c1
[ "Apache-2.0", "BSD-3-Clause", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-unicode", "LGPL-2.0-or-later", "CDDL-1.0", "ICU", "CC-BY-SA-3.0", "MIT", "LicenseRef-scancode-unknown-license-reference", "JSON", "NAIST-2003", "CPL-1.0" ]
permissive
Esri/geoportal-server
79a126cb1808325426ad2ae66466e84459cf4794
29a1c66ebfbcd8f44247fa73b96fed50f52aada1
refs/heads/master
2023-08-22T17:20:42.269458
2023-06-15T18:50:36
2023-06-15T18:50:36
5,485,573
191
89
Apache-2.0
2023-04-16T22:49:39
2012-08-20T19:15:11
C#
UTF-8
Java
false
false
1,368
java
/* See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * Esri Inc. 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.esri.gpt.catalog.discovery; import com.esri.gpt.framework.context.ApplicationException; /** * A discovery related exception. */ public class DiscoveryException extends ApplicationException { /** constructors ============================================================ */ /** * Construct based upon an error message. * @param msg the error message */ public DiscoveryException(String msg) { super(msg); } /** * Construct based upon an error message and a cause. * @param msg the error message * @param cause the cause */ public DiscoveryException(String msg, Throwable cause) { super(msg,cause); } }
[ "mhogeweg@esri.com" ]
mhogeweg@esri.com
83cd74b47661271eea6ccc5249a56a2ed368f1e0
ec7cdb58fa20e255c23bc855738d842ee573858f
/java/defpackage/ws$k.java
cdc74ecb4e302e80ddbf8c1659f6836084e8f1f7
[]
no_license
BeCandid/JaDX
591e0abee58764b0f58d1883de9324bf43b52c56
9a3fa0e7c14a35bc528d0b019f850b190a054c3f
refs/heads/master
2021-01-13T11:23:00.068480
2016-12-24T10:39:48
2016-12-24T10:39:48
77,222,067
1
0
null
null
null
null
UTF-8
Java
false
false
1,127
java
package defpackage; import android.os.Bundle; import com.facebook.AccessToken; import com.facebook.FacebookRequestError; import com.facebook.GraphRequest; import com.facebook.HttpMethod; import com.facebook.LoggingBehavior; import com.facebook.share.widget.LikeView.ObjectType; /* compiled from: LikeActionController */ class ws$k extends ws$a { String e; final /* synthetic */ ws f; ws$k(ws wsVar, String objectId, ObjectType objectType) { this.f = wsVar; super(wsVar, objectId, objectType); Bundle likeRequestParams = new Bundle(); likeRequestParams.putString("object", objectId); a(new GraphRequest(AccessToken.a(), "me/og.likes", likeRequestParams, HttpMethod.POST)); } protected void a(uo response) { this.e = we.a(response.b(), "id"); } protected void a(FacebookRequestError error) { if (error.b() == 3501) { this.c = null; return; } vx.a(LoggingBehavior.REQUESTS, ws.a, "Error liking object '%s' with type '%s' : %s", this.a, this.b, error); this.f.a("publish_like", error); } }
[ "admin@timo.de.vc" ]
admin@timo.de.vc
ba87f84b0d68f1193f86554c3c1a419be4d7446e
388b3d03d0b5ac22c5898cf3ba62b6cf1380c3ff
/src/main/java/com/vizaco/onlinecontrol/dao/jpa/JpaPeriodDaoImpl.java
5a5069184909e664e6266dbac6edfe5dcff81118
[]
no_license
ivartanian/onlinecontrol
f9825d4951eea21177f76ed7ec68f8b4ab930021
e6ba9aef8d6a8464fca17493bc7713c8372fd4b4
refs/heads/master
2021-01-19T13:30:08.194429
2015-08-21T15:04:11
2015-08-21T15:04:11
29,292,053
0
3
null
null
null
null
UTF-8
Java
false
false
1,847
java
//package com.vizaco.onlinecontrol.dao.jpa; // //import com.vizaco.onlinecontrol.dao.PeriodDao; //import com.vizaco.onlinecontrol.dao.TeacherDao; //import com.vizaco.onlinecontrol.model.Period; //import com.vizaco.onlinecontrol.model.Teacher; //import com.vizaco.onlinecontrol.model.User; //import org.springframework.stereotype.Repository; // //import javax.persistence.EntityManager; //import javax.persistence.PersistenceContext; //import javax.persistence.Query; //import java.util.List; // //@Repository //public class JpaPeriodDaoImpl implements PeriodDao { // // @PersistenceContext // private EntityManager em; // // public JpaPeriodDaoImpl() { // } // // public JpaPeriodDaoImpl(EntityManager em) { // this.em = em; // } // // @Override // public Period findById(Integer id) { // Query query = this.em.createQuery("SELECT DISTINCT period FROM Period period WHERE period.id =:id"); // query.setParameter("id", id); // // List resultList = query.getResultList(); // if (resultList.isEmpty()) { // return null; // handle no-results case // } else { // return (Period)resultList.get(0); // } // } // // @Override // public List<Period> getAllPeriods() { // Query query = this.em.createQuery("SELECT DISTINCT period FROM Period period"); // return query.getResultList(); // } // // @Override // public void save(Period period) { // // if (period == null){ // return; // } // // if (period.getId() == null) { // this.em.persist(period); // } // else { // this.em.merge(period); // } // } // // @Override // public void delete(Period period) { // if (period == null){ // return; // } // this.em.remove(period); // } // //}
[ "igor.vartanian@gmail.com" ]
igor.vartanian@gmail.com
c55abab9dd66b19a826baa163b8384b9158c5778
0daf722feb3f801895e028e6d3389c91339c2d6d
/GingaJEmulator/src/net/beiker/xletview/net/OutputServerThread.java
99182b8fc98d9de25ca6c0b5a094ab2033a1557b
[]
no_license
manoelnetom/IDTVSimulator
1a781883b7456c1462e1eb5282f3019ef3ef934a
3f6c31c01ef10ed87f06b9e1e88f853cfedcbcd1
refs/heads/master
2021-01-10T20:56:13.096038
2014-09-16T17:52:03
2014-09-16T17:52:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,704
java
/* * */ package net.beiker.xletview.net; import java.io.DataInputStream; import java.io.EOFException; import java.io.IOException; import java.net.Socket; import net.beiker.cake.Log; import net.beiker.cake.Logger; /** * * @author Martin Sveden */ public class OutputServerThread extends Thread{ /** Debugging facility. */ private final static Logger logger = Log.getLogger(OutputServerThread.class); // The Server that spawned us private OutputServer server; // The Socket connected to our client private Socket socket; // Constructor. public OutputServerThread( OutputServer server, Socket socket ) { // Save the parameters this.server = server; this.socket = socket; // Start up the thread start(); } // This runs in a separate thread when start() is called in the // constructor. public void run() { try { // Create a DataInputStream for communication; the client // is using a DataOutputStream to write to us DataInputStream din = new DataInputStream( this.socket.getInputStream() ); // Over and over, forever ... while (true) { // ... read the next message ... String message = din.readUTF(); // ... tell the world ... logger.debug( "Sending "+message ); // ... and have the server send it to all clients this.server.sendToAll( message ); } } catch( EOFException ie ) { // This doesn't need an error message } catch( IOException ie ) { // This does; tell the world! ie.printStackTrace(); } finally { // The connection is closed for one reason or another, // so have the server dealing with it this.server.removeConnection( this.socket ); } } }
[ "MANOELNETOM@GMAIL.COM" ]
MANOELNETOM@GMAIL.COM
1e67bcc3448081bd7f773f39e93804fc433f2dff
66c766517e47b855af27641ed1334e1e3576922b
/car-server/web/CarEye/src/com/careye/servlet/DeptTree.java
b0647130e581d710a9ef5874e7ce3ca65fe849c4
[]
no_license
vincenlee/Car-eye-server
21a6c2eda0fd3f096c842fdae6eea4c5af84d22e
47f45a0596fddf65cda6fb7cf657aa716244e5b5
refs/heads/master
2022-05-04T22:09:50.411646
2018-09-28T08:03:03
2018-09-28T08:03:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,730
java
package com.careye.servlet; import java.io.IOException; import java.io.PrintWriter; import java.net.URLDecoder; import java.util.Collections; import java.util.Iterator; import java.util.List; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import com.careye.base.action.TreeDomain; import com.careye.common.domain.EntityTreeUtil; import com.careye.common.domain.MenuTree; import com.careye.common.service.MenuTreeService; import com.careye.component.springhelper.BeanLocator; import com.careye.constant.WebConstants; import com.careye.system.domain.Bloc; import com.careye.system.domain.BlocUser; import com.careye.system.domain.UserCar; import com.careye.utils.DateUtil; public class DeptTree extends HttpServlet { private MenuTreeService menuTreeService; private List<MenuTree> menuList; private String menutree; /** * Constructor of the object. */ public DeptTree() { super(); } /** * Destruction of the servlet. <br> */ public void destroy() { super.destroy(); // Just puts "destroy" string in log // Put your code here } public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request,response); } @SuppressWarnings("unchecked") public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.reset();// 清空输出流 response.setContentType("text/html"); response.setCharacterEncoding("utf-8"); try{ HttpSession session = request.getSession(true); String type = request.getParameter("type"); String blocname = request.getParameter("bloc_name"); //部门名称 BlocUser user = (BlocUser)session.getAttribute(WebConstants.LOGIN_USER); if(user == null){ return; }else{ menuTreeService = (MenuTreeService)BeanLocator.getInstance().getBean("menuTreeService"); Integer userid = user.getId(); Integer deptid = user.getParentid(); if(user.getLoginname().equals("admin")){ //超级管理员取出全部 deptid = 0; userid = null; } if((type != null && type.equals("200"))){ Bloc orgazicationBloc = new Bloc(); if(blocname !=null && !blocname.equals("null")&& !blocname.equals("undefined")){ orgazicationBloc.setBlocname(URLDecoder.decode(blocname, "UTF-8")); } orgazicationBloc.setUserid(userid); menuList = menuTreeService.deptTreeList(orgazicationBloc); if(blocname !=null && !blocname.equals("null")&& menuList.size()>0){ deptid = Integer.parseInt(menuList.get(0).getParentId()); } }else{ menuList = menuTreeService.deptTreeList(null); deptid = 0; } Iterator<MenuTree> ite=menuList.iterator(); while(ite.hasNext()){ MenuTree m=ite.next(); m.setLeaf(false); m.setExpanded(true); } menutree = EntityTreeUtil.getTreeJsonString(menuList,2,deptid); if(type == null || "200".equals(type)){ //把选择框去掉 menutree = menutree.replaceAll(",\"checked\":false",""); } PrintWriter out = response.getWriter(); out.println(menutree); out.flush(); out.close(); } }catch(Exception e){ PrintWriter out = response.getWriter(); out.println("[{text: '系统加载错误,请重试。。。', id:1,expanded: true}]"); out.flush(); out.close(); e.printStackTrace(); } } /** * Initialization of the servlet. <br> * * @throws ServletException if an error occurs */ public void init() throws ServletException { // Put your code here } }
[ "dengtieshan@shenghong-technology.com" ]
dengtieshan@shenghong-technology.com
2d7a9516965022edf0eb1fbce365cee6ab84c78b
3907166d1edee80d4c2f55ea0990f8450874db24
/src/com/yoxi/hudongtui/model/content/ContactUs.java
755648abee07f379bd7c9dd3aa0cbe5c12206480
[]
no_license
yhguojunjie/youhui
7c0e25ea5c572efdf946d2393f3ad68ceb4624d5
a4a6ccccc50d436ac74198ddbf1bba091b93ff71
refs/heads/master
2021-01-23T08:56:20.178897
2015-08-25T14:38:25
2015-08-25T14:38:25
39,307,420
1
4
null
null
null
null
UTF-8
Java
false
false
3,275
java
package com.yoxi.hudongtui.model.content; /** * * 联系我们 * * @author wql * * @Date 2015年3月19日 * */ public class ContactUs implements java.io.Serializable { private static final long serialVersionUID = 4834196621750510343L; /**id*/ private java.lang.Integer id; /**客服电话*/ private java.lang.String content; /**代理商id*/ private java.lang.Integer agentId; /**提交时间*/ private java.util.Date applyTime; /**0 未审核,1审核通过*/ private java.lang.String auditState; /**审核时间*/ private java.util.Date auditTime; /**审核人*/ private java.lang.Integer auditUserId; /**0 未启用,1启用*/ private java.lang.String status; /** *方法: 取得java.lang.Integer *@return: java.lang.Integer id */ public java.lang.Integer getId(){ return this.id; } /** *方法: 设置java.lang.Integer *@param: java.lang.Integer id */ public void setId(java.lang.Integer id){ this.id = id; } /** *方法: 取得java.lang.Integer *@return: java.lang.Integer 代理商id */ public java.lang.Integer getAgentId(){ return this.agentId; } /** *方法: 设置java.lang.Integer *@param: java.lang.Integer 代理商id */ public void setAgentId(java.lang.Integer agentId){ this.agentId = agentId; } /** *方法: 取得java.util.Date *@return: java.util.Date 提交时间 */ public java.util.Date getApplyTime(){ return this.applyTime; } /** *方法: 设置java.util.Date *@param: java.util.Date 提交时间 */ public void setApplyTime(java.util.Date applyTime){ this.applyTime = applyTime; } /** *方法: 取得java.lang.String *@return: java.lang.String 0 未审核,1审核通过 */ public java.lang.String getAuditState(){ return this.auditState; } /** *方法: 设置java.lang.String *@param: java.lang.String 0 未审核,1审核通过 */ public void setAuditState(java.lang.String auditState){ this.auditState = auditState; } /** *方法: 取得java.util.Date *@return: java.util.Date 审核时间 */ public java.util.Date getAuditTime(){ return this.auditTime; } /** *方法: 设置java.util.Date *@param: java.util.Date 审核时间 */ public void setAuditTime(java.util.Date auditTime){ this.auditTime = auditTime; } /** *方法: 取得java.lang.Integer *@return: java.lang.Integer 审核人 */ public java.lang.Integer getAuditUserId(){ return this.auditUserId; } /** *方法: 设置java.lang.Integer *@param: java.lang.Integer 审核人 */ public void setAuditUserId(java.lang.Integer auditUserId){ this.auditUserId = auditUserId; } /** *方法: 取得java.lang.String *@return: java.lang.String 0 未启用,1启用 */ public java.lang.String getStatus(){ return this.status; } /** *方法: 设置java.lang.String *@param: java.lang.String 0 未启用,1启用 */ public void setStatus(java.lang.String status){ this.status = status; } public java.lang.String getContent() { return content; } public void setContent(java.lang.String content) { this.content = content; } }
[ "395239537@qq.com" ]
395239537@qq.com
ae9d8bbbc308a2f117e59e14288b7bb17848b278
90eb7a131e5b3dc79e2d1e1baeed171684ef6a22
/sources/p298d/p299a/p300a/p301a/p303y0/p390h/C7180n.java
9f5fc040060fc7f645ae66bf1cb56d109d30b06d
[]
no_license
shalviraj/greenlens
1c6608dca75ec204e85fba3171995628d2ee8961
fe9f9b5a3ef4a18f91e12d3925e09745c51bf081
refs/heads/main
2023-04-20T13:50:14.619773
2021-04-26T15:45:11
2021-04-26T15:45:11
361,799,768
0
0
null
null
null
null
UTF-8
Java
false
false
168
java
package p298d.p299a.p300a.p301a.p303y0.p390h; /* renamed from: d.a.a.a.y0.h.n */ public enum C7180n { RENDER_OVERRIDE, RENDER_OPEN, RENDER_OPEN_OVERRIDE }
[ "73280944+shalviraj@users.noreply.github.com" ]
73280944+shalviraj@users.noreply.github.com
7d395b70a7c47a8070793cdfc72c0bb293511140
26f58561cda045395a1ae980b0ad7499cb719ec2
/src/hasor-jetty/src/main/java/org/eclipse/jetty/rewrite/handler/ForwardedSchemeHeaderRule.java
11b3bc26d63797df2c7004cb4c07c7960eec072e
[]
no_license
simplechen/hasor
5338037bb4e4553df4c78dc13b118b70da779a47
438fe8caa378aa0d6835121d06a5cf5b77c4e11d
refs/heads/master
2021-01-16T22:24:41.395124
2014-07-04T11:59:07
2014-07-04T11:59:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,846
java
// // ======================================================================== // Copyright (c) 1995-2013 Mort Bay Consulting Pty. Ltd. // ------------------------------------------------------------------------ // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // and Apache License v2.0 which accompanies this distribution. // // The Eclipse Public License is available at // http://www.eclipse.org/legal/epl-v10.html // // The Apache License v2.0 is available at // http://www.opensource.org/licenses/apache2.0.php // // You may elect to redistribute this code under either of these licenses. // ======================================================================== // package org.eclipse.jetty.rewrite.handler; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.eclipse.jetty.server.Request; /** * Set the scheme for the request * * * */ public class ForwardedSchemeHeaderRule extends HeaderRule { private String _scheme="https"; /* ------------------------------------------------------------ */ public String getScheme() { return _scheme; } /* ------------------------------------------------------------ */ /** * @param scheme the scheme to set on the request. Defaults to "https" */ public void setScheme(String scheme) { _scheme = scheme; } /* ------------------------------------------------------------ */ protected String apply(String target, String value, HttpServletRequest request, HttpServletResponse response) { ((Request) request).setScheme(_scheme); return target; } }
[ "zyc@byshell.org" ]
zyc@byshell.org
ecef9b73a8afcef4bb88a823b5330ca0a55d6092
bbee6724df0c01ac00e309fb8ec28184140f370e
/src/main/java/uz/itcenter/service/mapper/StudentMapper.java
e30e745f52784b5ba718218b512684483bbe2ddf
[]
no_license
Muminniyoz/bazaitc
a786b6b9c5795dc347f0bf4738c62aa705dc3fc6
214931f645ac32664ed9dfbafb8cebfc3556b5ff
refs/heads/main
2023-03-22T15:31:24.918387
2021-02-27T10:16:49
2021-02-27T10:16:49
342,826,967
0
0
null
2021-02-27T10:16:49
2021-02-27T10:15:18
Java
UTF-8
Java
false
false
765
java
package uz.itcenter.service.mapper; import uz.itcenter.domain.*; import uz.itcenter.service.dto.StudentDTO; import org.mapstruct.*; /** * Mapper for the entity {@link Student} and its DTO {@link StudentDTO}. */ @Mapper(componentModel = "spring", uses = {UserMapper.class}) public interface StudentMapper extends EntityMapper<StudentDTO, Student> { @Mapping(source = "modifiedBy.id", target = "modifiedById") StudentDTO toDto(Student student); @Mapping(source = "modifiedById", target = "modifiedBy") Student toEntity(StudentDTO studentDTO); default Student fromId(Long id) { if (id == null) { return null; } Student student = new Student(); student.setId(id); return student; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
4d91d15ca302bd0eb1174edbc0568657b446df89
b658499f1eb5ac71ae21d61e19b848db42fc0c77
/parallel-asynchronous-using-java/src/main/java/com/learnjava/parallelstreams/ParallelStreamPerformance.java
a1cbeb6ab251a40054d77b0eacdbf38c903521d0
[]
no_license
vsushko/java-projects
0a5611c0e6d9911957b373e3d985bf3e157cd904
647469ba541653373ade0e2b0a6808f24cc2333b
refs/heads/master
2023-08-31T08:17:49.268277
2023-08-30T13:34:39
2023-08-30T13:34:39
150,632,629
0
0
null
2022-06-21T04:23:11
2018-09-27T18:43:15
Java
UTF-8
Java
false
false
1,413
java
package com.learnjava.parallelstreams; import java.util.List; import java.util.stream.IntStream; import java.util.stream.Stream; import static com.learnjava.util.CommonUtil.startTimer; import static com.learnjava.util.CommonUtil.timeTaken; /** * @author vsushko */ public class ParallelStreamPerformance { public int sum_using_intstream(int count, boolean isParallel) { startTimer(); IntStream intStream = IntStream.rangeClosed(0, count); if (isParallel) { intStream.parallel(); } int sum = intStream.sum(); timeTaken(); return sum; } public int sum_using_list(List<Integer> inputList, boolean isParallel) { startTimer(); Stream<Integer> inputStream = inputList.stream(); if (isParallel) { inputStream.parallel(); } int sum = inputStream .mapToInt(Integer::intValue) // unboxing .sum(); timeTaken(); return sum; } public int sum_using_iterate(int n, boolean isParallel) { startTimer(); Stream<Integer> integerStream = Stream.iterate(0, i -> i + 1); if (isParallel) integerStream.parallel(); int sum = integerStream .limit(n + 1) // includes the end value too .reduce(0, Integer::sum); timeTaken(); return sum; } }
[ "vasiliy.sushko@gmail.com" ]
vasiliy.sushko@gmail.com
289fa340901d90421314403e4b6bb4d5a7c0c434
c81dd37adb032fb057d194b5383af7aa99f79c6a
/java/com/facebook/ads/redexgen/X/C0728St.java
584e6326fcb74c52ed7d6cbc2b3e8e86655ba256
[]
no_license
hongnam207/pi-network-source
1415a955e37fe58ca42098967f0b3307ab0dc785
17dc583f08f461d4dfbbc74beb98331bf7f9e5e3
refs/heads/main
2023-03-30T07:49:35.920796
2021-03-28T06:56:24
2021-03-28T06:56:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
471
java
package com.facebook.ads.redexgen.X; /* renamed from: com.facebook.ads.redexgen.X.St reason: case insensitive filesystem */ public class C0728St extends KP { public final /* synthetic */ C0731Sw A00; public C0728St(C0731Sw sw) { this.A00 = sw; } @Override // com.facebook.ads.redexgen.X.KP public final void A04() { if (this.A00.A01.A07() != null) { this.A00.A01.A07().onAdLoaded(this.A00.A01.A08()); } } }
[ "nganht2@vng.com.vn" ]
nganht2@vng.com.vn
ba774fcce27c338c84424b25d34eeca2ada0a2ec
f562357eee1204b4237b6bb9501ec7003dd88304
/SpringMVC/helloMVC/src/service/CustomerService.java
a73beff46bfc8ae1e3887920d2245218bf4e9a58
[]
no_license
Junghun0/Server
48626a6a47c9a5dc090ba7987a9ca0a4b468c9b0
b515f86fbf1546cfae2a31204cb55be2c91a3487
refs/heads/master
2021-07-04T01:04:11.000735
2017-09-28T12:13:12
2017-09-28T12:13:12
99,683,432
0
0
null
null
null
null
UTF-8
Java
false
false
1,073
java
package service; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import model.Customer; public class CustomerService { private Map<String, Customer> customerMap; public CustomerService(){ customerMap = new HashMap<String, Customer>(); addCustomer(new Customer("id001","alice","alice.hansung.ac.kr")); addCustomer(new Customer("id002","bob","bob.hansung.ac.kr")); addCustomer(new Customer("id003","charlie","charlie.hansung.ac.kr")); addCustomer(new Customer("id004","david","david.hansung.ac.kr")); addCustomer(new Customer("id005","trudy","trudy.hansung.ac.kr")); } private void addCustomer(Customer customer) { // TODO Auto-generated method stub customerMap.put(customer.getId(), customer); } public Customer findCustomer(String id){ if(id !=null) return (customerMap.get(id.toLowerCase())); else return null; } public List<Customer> getAllcustomers(){ List<Customer> customerList = new ArrayList<Customer>(customerMap.values()); return customerList; } }
[ "go9018@naver.com" ]
go9018@naver.com
e5eee48b7549dda386535b56718d854b270e3edc
125c28aac7c3882070de0e5a636fb37134930002
/manager/jam-services/src/main/java/org/yes/cart/service/vo/VoCustomerService.java
d90344db63dc9eb9d75275866bef1bcc5b482f07
[ "Apache-2.0" ]
permissive
hacklock/yes-cart
870480e4241cc0ee7611690cbe57901407c6dc59
cf2ef25f5e2db0bdcdc396415b3b23d97373185b
refs/heads/master
2020-12-01T01:05:35.891105
2019-12-24T18:19:25
2019-12-24T18:19:25
230,528,192
1
0
Apache-2.0
2019-12-27T22:42:23
2019-12-27T22:42:22
null
UTF-8
Java
false
false
2,905
java
/* * Copyright 2009 - 2016 Denys Pavlov, Igor Azarnyi * * 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.yes.cart.service.vo; import org.yes.cart.domain.misc.MutablePair; import org.yes.cart.domain.vo.*; import java.util.List; /** * User: denispavlov */ public interface VoCustomerService { /** * Get all customers in the system, filtered by criteria and according to rights, up to max * * @return list of customers * * @throws Exception errors */ VoSearchResult<VoCustomerInfo> getFilteredCustomers(VoSearchContext filter) throws Exception; /** * Get customer by id. * * @param id customer id * * @return customer vo * * @throws Exception errors */ VoCustomer getCustomerById(long id) throws Exception; /** * Update given customer. * * @param vo customer to update * * @return updated instance * * @throws Exception errors */ VoCustomer updateCustomer(VoCustomer vo) throws Exception; /** * Create new customer * * @param vo given instance to persist * * @return persisted instance * * @throws Exception errors */ VoCustomer createCustomer(VoCustomer vo) throws Exception; /** * Remove customer by id. * * @param id customer id * * @throws Exception errors */ void removeCustomer(long id) throws Exception; /** * Get supported attributes by given customer * * @param customerId given customer id * * @return attributes * * @throws Exception errors */ List<VoAttrValueCustomer> getCustomerAttributes(long customerId) throws Exception; /** * Update the customer attributes. * * @param vo customer attributes to update, boolean indicates if this attribute is to be removed (true) or not (false) * * @return customer attributes. * * @throws Exception errors */ List<VoAttrValueCustomer> updateCustomerAttributes(List<MutablePair<VoAttrValueCustomer, Boolean>> vo) throws Exception; /** * Reset password to given vo. * * @param customerId customerId * * @param shopId shopId * * @throws Exception errors */ void resetPassword(long customerId, long shopId) throws Exception; }
[ "denis.v.pavlov@gmail.com" ]
denis.v.pavlov@gmail.com
2e9ddd10a6e453d41bccc8de16689ec68dcfba77
d26f11c1611b299e169e6a027f551a3deeecb534
/core/databinding/org/fdesigner/databinding/observable/set/AbstractObservableSet.java
b75a03ddf66ed3454fb30303a3baaa7e743b62ac
[]
no_license
WeControlTheFuture/fdesigner-ui
1bc401fd71a57985544220b9f9e42cf18db6491d
62efb51e57e5d7f25654e67ef8b2762311b766b6
refs/heads/master
2020-11-24T15:00:24.450846
2019-12-27T08:47:23
2019-12-27T08:47:23
228,199,674
0
0
null
null
null
null
UTF-8
Java
false
false
5,351
java
/******************************************************************************* * Copyright (c) 2006, 2015 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 * * Contributors: * IBM Corporation - initial API and implementation * Matthew Hall - bug 208332, 194734 * Stefan Xenos <sxenos@gmail.com> - Bug 335792 * Stefan Xenos <sxenos@gmail.com> - Bug 474065 *******************************************************************************/ package org.fdesigner.databinding.observable.set; import java.util.Collection; import java.util.Iterator; import java.util.Set; import org.fdesigner.databinding.observable.AbstractObservable; import org.fdesigner.databinding.observable.ObservableTracker; import org.fdesigner.databinding.observable.Realm; /** * * Abstract implementation of {@link IObservableSet}. * * <p> * This class is thread safe. All state accessing methods must be invoked from * the {@link Realm#isCurrent() current realm}. Methods for adding and removing * listeners may be invoked from any thread. * </p> * * @param <E> * the type of the elements in this set * * @since 1.0 */ public abstract class AbstractObservableSet<E> extends AbstractObservable implements IObservableSet<E> { private boolean stale = false; protected AbstractObservableSet() { this(Realm.getDefault()); } @Override protected void firstListenerAdded() { super.firstListenerAdded(); } @Override protected void lastListenerRemoved() { super.lastListenerRemoved(); } protected AbstractObservableSet(Realm realm) { super(realm); } @Override public synchronized void addSetChangeListener( ISetChangeListener<? super E> listener) { addListener(SetChangeEvent.TYPE, listener); } @Override public synchronized void removeSetChangeListener( ISetChangeListener<? super E> listener) { removeListener(SetChangeEvent.TYPE, listener); } protected abstract Set<E> getWrappedSet(); protected void fireSetChange(SetDiff<E> diff) { // fire general change event first super.fireChange(); fireEvent(new SetChangeEvent<>(this, diff)); } @Override public boolean contains(Object o) { getterCalled(); return getWrappedSet().contains(o); } @Override public boolean containsAll(Collection<?> c) { getterCalled(); return getWrappedSet().containsAll(c); } @Override public boolean equals(Object o) { getterCalled(); return getWrappedSet().equals(o); } @Override public int hashCode() { getterCalled(); return getWrappedSet().hashCode(); } @Override public boolean isEmpty() { getterCalled(); return getWrappedSet().isEmpty(); } @Override public Iterator<E> iterator() { getterCalled(); final Iterator<E> wrappedIterator = getWrappedSet().iterator(); return new Iterator<E>() { @Override public void remove() { throw new UnsupportedOperationException(); } @Override public boolean hasNext() { ObservableTracker.getterCalled(AbstractObservableSet.this); return wrappedIterator.hasNext(); } @Override public E next() { ObservableTracker.getterCalled(AbstractObservableSet.this); return wrappedIterator.next(); } }; } @Override public int size() { getterCalled(); return getWrappedSet().size(); } @Override public Object[] toArray() { getterCalled(); return getWrappedSet().toArray(); } @Override public <T> T[] toArray(T[] a) { getterCalled(); return getWrappedSet().toArray(a); } @Override public String toString() { getterCalled(); return getWrappedSet().toString(); } protected void getterCalled() { ObservableTracker.getterCalled(this); } @Override public boolean add(E o) { throw new UnsupportedOperationException(); } @Override public boolean addAll(Collection<? extends E> c) { throw new UnsupportedOperationException(); } @Override public boolean remove(Object o) { throw new UnsupportedOperationException(); } @Override public boolean removeAll(Collection<?> c) { throw new UnsupportedOperationException(); } @Override public boolean retainAll(Collection<?> c) { throw new UnsupportedOperationException(); } @Override public void clear() { throw new UnsupportedOperationException(); } /** * @return Returns the stale state. */ @Override public boolean isStale() { getterCalled(); return stale; } /** * @param stale * The stale state to set. This will fire a stale event if the * given boolean is true and this observable set was not already * stale. */ public void setStale(boolean stale) { checkRealm(); boolean wasStale = this.stale; this.stale = stale; if (!wasStale && stale) { fireStale(); } } @Override protected void fireChange() { throw new RuntimeException( "fireChange should not be called, use fireSetChange() instead"); //$NON-NLS-1$ } }
[ "491676539@qq.com" ]
491676539@qq.com
9de43c93f31f25c889516a2de4df4009276afefd
e10d1eaf99711fda9635660ff06b6406774d4bdd
/src/main/java/com/kamesuta/mc/guiwidget/position/FlexiblePosition.java
6bbcf2aee1a033e5b1c16a136e2517b4a1cd99b8
[]
no_license
Team-Fruit/WorldPictures
82f70a38098ce4b87361c8e1b978778048e8826f
a227769ea22cb3bda06a3abcc642fd883ce025f2
refs/heads/master
2021-01-16T23:14:20.802775
2016-05-11T06:38:51
2016-05-11T06:38:51
52,653,210
0
0
null
null
null
null
UTF-8
Java
false
false
2,224
java
package com.kamesuta.mc.guiwidget.position; import java.util.EnumSet; import com.kamesuta.mc.worldpictures.lib.MathHelper; @Deprecated public class FlexiblePosition extends PercentagePosition { private final EnumSet<EnumAbsolute> absolute_value; public FlexiblePosition(final EnumSet<EnumAbsolute> absolute_value, final float per_x, final float per_y, final float per_w, final float per_h) { super(per_x, per_y, per_w, per_h); this.absolute_value = absolute_value; } public FlexiblePosition(final float per_x, final float per_y, final float per_w, final float per_h) { this(EnumSet.noneOf(EnumAbsolute.class), per_x, per_y, per_w, per_h); } @Override public IPositionAbsolute getAbsolute(final IPositionAbsolute parent) { final int pw = parent.x2(); final int ph = parent.y2(); final int px = parent.x1(); final int py = parent.y1(); final int w = getFlexibleW(pw); final int h = getFlexibleH(ph); final int x = getFlexibleX(pw, w, px); final int y = getFlexibleY(ph, h, py); return new PositionAbsolute(x, y, w, h); } protected int getFlexibleW(final int pw) { if (this.absolute_value.contains(EnumAbsolute.ABSOLUTE_W)) { return (int) this.per_w; } else { final double clipped_per_w = MathHelper.clip(this.per_w, 0, 1); return (int) (pw * clipped_per_w); } } protected int getFlexibleH(final int ph) { if (this.absolute_value.contains(EnumAbsolute.ABSOLUTE_H)) { return (int) this.per_h; } else { final double clipped_per_h = MathHelper.clip(this.per_h, 0, 1); return (int) (ph * clipped_per_h); } } protected int getFlexibleX(final int pw, final int w, final int px) { if (this.absolute_value.contains(EnumAbsolute.ABSOLUTE_X)) { return (int) this.per_x; } else { final int max_x = pw - w; return px + (int) (max_x * MathHelper.clip(this.per_x, 0, 1)); } } protected int getFlexibleY(final int ph, final int h, final int py) { if (this.absolute_value.contains(EnumAbsolute.ABSOLUTE_Y)) { return (int) this.per_x; } else { final int max_y = ph - h; return py + (int) (max_y * MathHelper.clip(this.per_y, 0, 1)); } } public static enum EnumAbsolute { ABSOLUTE_X, ABSOLUTE_Y, ABSOLUTE_W, ABSOLUTE_H; } }
[ "kamesuta@gmail.com" ]
kamesuta@gmail.com
27a791a99c47a689c1ac30fc467b107b2bbd037b
fdfc03ad02cf26d4a2bf3d884d1fa880fd4f64ac
/src/StatePattern/state/SoldOutState.java
ffc089ae1c337559e02099483af7da03f58d83db
[]
no_license
benbaosun/DesignPatterns
961c2c6bdec28022b5b52216d263630d3c2e9dfc
2434e381c934adfcc52de8597396b5c1a6b3380b
refs/heads/master
2021-09-23T06:35:02.633534
2018-09-20T15:07:22
2018-09-20T15:07:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
815
java
package StatePattern.state; import StatePattern.GumballMachine; /** * @author lkmc2 * @date 2018/9/3 * @description 售空状态(状态模式) */ public class SoldOutState implements State { private GumballMachine gumballMachine; // 糖果机 public SoldOutState(GumballMachine gumballMachine) { this.gumballMachine = gumballMachine; } @Override public void insertQuarter() { System.out.println("已售空,不能投币"); } @Override public void ejectQuarter() { System.out.println("已售空,无法退币"); } @Override public void turnCrank() { System.out.println("已移动曲柄,但已售空,没有可用糖果"); } @Override public void dispense() { System.out.println("已售空"); } }
[ "lkmc2@163.com" ]
lkmc2@163.com
da0fcbfcfd831a685220cc912b60594ce367c184
e372a380671d013cc02335f07f21a80802f0b080
/src/sunw/hotjava/bean/URLPoolListener.java
d212fdf190a9323393b26c04ed42396ab10103e4
[]
no_license
glegris/HotJava
1b14d99717a76ec481ee5bd6b0db21ceabff4fc6
b8b6d501b5c15da2bb4ffe7a53ac03569e1d5d57
refs/heads/master
2021-12-04T03:25:52.823848
2014-12-19T13:31:32
2014-12-19T13:31:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
426
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) // Source File Name: URLPoolListener.java package sunw.hotjava.bean; // Referenced classes of package sunw.hotjava.bean: // URLPoolEvent public interface URLPoolListener { public abstract void urlPoolChanged(URLPoolEvent urlpoolevent); }
[ "rjolly@users.sourceforge.net" ]
rjolly@users.sourceforge.net
d009a2eb3b45e679f796eb2e011a9044b74a4e37
808c78b46356720a25af84692199e6efcd067fba
/de.hub.citygml.emf.ecore/src/net/opengis/gml/impl/ObliqueCartesianCSTypeImpl.java
f54c87b3b8e5bdaccc90a275cbe69bd906b5b1f1
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
markus1978/citygml4emf
d4cc45107e588a435b1f9ddfdeb17ae77f46e9e7
06fe29a850646043ea0ffb7b1353d28115e16a53
refs/heads/master
2016-09-05T10:14:46.360922
2013-02-11T11:19:06
2013-02-11T11:19:06
8,071,822
1
1
null
null
null
null
UTF-8
Java
false
false
852
java
/** * <copyright> * </copyright> * * $Id$ */ package net.opengis.gml.impl; import net.opengis.gml.GmlPackage; import net.opengis.gml.ObliqueCartesianCSType; import org.eclipse.emf.ecore.EClass; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Oblique Cartesian CS Type</b></em>'. * <!-- end-user-doc --> * <p> * </p> * * @generated */ public class ObliqueCartesianCSTypeImpl extends AbstractCoordinateSystemTypeImpl implements ObliqueCartesianCSType { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ObliqueCartesianCSTypeImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return GmlPackage.eINSTANCE.getObliqueCartesianCSType(); } } //ObliqueCartesianCSTypeImpl
[ "markus.scheidgen@gmail.com" ]
markus.scheidgen@gmail.com
221275be06aa9d2206cde9ebad7a55ecefdfe4c8
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_b6bec4d358611b95a518e6e3dcdf2f4841c8e6e5/jIRCProperties/5_b6bec4d358611b95a518e6e3dcdf2f4841c8e6e5_jIRCProperties_t.java
4aed04094e2598b1bc73008476ce297704497f22
[]
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
4,924
java
package org.hive13.jircbot.support; import java.io.FileInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Properties; public class jIRCProperties { private static jIRCProperties instance = null; private Properties config; private String defaultBotName = "Hive13Bot"; private String defaultBotPass = ""; private String defaultServer = "irc.freenode.net"; private String defaultChannels = "#Hive13_test"; private String parsedChannels[] = null; private String defaultBitlyName = ""; private String defaultBitlyKey = ""; private String defaultJDBCUrl = ""; private String defaultJDBCUser = ""; private String defaultJDBCPass = ""; private String defaultUserAgent = "Googlebot/2.1 (+http://www.googlebot.com/bot.html)"; private String defaultNickServ = "nickserv"; private String defaultOpUserList = ""; private String defaultAdminUserList = ""; private List<String> parsedOpList = null; private List<String> parsedAdminList = null; protected jIRCProperties() { config = new Properties(); try { config.load(new FileInputStream("jIRCBot.properties")); } catch (IOException ex) { System.err.println(ex); } } public synchronized static jIRCProperties getInstance() { if (instance == null) { instance = new jIRCProperties(); } return instance; } public String getProp(String key, String defaultString) { return config.getProperty(key, defaultString); } public String getBotName() { return getProp("nick", defaultBotName); } public String getBotPass() { return getProp("pass", defaultBotPass); } public String getServer() { return getProp("server", defaultServer); } public String[] getChannels() { // Since we only read the properties once, it does not make sense // to repeatedly re-parse the channel string. if(parsedChannels == null) { String channels = getProp("channels", defaultChannels); String splitChannels[] = channels.split(","); for (int i = 0; i < splitChannels.length; i++) { splitChannels[i] = splitChannels[i].trim(); } parsedChannels = splitChannels; } return parsedChannels; } /** Username to use for the bit.ly API */ public String getBitlyName() { return getProp("bitlyName", defaultBitlyName); } /** API key to use for the bit.ly API */ public String getBitlyAPIKey() { return getProp("bitlyAPI", defaultBitlyKey); } /** JDBC URL to use to connect to the database */ public String getJDBCUrl() { return getProp("jdbcURL", defaultJDBCUrl); } /** Username for the MySQL database to connect too */ public String getJDBCUser() { return getProp("jdbcUsername", defaultJDBCUser); } /** Password for the MySQL database user. */ public String getJDBCPass() { return getProp("jdbcPassword", defaultJDBCPass); } /** * When connecting to certain websites, if it thinks the connection is from * a bot it will block the connection. In this case we pretend that we are * the google bot. */ public String getUserAgentString() { return getProp("userAgentString", defaultUserAgent); } /** * It is possible that on different servers different * usernames may be used for the bot that handles * authenticating users. * * However, the bot will still need to follow the * message format used by the bot on the Freenode.net * network. */ public String getNickServUsername() { return getProp("NickServUsername", defaultNickServ); } /** * Find the list of users that are to be authorized. */ public List<String> getOpUserList() { // Since we only read the properties once, it does not make sense // to repeatedly re-parse the channel string. if(parsedOpList == null) { String users = getProp("OpUserList", defaultOpUserList).toLowerCase(); String splitUsers[] = users.split(", ?"); parsedOpList = new ArrayList<String>(Arrays.asList(splitUsers)); } return parsedOpList; } /** * Find the list of users that are to be authorized. */ public List<String> getAdminUserList() { // Since we only read the properties once, it does not make sense // to repeatedly re-parse the channel string. if(parsedAdminList == null) { String users = getProp("AdminUserList", defaultAdminUserList).toLowerCase(); String splitUsers[] = users.split(", ?"); parsedAdminList = new ArrayList<String>(Arrays.asList(splitUsers)); } return parsedAdminList; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
0c87706dd99da7d648d0f1d7a8d80fee1d385224
352ff83c82903b886a426b3a292804dffde5992c
/report-common/src/main/java/zyj/report/common/util/InstantiationTracingBeanPostProcessor.java
079208103a3c0ba546a72a1e22a4c470a338011e
[]
no_license
AlexanderKwong/report-services
669e2bf81f9d2e665b57820beda95ef6086e6e10
d981ab5e2a931b4b1aacf630393a493a3a72a2ce
refs/heads/master
2021-01-13T11:48:38.644193
2017-03-03T10:15:12
2017-03-03T10:15:12
77,681,649
0
1
null
null
null
null
UTF-8
Java
false
false
738
java
package zyj.report.common.util; import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.BeanPostProcessor; public class InstantiationTracingBeanPostProcessor implements BeanPostProcessor { // simply return the instantiated bean as-is public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { return bean; // we could potentially return any object reference here... } //在创建bean后输出bean的信息 public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { System.out.println("Bean '" + beanName + "' created : " + bean.toString()); return bean; } }
[ "601828006@qq.com" ]
601828006@qq.com
1b2877a4f7f43861e6293418820bf18163022641
b9cda73f759b80eac1d37b169c76cc90dba059a9
/src/day31/MethodPractice2.java
cd979890c8e537bdd9e4f2e634b1254e2f51e8c2
[]
no_license
musajojo/Moses_CyberTek
07ce383eb2bad72b9601c71bb47ff9d2bc8c6e49
97d8d423d454fdba6ee0ffa3b5d818a51663d97e
refs/heads/master
2020-11-28T13:59:37.913082
2020-06-15T03:52:02
2020-06-15T03:52:02
229,839,863
1
0
null
null
null
null
UTF-8
Java
false
false
991
java
package day31; public class MethodPractice2 { // write piece of reusable code to count from 1 to 10 // give a name count1to10 : method name // no need for object when being called : static // it should be accessible anywhere in your project : public // it does not return any value : void // does not need any external data when being called : (nothing inside) public static void main(String[] args) { count1to10(); //System.out.println(); count1to10(); // optionally you can call using classname.methodName(); MethodPractice2.count1to10(); } // DOES NOT MATTER WHERE YOU PUT THE METHOD // AS LONG AS IT'S INSIDE THE CLASS { } // AND OUTSIDE ANY OF THE METHOD public static void count1to10() { for (int i = 1; i <= 10; i++) { System.out.print(i + " "); } System.out.println(); } }
[ "58441332+musajojo@users.noreply.github.com" ]
58441332+musajojo@users.noreply.github.com
6eaa333c63674f988c1431247a8106ecede3d1d3
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/13/13_cbcc2bba91268413ca1ed70c15913fe86e7aca6d/LatestBaseTest/13_cbcc2bba91268413ca1ed70c15913fe86e7aca6d_LatestBaseTest_t.java
1267c3ff90eea43945bfe2b8cafc25639132203a
[]
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
4,225
java
/* * Copyright (c) 2005-2009 Grameen Foundation USA * 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. * * See also http://www.apache.org/licenses/LICENSE-2.0.html for an * explanation of the license and how it is applied. */ package org.mifos.framework.persistence; import static org.mifos.framework.persistence.DatabaseVersionPersistence.APPLICATION_VERSION; import java.io.InputStream; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import junit.framework.Assert; import net.sourceforge.mayfly.Database; import net.sourceforge.mayfly.datastore.DataStore; import org.mifos.framework.exceptions.SystemException; import org.mifos.framework.util.helpers.DatabaseSetup; /** * Contains common methods used to test database upgrade scripts on the test * classes that extend this base class. */ public class LatestBaseTest { protected int version(Database database) throws SQLException { return new DatabaseVersionPersistence(database.openConnection()).read(); } /** * Similar to what we get from {@link DatabaseSetup#getStandardStore()} but * without testdbinsertionscript.sql. */ protected void loadRealLatest(Database database) { DatabaseSetup.executeScript(database, "latest-schema.sql"); DatabaseSetup.executeScript(database, "latest-data.sql"); } protected int largestLookupId(Connection connection) throws SQLException { Statement statement = connection.createStatement(); ResultSet results = statement.executeQuery("select max(lookup_id) from LOOKUP_VALUE"); if (!results.next()) { throw new SystemException(SystemException.DEFAULT_KEY, "Did not find an existing lookup_id in lookup_value table"); } int largestLookupId = results.getInt(1); results.close(); statement.close(); return largestLookupId; } protected DataStore upgrade(int fromVersion, DataStore current) throws Exception { for (int currentVersion = fromVersion; currentVersion < APPLICATION_VERSION; ++currentVersion) { int higherVersion = currentVersion + 1; try { current = upgrade(current, higherVersion); } catch (Exception failure) { throw new Exception("Cannot upgrade to " + higherVersion, failure); } } return current; } protected DataStore upgrade(DataStore current, int nextVersion) throws Exception { Database database = new Database(current); DatabaseVersionPersistence persistence = new DatabaseVersionPersistence(database.openConnection()); Upgrade upgrade = persistence.findUpgrade(nextVersion); if (upgrade instanceof SqlUpgrade) assertNoHardcodedValues((SqlUpgrade) upgrade, nextVersion); upgrade.upgrade(database.openConnection(), persistence); return database.dataStore(); } private void assertNoHardcodedValues(SqlUpgrade upgrade, int version) throws Exception { String[] sqlStatements = SqlUpgrade.readFile((InputStream) upgrade.sql().getContent()); for (int i = 0; i < sqlStatements.length; i++) { Assert.assertTrue("Upgrade " + version + " contains hard-coded lookup values", HardcodedValues .checkLookupValue(sqlStatements[i])); Assert.assertTrue("Upgrade " + version + " contains hard-coded lookup value locales", HardcodedValues .checkLookupValueLocale(sqlStatements[i])); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
1e0344a452db0f3a01cc697693f684beac494c7b
3d41b8c6e71be81d9241ae3262148979d5cfd936
/android/app/src/main/java/com/lop_19245/MainActivity.java
a8b35bc0844d9591b2a282c6a308e0bf04e9df60
[]
no_license
crowdbotics-apps/lop-19245
b3f77313021d3c2a3d925b46d6286ab5932922e0
89e83e1b22a61472a649599324730863bf8d4ac7
refs/heads/master
2022-11-29T06:29:35.993521
2020-07-29T20:19:11
2020-07-29T20:19:11
283,594,297
0
0
null
null
null
null
UTF-8
Java
false
false
363
java
package com.lop_19245; import com.facebook.react.ReactActivity; public class MainActivity extends ReactActivity { /** * Returns the name of the main component registered from JavaScript. * This is used to schedule rendering of the component. */ @Override protected String getMainComponentName() { return "lop_19245"; } }
[ "team@crowdbotics.com" ]
team@crowdbotics.com
a7cebb371a5407cadb817418b51f8f97f1e5d2c7
12e3caf617e5140e60caf41f9fdcec15121ec001
/src/jd/plugins/decrypter/CatlyUs.java
57b41bb28989e1833e13ed8fde243fe847b1cf41
[]
no_license
cwchiu/jdownloader-study
b29d8fdd27c6ba83bf82f4257955e066f38cc9c9
3203ec2d92d2b0b3bb1f4b6dfa4897858d6af5dc
refs/heads/master
2021-04-27T22:19:26.912073
2018-02-24T05:52:14
2018-02-24T05:52:14
122,416,653
1
1
null
null
null
null
UTF-8
Java
false
false
8,019
java
//jDownloader - Downloadmanager //Copyright (C) 2015 JD-Team support@jdownloader.org // //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 jd.plugins.decrypter; import java.io.File; import java.util.ArrayList; import org.jdownloader.captcha.v2.challenge.recaptcha.v2.CaptchaHelperCrawlerPluginRecaptchaV2; import org.jdownloader.plugins.components.antiDDoSForDecrypt; import jd.PluginWrapper; import jd.controlling.ProgressController; import jd.http.Browser; import jd.nutils.encoding.Encoding; import jd.parser.Regex; import jd.parser.html.Form; import jd.plugins.CryptedLink; import jd.plugins.DecrypterException; import jd.plugins.DecrypterPlugin; import jd.plugins.DownloadLink; import jd.plugins.components.PluginJSonUtils; import jd.plugins.components.SiteType.SiteTemplate; /** * * Eventually variant of OuoIo, see also fas.li * * @author pspzockerscene * */ @DecrypterPlugin(revision = "$Revision: 38377 $", interfaceVersion = 3, names = { "akorto.eu", "u2s.io", "zlshorte.net", "igram.im", "bit-url.com", "adbilty.me", "linclik.com", "oke.io" }, urls = { "https?://(?:www\\.)?akorto\\.eu/[A-Za-z0-9]{4,}", "https?://(?:www\\.)?u2s\\.io/[A-Za-z0-9]{4,}", "https?://(?:www\\.)?zlshorte\\.net/[A-Za-z0-9]{4,}", "https?://(?:www\\.)?igram\\.im/[A-Za-z0-9]{4,}", "https?://(?:www\\.)?bit\\-url\\.com/[A-Za-z0-9]{4,}", "https?://(?:www\\.)?adbilty\\.me/[A-Za-z0-9]{4,}", "https?://(?:www\\.)?linclik\\.com/[A-Za-z0-9]{4,}", "https?://(?:www\\.)?oke\\.io/[A-Za-z0-9]{4,}" }) public class CatlyUs extends antiDDoSForDecrypt { public CatlyUs(PluginWrapper wrapper) { super(wrapper); } private String parameter = null; private String fuid = null; private String slink = null; public ArrayList<DownloadLink> decryptIt(CryptedLink param, ProgressController progress) throws Exception { final ArrayList<DownloadLink> decryptedLinks = new ArrayList<DownloadLink>(); set(param.toString()); if (slink != null) { decryptedLinks.add(createDownloadlink(Encoding.urlDecode(slink, false))); return decryptedLinks; } else if (fuid == null && slink == null) { // fuid is just a URL owner identifier! slink value is needed, without it you can't get the end URL! decryptedLinks.add(createOfflinelink(parameter)); return decryptedLinks; } parameter = "http://" + Browser.getHost(parameter) + "/" + this.fuid; br.setFollowRedirects(true); getPage(parameter); if (br.getHttpConnection().getResponseCode() == 403 || br.getHttpConnection().getResponseCode() == 404 || !this.br.getURL().contains(fuid)) { decryptedLinks.add(this.createOfflinelink(parameter)); return decryptedLinks; } // form Form form = br.getForm(0); if (form != null) { boolean requiresCaptchaWhichCanFail = false; boolean captcha_failed = true; /* E.g. websites without given captcha_type var: linclik.com */ String captcha_type = this.br.getRegex("app_vars\\[\\'captcha_type\\'\\]\\s*?=\\s*?\\'([^<>\"]+)\\';").getMatch(0); if (captcha_type == null) { captcha_type = "unknown"; } final String solvemediaChallengeKey = br.getRegex("app_vars\\[\\'solvemedia_challenge_key\\'\\]\\s*?=\\s*?\\'([^<>\"\\']+)\\';").getMatch(0); final String reCaptchaSiteKey = br.getRegex("app_vars\\[\\'reCAPTCHA_site_key\\'\\]\\s*?=\\s*?\\'([^<>\"\\']+)\\';").getMatch(0); for (int i = 0; i <= 2; i++) { if (captcha_type.contains("recaptcha") || (solvemediaChallengeKey == null && reCaptchaSiteKey != null)) { /* E.g. 'recaptcha' or 'invisible-recaptcha' */ final String recaptchaV2Response = new CaptchaHelperCrawlerPluginRecaptchaV2(this, br, reCaptchaSiteKey).getToken(); form.put("g-recaptcha-response", Encoding.urlEncode(recaptchaV2Response)); captcha_failed = false; } else if (form.containsHTML("adcopy_response") && solvemediaChallengeKey != null) { /* == captcha_type 'solvemedia' */ requiresCaptchaWhichCanFail = true; final org.jdownloader.captcha.v2.challenge.solvemedia.SolveMedia sm = new org.jdownloader.captcha.v2.challenge.solvemedia.SolveMedia(br); if (solvemediaChallengeKey != null) { sm.setChallengeKey(solvemediaChallengeKey); } File cf = null; cf = sm.downloadCaptcha(getLocalCaptchaFile()); final String code = getCaptchaCode("solvemedia", cf, param); final String chid = sm.getChallenge(code); form.put("adcopy_challenge", chid); form.put("adcopy_response", "manual_challenge"); } else { captcha_failed = false; } br.submitForm(form); /** * TODO: Check if we need this for other language or check if this is language independant and only exists if the captcha * failed: class="banner banner-captcha" OR */ if (requiresCaptchaWhichCanFail && !this.br.containsHTML("The CAPTCHA was incorrect")) { captcha_failed = false; } if (!captcha_failed) { /* Captcha success or we did not have to enter any captcha! */ break; } } if (requiresCaptchaWhichCanFail && captcha_failed) { throw new DecrypterException(DecrypterException.CAPTCHA); } } form = this.br.getForm(0); if (form != null) { /* Usually POST to "[...]/links/go" */ this.br.getHeaders().put("Accept", "application/json, text/javascript, */*; q=0.01"); this.br.getHeaders().put("X-Requested-With", "XMLHttpRequest"); this.br.submitForm(form); } /* E.g. {"status":"success","message":"Go without Earn because anonymous user","url":"http...."} */ final String finallink = getFinalLink(); if (finallink == null || !finallink.startsWith("http")) { return null; } decryptedLinks.add(createDownloadlink(finallink)); return decryptedLinks; } private String getFinalLink() { return PluginJSonUtils.getJsonValue(this.br, "url"); } private void set(final String downloadLink) { parameter = downloadLink; fuid = new Regex(parameter, ".+/([A-Za-z0-9]{4,})$").getMatch(0); slink = new Regex(parameter, "/s/[A-Za-z0-9]{4,}\\?s=((?:http|ftp).+)").getMatch(0); } public boolean hasCaptcha(DownloadLink link, jd.plugins.Account acc) { set(link.getDownloadURL()); if (slink != null) { return false; } return true; } public boolean hasAutoCaptcha() { return false; } @Override public SiteTemplate siteTemplateType() { return SiteTemplate.OuoIoCryptor; } }
[ "sisimi.sidc@gmail.com" ]
sisimi.sidc@gmail.com
35a5306ba9279ecc40d9ea5fa6f330bea3ebec5e
217fb1a510a2a19f4de8157ff78cd7a495547f69
/ecm/ecm-domain/src/main/java/com/camelot/ecm/SalesOrder/TradeOrderQuery.java
e62a68adb9827f3b40603402c31016a251075844
[]
no_license
icai/shushimall
9dc4f7cdb88327d9c5b177158322e8e4b6f7b1cd
86d1a5afc06d1b0565cbafa64e9dd3a534be58b6
refs/heads/master
2022-12-03T14:24:32.631217
2020-08-25T16:00:39
2020-08-25T16:00:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,985
java
package com.camelot.ecm.SalesOrder; import com.camelot.common.ExcelField; import java.math.BigDecimal; import java.util.Date; /** * Created by sevelli on 15-4-10. */ public class TradeOrderQuery { private String num; private String id; private String parentOrderId; private String sellerName; private String buyerName; private String name; private String orderStace; private String buyerPj; private String sellerPj; private String qxflag; //private String shipMentType; private String paymentprice; private String isPayPeriod; private String zflx; private String ordertime; private String address; @ExcelField(title="序号", align=2, sort=10) public String getNum() { return num; } public void setNum(String num) { this.num = num; } @ExcelField(title="订单编号", align=2, sort=20) public String getId() { return id; } public void setId(String id) { this.id = id; } @ExcelField(title="主订单号", align=2, sort=30) public String getParentOrderId() { return parentOrderId; } public void setParentOrderId(String parentOrderId) { this.parentOrderId = parentOrderId; } @ExcelField(title="商家账号", align=2, sort=40) public String getSellerName() { return sellerName; } public void setSellerName(String sellerName) { this.sellerName = sellerName; } @ExcelField(title="买家账号", align=2, sort=50) public String getBuyerName() { return buyerName; } public void setBuyerName(String buyerName) { this.buyerName = buyerName; } @ExcelField(title="收货人", align=2, sort=60) public String getName() { return name; } public void setName(String name) { this.name = name; } @ExcelField(title="订单状态", align=2, sort=70) public String getOrderStace() { return orderStace; } public void setOrderStace(String orderStace) { this.orderStace = orderStace; } @ExcelField(title="买家评价", align=2, sort=80) public String getBuyerPj() { return buyerPj; } public void setBuyerPj(String buyerPj) { this.buyerPj = buyerPj; } @ExcelField(title="卖家评价", align=2, sort=90) public String getSellerPj() { return sellerPj; } public void setSellerPj(String sellerPj) { this.sellerPj = sellerPj; } @ExcelField(title="是否取消", align=2, sort=100) public String getQxflag() { return qxflag; } public void setQxflag(String qxflag) { this.qxflag = qxflag; } /* @ExcelField(title="配送方式", align=2, sort=110) public String getShipMentType() { return shipMentType; } public void setShipMentType(String shipMentType) { this.shipMentType = shipMentType; }*/ @ExcelField(title="订单金额", align=2, sort=120) public String getPaymentprice() { return paymentprice; } @ExcelField(title="支付方式", align=2, sort=120) public String getIsPayPeriod() { return isPayPeriod; } public void setIsPayPeriod(String isPayPeriod) { this.isPayPeriod = isPayPeriod; } public void setPaymentprice(String paymentprice) { this.paymentprice = paymentprice; } @ExcelField(title="付款形式", align=2, sort=130) public String getZflx() { return zflx; } public void setZflx(String zflx) { this.zflx = zflx; } @ExcelField(title="下单时间", align=2, sort=150) public String getOrdertime() { return ordertime; } public void setOrdertime(String ordertime) { this.ordertime = ordertime; } @ExcelField(title="配送地址", align=2, sort=160) public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } }
[ "331563342@qq.com" ]
331563342@qq.com
d55607e1a82481ff1c91343af47e5b7c43511c04
89bc10a52cf2b5037ab032766e947e467fcbc83d
/java/ru/myx/ae3/flow/NulTarget.java
7ce495cf873bcbb1aa38f0434ea9f107df37f83e
[]
no_license
A-E-3/ae3.api
ba49ce8020d7a6a9c60101d78391e25e198dedee
cff284235c2565639ac2ee7b6e5525cd005a1c42
refs/heads/master
2023-02-24T08:03:57.199431
2023-02-22T08:57:56
2023-02-22T08:57:56
138,875,707
0
0
null
null
null
null
UTF-8
Java
false
false
308
java
/** * */ package ru.myx.ae3.flow; final class NulTarget implements ObjectTarget<Object> { @Override public final boolean absorb(final Object object) { return true; } @Override public final Class<?> accepts() { return Object.class; } @Override public final void close() { // ignore } }
[ "myx@myx.co.nz" ]
myx@myx.co.nz
97b24788a55d1725548e805b5c0720679c0305d6
5b2c309c903625b14991568c442eb3a889762c71
/classes/com/snowballfinance/messageplatform/b/b.java
3ac0ae724bb1a813b16fe1903591586791a2f0c2
[]
no_license
iidioter/xueqiu
c71eb4bcc53480770b9abe20c180da693b2d7946
a7d8d7dfbaf9e603f72890cf861ed494099f5a80
refs/heads/master
2020-12-14T23:55:07.246659
2016-10-08T08:56:27
2016-10-08T08:56:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,434
java
package com.snowballfinance.messageplatform.b; import java.net.URISyntaxException; import org.apache.http.client.utils.URIBuilder; public final class b { public static String a(String paramString, int paramInt1, int paramInt2) { int i = 0; if (paramString == null) { return null; } paramString = paramString.split("!"); StringBuilder localStringBuilder = new StringBuilder(); int k = paramString.length; int j = 0; while (i < k) { String str = paramString[i]; if ((j < paramString.length - 1) || (paramString.length == 1)) { localStringBuilder.append(str); } j += 1; i += 1; } localStringBuilder.append("!" + paramInt1 + "x" + paramInt2 + ".png"); return localStringBuilder.toString(); } public static String a(String paramString1, String paramString2) { try { URIBuilder localURIBuilder = new URIBuilder(paramString1); localURIBuilder.setHost(""); localURIBuilder.setScheme(""); paramString2 = paramString2 + localURIBuilder.toString().replace("://", ""); return paramString2; } catch (URISyntaxException paramString2) { paramString2.printStackTrace(); } return paramString1; } } /* Location: E:\apk\xueqiu2\classes-dex2jar.jar!\com\snowballfinance\messageplatform\b\b.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
333676c082836ffe003b68bc26f8d0a6c90df9df
10186b7d128e5e61f6baf491e0947db76b0dadbc
/org/apache/commons/io/input/WindowsLineEndingInputStream.java
11330f548ee235753586d6101092f0045f4ff5c4
[ "SMLNJ", "Apache-1.1", "Apache-2.0", "BSD-2-Clause" ]
permissive
MewX/contendo-viewer-v1.6.3
7aa1021e8290378315a480ede6640fd1ef5fdfd7
69fba3cea4f9a43e48f43148774cfa61b388e7de
refs/heads/main
2022-07-30T04:51:40.637912
2021-03-28T05:06:26
2021-03-28T05:06:26
351,630,911
2
0
Apache-2.0
2021-10-12T22:24:53
2021-03-26T01:53:24
Java
UTF-8
Java
false
false
3,443
java
/* */ package org.apache.commons.io.input; /* */ /* */ import java.io.IOException; /* */ import java.io.InputStream; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class WindowsLineEndingInputStream /* */ extends InputStream /* */ { /* */ private boolean slashRSeen = false; /* */ private boolean slashNSeen = false; /* */ private boolean injectSlashN = false; /* */ private boolean eofSeen = false; /* */ private final InputStream target; /* */ private final boolean ensureLineFeedAtEndOfFile; /* */ /* */ public WindowsLineEndingInputStream(InputStream in, boolean ensureLineFeedAtEndOfFile) { /* 48 */ this.target = in; /* 49 */ this.ensureLineFeedAtEndOfFile = ensureLineFeedAtEndOfFile; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ private int readWithUpdate() throws IOException { /* 58 */ int target = this.target.read(); /* 59 */ this.eofSeen = (target == -1); /* 60 */ if (this.eofSeen) { /* 61 */ return target; /* */ } /* 63 */ this.slashRSeen = (target == 13); /* 64 */ this.slashNSeen = (target == 10); /* 65 */ return target; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ public int read() throws IOException { /* 73 */ if (this.eofSeen) /* 74 */ return eofGame(); /* 75 */ if (this.injectSlashN) { /* 76 */ this.injectSlashN = false; /* 77 */ return 10; /* */ } /* 79 */ boolean prevWasSlashR = this.slashRSeen; /* 80 */ int target = readWithUpdate(); /* 81 */ if (this.eofSeen) { /* 82 */ return eofGame(); /* */ } /* 84 */ if (target == 10 && /* 85 */ !prevWasSlashR) { /* */ /* 87 */ this.injectSlashN = true; /* 88 */ return 13; /* */ } /* */ /* 91 */ return target; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ private int eofGame() { /* 101 */ if (!this.ensureLineFeedAtEndOfFile) { /* 102 */ return -1; /* */ } /* 104 */ if (!this.slashNSeen && !this.slashRSeen) { /* 105 */ this.slashRSeen = true; /* 106 */ return 13; /* */ } /* 108 */ if (!this.slashNSeen) { /* 109 */ this.slashRSeen = false; /* 110 */ this.slashNSeen = true; /* 111 */ return 10; /* */ } /* 113 */ return -1; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public void close() throws IOException { /* 123 */ super.close(); /* 124 */ this.target.close(); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ public synchronized void mark(int readlimit) { /* 132 */ throw new UnsupportedOperationException("Mark not supported"); /* */ } /* */ } /* Location: /mnt/r/ConTenDoViewer.jar!/org/apache/commons/io/input/WindowsLineEndingInputStream.class * Java compiler version: 7 (51.0) * JD-Core Version: 1.1.3 */
[ "xiayuanzhong+gpg2020@gmail.com" ]
xiayuanzhong+gpg2020@gmail.com
c0604e5a6b9d5e018cf5f67ad57af1255a3711c9
2bb648c00b6cbea0e8f10b50dbb05dbf2fcf0ca8
/src/main/java/org/assertj/core/util/diff/DeleteDelta.java
77ef8d32f3b0d690747bd6af12dc2d57548037c2
[ "Apache-2.0" ]
permissive
TommyMeusburger-narvar/assertj-core
a266b1f5dfdb3b297df95f8cef860c618c8eb995
ff1230e0382a3831af3e3699b0a838e3c1a7d4bd
refs/heads/master
2021-07-05T19:19:01.429224
2017-10-02T09:41:08
2017-10-02T09:41:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,023
java
/** * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * * Copyright 2012-2017 the original author or authors. */ package org.assertj.core.util.diff; import java.util.List; /** * Initially copied from https://code.google.com/p/java-diff-utils/. * <p> * Describes the delete-delta between original and revised texts. * * @author <a href="dm.naumenko@gmail.com">Dmitry Naumenko</a> * @param <T> The type of the compared elements in the 'lines'. */ public class DeleteDelta<T> extends Delta<T> { /** * Creates a change delta with the two given chunks. * * @param original * The original chunk. Must not be {@code null}. * @param revised * The original chunk. Must not be {@code null}. */ public DeleteDelta(Chunk<T> original, Chunk<T> revised) { super(original, revised); } /** * {@inheritDoc} * * @throws IllegalStateException */ @Override public void applyTo(List<T> target) throws IllegalStateException { verify(target); int position = getOriginal().getPosition(); int size = getOriginal().size(); for (int i = 0; i < size; i++) { target.remove(position); } } @Override public TYPE getType() { return Delta.TYPE.DELETE; } @Override public void verify(List<T> target) throws IllegalStateException { getOriginal().verify(target); } @Override public String toString() { return String.format("Missing content at line %s:%n %s%n", lineNumber(), formatLines(getOriginal().getLines())); } }
[ "joel.costigliola@gmail.com" ]
joel.costigliola@gmail.com
3f48ddefb34a972427c4e621da4879676e747978
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/no_seeding/64_jtailgui-fr.pingtimeout.jtail.gui.controller.UpdateIndexFileWatcher-1.0-10/fr/pingtimeout/jtail/gui/controller/UpdateIndexFileWatcher_ESTest_scaffolding.java
9a85fed4261bcf8d3eec5d8c8ca800b4b5259c5f
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,187
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Oct 29 00:09:18 GMT 2019 */ package fr.pingtimeout.jtail.gui.controller; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.junit.AfterClass; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class UpdateIndexFileWatcher_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 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 = "fr.pingtimeout.jtail.gui.controller.UpdateIndexFileWatcher"; 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(); } @AfterClass public static void clearEvoSuiteFramework(){ Sandbox.resetDefaultSecurityManager(); java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); setSystemProperties(); 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() { java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); java.lang.System.setProperty("user.dir", "/home/pderakhshanfar/evosuite-model-seeding-ee/evosuite-model-seeding-empirical-evaluation"); java.lang.System.setProperty("java.io.tmpdir", "/tmp"); java.lang.System.setProperty("user.language", "en"); java.lang.System.setProperty("user.home", "/home/pderakhshanfar"); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(UpdateIndexFileWatcher_ESTest_scaffolding.class.getClassLoader() , "fr.pingtimeout.jtail.io.index.FileIndex", "fr.pingtimeout.jtail.io.AbstractFileWatcher", "fr.pingtimeout.jtail.gui.model.OpenFileModelEvent", "fr.pingtimeout.jtail.io.index.ImmutableFileIndex", "fr.pingtimeout.jtail.gui.action.ChooseFileAction", "fr.pingtimeout.jtail.gui.view.JTailPanel", "fr.pingtimeout.jtail.gui.action.JTailAbstractAction", "fr.pingtimeout.jtail.gui.action.LogFileFilter", "fr.pingtimeout.jtail.util.JTailLogger", "fr.pingtimeout.jtail.gui.action.OpenFileAction", "fr.pingtimeout.jtail.util.JTailConstants", "fr.pingtimeout.jtail.gui.controller.FileIndexerWorker", "fr.pingtimeout.jtail.gui.controller.IndexationProgressMonitor", "fr.pingtimeout.jtail.gui.model.JTailModel", "fr.pingtimeout.jtail.gui.view.OpenFileDialog", "fr.pingtimeout.jtail.gui.controller.SelectIndexTypeListener", "fr.pingtimeout.jtail.io.FileIndexer", "fr.pingtimeout.jtail.gui.model.JTailMainModelEvent", "fr.pingtimeout.jtail.gui.model.OpenFileModel", "fr.pingtimeout.jtail.gui.action.IndexFileAction", "fr.pingtimeout.jtail.gui.model.JTailMainModelEvent$Type", "fr.pingtimeout.jtail.io.index.RomFileIndex", "fr.pingtimeout.jtail.gui.model.JTailMainModel", "fr.pingtimeout.jtail.io.LineReader", "fr.pingtimeout.jtail.gui.view.JTailPanel$1", "fr.pingtimeout.jtail.io.index.RamFileIndex", "fr.pingtimeout.jtail.gui.model.JTailModelEvent", "fr.pingtimeout.jtail.util.JTailLogger$LoggerLevel", "fr.pingtimeout.jtail.gui.action.MenuAction", "fr.pingtimeout.jtail.gui.model.OpenFileModelEvent$Type", "fr.pingtimeout.jtail.gui.model.JTailModelEvent$Type", "fr.pingtimeout.jtail.io.index.FileIndex$Type", "fr.pingtimeout.jtail.gui.controller.UpdateIndexFileWatcher" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(UpdateIndexFileWatcher_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "fr.pingtimeout.jtail.io.AbstractFileWatcher", "fr.pingtimeout.jtail.gui.controller.UpdateIndexFileWatcher", "fr.pingtimeout.jtail.io.FileIndexer", "fr.pingtimeout.jtail.util.JTailLogger", "fr.pingtimeout.jtail.util.JTailLogger$LoggerLevel", "fr.pingtimeout.jtail.util.JTailConstants", "fr.pingtimeout.jtail.gui.model.OpenFileModel", "fr.pingtimeout.jtail.gui.model.OpenFileModelEvent$Type", "fr.pingtimeout.jtail.gui.model.OpenFileModelEvent", "fr.pingtimeout.jtail.io.index.RamFileIndex", "fr.pingtimeout.jtail.io.index.RomFileIndex", "fr.pingtimeout.jtail.io.index.ImmutableFileIndex", "fr.pingtimeout.jtail.gui.model.JTailMainModel", "fr.pingtimeout.jtail.gui.action.JTailAbstractAction", "fr.pingtimeout.jtail.gui.action.IndexFileAction", "fr.pingtimeout.jtail.io.LineReader", "fr.pingtimeout.jtail.gui.action.MenuAction", "fr.pingtimeout.jtail.gui.model.JTailModel", "fr.pingtimeout.jtail.gui.action.ChooseFileAction", "fr.pingtimeout.jtail.gui.controller.SelectIndexTypeListener", "fr.pingtimeout.jtail.gui.view.OpenFileDialog", "fr.pingtimeout.jtail.gui.controller.FileIndexerWorker", "fr.pingtimeout.jtail.gui.action.LogFileFilter", "fr.pingtimeout.jtail.gui.controller.IndexationProgressMonitor", "fr.pingtimeout.jtail.gui.view.JTailPanel" ); } }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
ebdb21f71d01f32b3fd3d5304dbbae0785f1861c
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/12/12_2b3e9a39a7945efe2cbf278c0a7436af176fc704/ComponentImpl/12_2b3e9a39a7945efe2cbf278c0a7436af176fc704_ComponentImpl_s.java
daaca0145711158dce51857c3ea178d24c67d3ac
[]
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
8,104
java
/* * Copyright (C) 2013 salesforce.com, inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.auraframework.impl.root.component; import java.util.Collection; import java.util.Map; import org.auraframework.Aura; import org.auraframework.def.AttributeDefRef; import org.auraframework.def.ComponentDef; import org.auraframework.def.ControllerDef; import org.auraframework.def.DefDescriptor; import org.auraframework.def.DefDescriptor.DefType; import org.auraframework.def.ProviderDef; import org.auraframework.def.RootDefinition; import org.auraframework.instance.BaseComponent; import org.auraframework.instance.Component; import org.auraframework.instance.ComponentConfig; import org.auraframework.instance.ValueProvider; import org.auraframework.instance.ValueProviderType; import org.auraframework.system.AuraContext; import org.auraframework.throwable.AuraRuntimeException; import org.auraframework.throwable.quickfix.DefinitionNotFoundException; import org.auraframework.throwable.quickfix.InvalidDefinitionException; import org.auraframework.throwable.quickfix.QuickFixException; import org.auraframework.util.json.Json.Serialization; import org.auraframework.util.json.Json.Serialization.ReferenceType; /** * The real runtime component thing that sits in the tree. The Component * interface is just what is exposed to models */ @Serialization(referenceType = ReferenceType.IDENTITY) public final class ComponentImpl extends BaseComponentImpl<ComponentDef, Component> implements Component { public ComponentImpl(DefDescriptor<ComponentDef> descriptor, Map<String, Object> attributes) throws QuickFixException { super(descriptor, attributes); } public ComponentImpl(DefDescriptor<ComponentDef> descriptor, Collection<AttributeDefRef> attributeDefRefs, BaseComponent<?, ?> attributeValueProvider, String localId) throws QuickFixException { super(descriptor, attributeDefRefs, attributeValueProvider, localId); } public ComponentImpl(DefDescriptor<ComponentDef> descriptor, Collection<AttributeDefRef> attributeDefRefs, BaseComponent<?, ?> attributeValueProvider, Map<String, Object> valueProviders, ValueProvider delegateValueProvider) throws QuickFixException { super(descriptor, attributeDefRefs, attributeValueProvider, valueProviders, delegateValueProvider); } @Override protected void createSuper() throws QuickFixException { ComponentDef def = getComponentDef(); if (!remoteProvider) { DefDescriptor<ComponentDef> superDefDescriptor = def.getExtendsDescriptor(); if (superDefDescriptor != null) { Component concrete = concreteComponent == null ? this : concreteComponent; superComponent = new ComponentImpl(superDefDescriptor, this, this, concrete); } } } // FIXME - move to builder @Override protected void injectComponent() throws QuickFixException { if (this.intfDescriptor != null) { AuraContext context = Aura.getContextService().getCurrentContext(); context.setCurrentNamespace(descriptor.getNamespace()); BaseComponent<?, ?> oldComponent = context.setCurrentComponent(new ProtoComponentImpl(descriptor, getGlobalId(), attributeSet)); try { RootDefinition root = intfDescriptor.getDef(); ProviderDef providerDef = root.getLocalProviderDef(); if (providerDef == null) { providerDef = root.getProviderDef(); if (providerDef != null) { // // In this case, we have a 'remote' provider (i.e. client side) and we simply // continue on as if nothing happened. // return; } throw new InvalidDefinitionException(String.format("%s cannot be instantiated directly.", descriptor), root.getLocation()); } if (providerDef.isLocal()) { ComponentConfig config = providerDef.provide(intfDescriptor); if (config != null) { ProviderDef remoteProviderDef = root.getProviderDef(); if (remoteProviderDef == null || remoteProviderDef.isLocal()) { hasLocalDependencies = true; } DefDescriptor<ComponentDef> d = config.getDescriptor(); if (d != null) { descriptor = d; } try { if (descriptor.getDefType() != DefType.COMPONENT) { throw new AuraRuntimeException(String.format("%s is not a component", descriptor)); } ComponentDef c = descriptor.getDef(); if (c.isAbstract()) { throw new AuraRuntimeException(String.format("%s cannot be instantiated directly.", descriptor)); } // new component may have its own controllerdef so add that one ControllerDef cd = c.getControllerDef(); if (cd != null) { this.valueProviders.put(ValueProviderType.CONTROLLER.getPrefix(), cd); } } catch (DefinitionNotFoundException dnfe) { throw new AuraRuntimeException(String.format("%s did not provide a valid component", providerDef.getDescriptor()), dnfe); } attributeSet.setRootDefDescriptor(descriptor); Map<String, Object> providedAttributes = config.getAttributes(); if (providedAttributes != null) { // if there is a remote provider and attributes were // set, we assume/pray the remote provider does too hasProvidedAttributes = true; attributeSet.startTrackingDirtyValues(); attributeSet.set(providedAttributes); } } } else { remoteProvider = true; } } finally { context.setCurrentComponent(oldComponent); } } } @Override protected void finishInit() throws QuickFixException { if (concreteComponent == null) { BaseComponent<?, ?> attributeValueProvider = attributeSet.getValueProvider(); if (attributeValueProvider != null) { attributeValueProvider.index(this); } } super.finishInit(); } private ComponentImpl(DefDescriptor<ComponentDef> descriptor, Component extender, BaseComponent<?, ?> attributeValueProvider, Component concreteComponent) throws QuickFixException { super(descriptor, extender, attributeValueProvider, concreteComponent); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f249a0e088d8144a1c5fc5968ac1e7998af48867
2da93316dc981555271295315d072bd8d61c3daf
/src/com/cyb/collection/ListStudy.java
d7ada144cf09b93d15e42f4e851fb43a1b81cdaf
[]
no_license
iechenyb/sina0.9
17ac6a71e5bb5ffc5b44d87be9e2d7d4d9708131
14f5fa5237e3e580e770a62f652640bbb37ff447
refs/heads/master
2021-06-10T03:03:12.272792
2017-01-06T01:04:39
2017-01-06T01:04:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,544
java
package com.cyb.collection; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.LinkedList; import java.util.List; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; public class ListStudy { public static void main(String[] args) { CollectionFactory.build(100); LinkedList<String> ll = new LinkedList<String>(); ll.addFirst("123"); ll.addFirst("456"); ll.addLast("last1"); ll.addLast("last2"); ll.add("xxx"); ll.add("yyyy"); ll.add(5, "element"); Collections.sort(CollectionFactory.list, new Comparator<Integer>() { @Override public int compare(Integer o1, Integer o2) { return o2.compareTo(o1);// 正确的方式 } }); System.out.println(CollectionFactory.list); System.out.println(ll); ArrayList<String> al = new ArrayList<String>(); al.add("1"); al.add("2"); al.add("3"); al.add("4ha"); al.add("4ha"); al.add("6"); System.out.println(al.indexOf("4ha"));//返回第一个value所在的索引值 //创建list的方法 List<String> strList = new ArrayList<String>(); Collections.addAll(strList, "1", "2", "3"); System.out.println(strList); //使用Guava创建list List<String> strList1 = Lists.newArrayList("1", "2", "3"); System.out.println(strList1); List<String> strList2 = Collections.singletonList("1");// 返回一个只包含指定对象的不可变列表 System.out.println(strList2); List<String> strList3 = Collections.emptyList();// 返回空的列表(不可变的) System.out.println(strList3); try{ strList3.add("xx"); System.out.println(strList3);//报错,不可变 }catch(Exception e){ System.out.println(strList3+"不可修改!"); } //创建strList的视图 List<String> unmodifiableList = Collections.unmodifiableList(strList); System.out.println(unmodifiableList); try{ unmodifiableList.add("xx"); System.out.println("unmodifiableList:"+unmodifiableList);//报错,不可变 }catch(Exception e){ System.out.println(strList3+"unmodifiableList不可修改!"); } //JDK中还可以创建一种只能修改,但不能增加和删除的List String[] strArray = new String[] {"1", "2", "3"}; List<String> strList4 = Arrays.asList(strArray); try{ strList4.add("5"); }catch(Exception e){ System.out.println(strList4+"strList4不可修改!"); } List<String> strList5 = ImmutableList.of("1", "2", "3"); System.out.println(strList5); strList5.add("xxx");//不可修改,否则报错 } }
[ "zzuchenyb@sina.com" ]
zzuchenyb@sina.com
d7ed516cbfa173823fc9d92e871cdd68d5be6ab4
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/25/org/jfree/chart/util/ObjectUtilities_loadAndInstantiate_395.java
37db03d3d33cb7d49d98445cd0044fecb3d1a2fe
[]
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
877
java
org jfree chart util collect util method handl class object instanti object util objectutil creat instanc cut common bean instanti code param classnam string param sourc sourc classload instanti object error occur object load instanti loadandinstanti string classnam class sourc class loader classload loader class loader getclassload sourc class loader load class loadclass classnam instanc newinst except
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
691a238d83ba1e87015fb1cdf3b7cc9ed5843ccf
341bf0cb9b2abe14784d02c74c80acf86af9b770
/Chapter17/Q24_MaxSubMatrix/QuestionC.java
1153e9ce8a55d17ad6a3cad4ce2ae5c38a0aab42
[]
no_license
dipodaimary/CtCi-Java-Solutions
c14b4f24f8f35dd3934725d249fada499ad4e6a6
e17d9a06e31879e9e72f887c16076eadb92a6a40
refs/heads/master
2021-04-28T18:30:40.633689
2018-04-24T17:46:23
2018-04-24T17:46:23
121,874,639
0
0
null
null
null
null
UTF-8
Java
false
false
1,455
java
//package Chapter17.Q24_MaxSubMatrix; // //public class QuestionC { // public static SubMatrix getMaxMatrix(int[][] matrix) { // int rowCount = matrix.length; // int colCount = matrix[0].length; // // SubMatrix best = null; // // for (int rowStart = 0; rowStart < rowCount; rowStart++) { // int[] partialSum = new int[colCount]; // // for (int rowEnd = rowStart; rowEnd < rowCount; rowEnd++) { // /* Add values at row rowEnd. */ // for (int i = 0; i < colCount; i++) { // partialSum[i] += matrix[rowEnd][i]; // } // // Range bestRange = maxSubArray(partialSum, colCount); // if (best == null || best.getSum() < bestRange.sum) { // best = new SubMatrix(rowStart, bestRange.start, rowEnd, bestRange.end, bestRange.sum); // } // } // } // return best; // } // // public static Range maxSubArray(int[] array, int N) { // Range best = null; // int start = 0; // int sum = 0; // // for (int i = 0; i < N; i++) { // sum += array[i]; // if (best == null || sum > best.sum) { // best = new Range(start, i, sum); // } // // /* If running_sum is < 0 no point in trying to continue the // * series. Reset. */ // if (sum < 0) { // start = i + 1; // sum = 0; // } // } // return best; // } // // public static void main(String[] args) { // int[][] matrix = AssortedMethods.randomMatrix(10, 10, -5, 5); // AssortedMethods.printMatrix(matrix); // System.out.println(getMaxMatrix(matrix)); // } // //}
[ "dipodaimary@gmail.com" ]
dipodaimary@gmail.com
bc77844bf2f2af7ea687f0aea129ecd145c307f7
7279f62d8efe0defc878a9bcfcf9533c1d3b81a4
/src/main/java/com/spring/testing/testdrivendevelopment/service/VehicleServiceImpl.java
8e30cae04d3ff60e1b520c4c0853800dd6783c06
[]
no_license
angelgru/testdrivendevelopment
51cdfb36c8c4f7c73f120a1d9344a70d459c1b4e
560aeae611242723892aabd5e3cf85d97fd077e3
refs/heads/master
2020-04-16T11:38:27.135747
2019-01-13T19:28:02
2019-01-13T19:28:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,000
java
package com.spring.testing.testdrivendevelopment.service; import com.spring.testing.testdrivendevelopment.domain.Vehicle; import com.spring.testing.testdrivendevelopment.repository.VehicleRepository; import org.springframework.stereotype.Service; import java.util.List; import java.util.Optional; @Service public class VehicleServiceImpl implements VehicleService{ private final VehicleRepository vehicleRepository; public VehicleServiceImpl(VehicleRepository vehicleRepository) { this.vehicleRepository = vehicleRepository; } @Override public Vehicle addVehicle(Vehicle vehicle) { Vehicle saveObject = new Vehicle(vehicle.getMake(), vehicle.getModel()); return vehicleRepository.save(saveObject); } @Override public List<Vehicle> getVehicleList() { return (List<Vehicle>) vehicleRepository.findAll(); } @Override public Optional<Vehicle> getVehicle(Long id) { return vehicleRepository.findById(id); } }
[ "=" ]
=
095c43fd9003af3af98ef261b00eee98356edea2
125f147787ec146d83234eef2a25776f0535b835
/out/target/common/obj/JAVA_LIBRARIES/android_system_stubs_current_intermediates/src/android/icu/util/JapaneseCalendar.java
9ee78f33e20478ce9d3536bb2423d5ed87735620
[]
no_license
team-miracle/android-7.1.1_r13_apps-lib
f9230d7c11d3c1d426d3412d275057be0ae6d1f7
9b978d982de9c87c7ee23806212e11785d12bddd
refs/heads/master
2021-01-09T05:47:54.721201
2019-05-09T05:36:23
2019-05-09T05:36:23
80,803,682
0
1
null
null
null
null
UTF-8
Java
false
false
2,217
java
/* GENERATED SOURCE. DO NOT MODIFY. */ /* ******************************************************************************* * Copyright (C) 1996-2014, International Business Machines Corporation and * * others. All Rights Reserved. * ******************************************************************************* */ package android.icu.util; public class JapaneseCalendar extends android.icu.util.GregorianCalendar { public JapaneseCalendar() { throw new RuntimeException("Stub!"); } public JapaneseCalendar(android.icu.util.TimeZone zone) { throw new RuntimeException("Stub!"); } public JapaneseCalendar(java.util.Locale aLocale) { throw new RuntimeException("Stub!"); } public JapaneseCalendar(android.icu.util.ULocale locale) { throw new RuntimeException("Stub!"); } public JapaneseCalendar(android.icu.util.TimeZone zone, java.util.Locale aLocale) { throw new RuntimeException("Stub!"); } public JapaneseCalendar(android.icu.util.TimeZone zone, android.icu.util.ULocale locale) { throw new RuntimeException("Stub!"); } public JapaneseCalendar(java.util.Date date) { throw new RuntimeException("Stub!"); } public JapaneseCalendar(int era, int year, int month, int date) { throw new RuntimeException("Stub!"); } public JapaneseCalendar(int year, int month, int date) { throw new RuntimeException("Stub!"); } public JapaneseCalendar(int year, int month, int date, int hour, int minute, int second) { throw new RuntimeException("Stub!"); } protected int handleGetExtendedYear() { throw new RuntimeException("Stub!"); } protected void handleComputeFields(int julianDay) { throw new RuntimeException("Stub!"); } @java.lang.SuppressWarnings(value={"fallthrough"}) protected int handleGetLimit(int field, int limitType) { throw new RuntimeException("Stub!"); } public java.lang.String getType() { throw new RuntimeException("Stub!"); } public int getActualMaximum(int field) { throw new RuntimeException("Stub!"); } public static final int CURRENT_ERA; public static final int HEISEI; public static final int MEIJI; public static final int SHOWA; public static final int TAISHO; static { CURRENT_ERA = 0; HEISEI = 0; MEIJI = 0; SHOWA = 0; TAISHO = 0; } }
[ "c1john0803@gmail.com" ]
c1john0803@gmail.com
1b2797d385f0b630124ed5fc0b06105e69a8df11
2378c195f2647b004346ed30164cc026959cda25
/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedMixer.java
7493a3ac52771768803bd725ef000f312061b398
[ "MIT" ]
permissive
MORIMORI0317/Create
7d62126e5fe405afd69e39c39582ee4c2c49ef1a
3371267e799ca3474d5ff78769677408b346b5b2
refs/heads/master
2021-05-23T09:05:22.580797
2020-03-29T02:44:35
2020-03-29T02:44:35
253,212,805
1
0
MIT
2020-04-05T10:53:15
2020-04-05T10:53:15
null
UTF-8
Java
false
false
2,328
java
package com.simibubi.create.compat.jei.category.animations; import com.mojang.blaze3d.platform.GlStateManager; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; import com.simibubi.create.foundation.gui.ScreenElementRenderer; import net.minecraft.block.BlockState; import net.minecraft.client.renderer.model.IBakedModel; public class AnimatedMixer extends AnimatedKinetics { @Override public int getWidth() { return 50; } @Override public int getHeight() { return 150; } @Override public void draw(int xOffset, int yOffset) { GlStateManager.pushMatrix(); GlStateManager.enableDepthTest(); GlStateManager.translatef(xOffset, yOffset, 0); GlStateManager.rotatef(-15.5f, 1, 0, 0); GlStateManager.rotatef(22.5f, 0, 1, 0); GlStateManager.translatef(-45, -5, 0); GlStateManager.scaled(.45f, .45f, .45f); GlStateManager.pushMatrix(); ScreenElementRenderer.renderModel(this::cogwheel); GlStateManager.popMatrix(); GlStateManager.pushMatrix(); ScreenElementRenderer.renderBlock(this::body); GlStateManager.popMatrix(); GlStateManager.pushMatrix(); ScreenElementRenderer.renderModel(this::pole); GlStateManager.popMatrix(); GlStateManager.pushMatrix(); ScreenElementRenderer.renderModel(this::head); GlStateManager.popMatrix(); GlStateManager.pushMatrix(); ScreenElementRenderer.renderBlock(this::basin); GlStateManager.popMatrix(); GlStateManager.popMatrix(); } private IBakedModel cogwheel() { float t = 25; GlStateManager.translatef(t, -t, -t); GlStateManager.rotated(getCurrentAngle() * 2, 0, 1, 0); GlStateManager.translatef(-t, t, t); return AllBlockPartials.SHAFTLESS_COGWHEEL.get(); } private BlockState body() { return AllBlocks.MECHANICAL_MIXER.get().getDefaultState(); } private IBakedModel pole() { GlStateManager.translatef(0, 51, 0); return AllBlockPartials.MECHANICAL_MIXER_POLE.get(); } private IBakedModel head() { float t = 25; GlStateManager.translatef(0, 51, 0); GlStateManager.translatef(t, -t, -t); GlStateManager.rotated(getCurrentAngle() * 4, 0, 1, 0); GlStateManager.translatef(-t, t, t); return AllBlockPartials.MECHANICAL_MIXER_HEAD.get(); } private BlockState basin() { GlStateManager.translatef(0, 85, 0); return AllBlocks.BASIN.get().getDefaultState(); } }
[ "31564874+simibubi@users.noreply.github.com" ]
31564874+simibubi@users.noreply.github.com
d2d076a3dbd8391bb93361a47cf525e1050064c3
0fb9da6028f3e2d3f6aee666a1158cc63a0e8b37
/src/main/java/com/cliffc/aa/TypeErr.java
8832453ab3901638ae77eec21c4abf539ac6876b
[ "Apache-2.0" ]
permissive
libnoon/aa
f58cc0a0916f8f1e6cfaf4875be82379e81bcb71
96170a4ce1483c2d4697c0d8b5745ec854131625
refs/heads/master
2020-03-17T01:06:35.596039
2018-05-12T07:25:43
2018-05-12T07:25:43
133,140,126
0
0
null
2018-05-12T11:34:43
2018-05-12T11:34:43
null
UTF-8
Java
false
false
2,179
java
package com.cliffc.aa; /** Error data type. If the program result is of this type, the program is not well formed. */ public class TypeErr extends Type { boolean _all; String _msg; private TypeErr( String msg, boolean all ) { super(TERROR); init(msg,all); } private void init(String msg, boolean all ) { _msg=msg; _all=all; } @Override public int hashCode( ) { return TERROR+_msg.hashCode()+(_all?1:0); } @Override public boolean equals( Object o ) { if( this==o ) return true; if( !(o instanceof TypeErr) ) return false; TypeErr t2 = (TypeErr)o; return _msg.equals(t2._msg) && _all==t2._all; } private static TypeErr FREE=null; private TypeErr free( TypeErr f ) { FREE=f; return this; } public static TypeErr make( String msg ) { return make(msg,true); } public static TypeErr make( String msg, boolean all ) { TypeErr t1 = FREE; if( t1 == null ) t1 = new TypeErr(msg,all); else { FREE = null; t1.init(msg,all); } TypeErr t2 = (TypeErr)t1.hashcons(); return t1==t2 ? t1 : t2.free(t1); } static public final TypeErr ALL = make("all"); static public final TypeErr ANY = make("all",false); static public final TypeErr UNRESOLVED = make("Unresolved overload"); static final TypeErr[] TYPES = new TypeErr[]{ANY,ALL}; @Override protected TypeErr xdual() { return new TypeErr(_msg,!_all); } @Override protected Type xmeet( Type t ) { if( t == this ) return this; if( !_all ) return t; // Anything-meet-ANY is that thing if( t._type != TERROR ) return this; // Anything-meet-ALL is ALL TypeErr te = (TypeErr)t; if( !te._all ) return this; // Anything-meet-ANY is that thing; dropping the 'any' error message // Keep the more specific error message if( t ==ALL ) return this; if( this==ALL ) return t ; // Merge error messages? throw AA.unimpl(); } @Override public byte isBitShape(Type t) { return -1; } @Override public String toString() { return (_all ? "" : "~")+ _msg; } @Override public boolean above_center() { return !_all; } @Override public boolean canBeConst() { return !_all; } @Override public boolean is_con() { return false; } }
[ "cliffc@acm.org" ]
cliffc@acm.org