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
9eec4378cd991ca5bf17154110824202204ff420
b09f518c08e930460e08309dc5f6dd5b1e6ff6de
/1086-synchronized/src/main/java/com/tuyrk/unit03/SynchronizedObjectCodeBlock2.java
e920cbd86706a067b99355689d11c469538a27b6
[]
no_license
tuyrk/learn-imooc
087c185d9fa50b39f73b29b44bc281f03f5e5ccf
99040f6fca437ecf36eaaaf21447a92c5f2eb0ec
refs/heads/master
2022-11-04T12:36:15.671227
2020-11-22T12:07:03
2020-11-22T12:07:03
219,886,876
1
1
null
2022-10-05T19:37:44
2019-11-06T01:38:53
Java
UTF-8
Java
false
false
1,451
java
package com.tuyrk.unit03; /** * ๅฏน่ฑก้”็คบไพ‹1๏ผŒไปฃ็ ๅ—ๅฝขๅผ */ public class SynchronizedObjectCodeBlock2 implements Runnable { private static SynchronizedObjectCodeBlock2 instance = new SynchronizedObjectCodeBlock2(); private Object lock1 = new Object(); private Object lock2 = new Object(); public static void main(String[] args) { Thread t1 = new Thread(instance); Thread t2 = new Thread(instance); t1.start(); t2.start(); while (t1.isAlive() || t2.isAlive()) { } System.out.println("finished"); } @Override public void run() { synchronized (lock1) { System.out.println("ๆˆ‘ๆ˜ฏๅฏน่ฑก้”็š„ไปฃ็ ๅ—ๅฝขๅผ-lock1ใ€‚ๆˆ‘ๅซ" + Thread.currentThread().getName()); try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println(Thread.currentThread().getName() + "๏ผŒlock1-่ฟ่กŒ็ป“ๆŸใ€‚"); } synchronized (lock2) { System.out.println("ๆˆ‘ๆ˜ฏๅฏน่ฑก้”็š„ไปฃ็ ๅ—ๅฝขๅผ-lock2ใ€‚ๆˆ‘ๅซ" + Thread.currentThread().getName()); try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println(Thread.currentThread().getName() + "๏ผŒlock2-่ฟ่กŒ็ป“ๆŸใ€‚"); } } }
[ "tuyrk@qq.com" ]
tuyrk@qq.com
37b18b516ee1cce92cf6116daee3a1df3a5d7a83
111209d369157dbcca1d01056623c27f3cecc9d7
/CohesiveAppServer/CohesiveBackend/CohesiveBusiness-ejb/src/java/com/ibd/cohesive/app/business/teacher/summary/teacherleavemanagement/TeacherLeaveManagementBO.java
a0e42b938241bf67dca2fe4dc63de1aa0ff75653
[]
no_license
IBD-Technologies/NewGenEducationApp
d3c1768316c091ade0bda050fdfc1dfe66aa5070
7e27094a635782ebd8c0a940b614485c52fe63d3
refs/heads/master
2021-05-19T11:30:04.032333
2020-06-12T17:35:22
2020-06-12T17:35:22
251,661,845
0
0
null
null
null
null
UTF-8
Java
false
false
798
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.ibd.cohesive.app.business.teacher.summary.teacherleavemanagement; /** * * @author DELL */ public class TeacherLeaveManagementBO { TeacherLeaveManagementFilter filter; TeacherLeaveManagementResult result[]; public TeacherLeaveManagementFilter getFilter() { return filter; } public void setFilter(TeacherLeaveManagementFilter filter) { this.filter = filter; } public TeacherLeaveManagementResult[] getResult() { return result; } public void setResult(TeacherLeaveManagementResult[] result) { this.result = result; } }
[ "60004888+RajkumarIBD@users.noreply.github.com" ]
60004888+RajkumarIBD@users.noreply.github.com
f65db80d0744af0547d6f4fbe2dd4b8081bc0680
7fa9c6b0fa1d0726ae1cda0199716c811a1ea01b
/Crawler/data/Token.java
d6c54bde34690cffbabee9dcdfea1eeeeb15b805
[]
no_license
NayrozD/DD2476-Project
b0ca75799793d8ced8d4d3ba3c43c79bb84a72c0
94dfb3c0a470527b069e2e0fd9ee375787ee5532
refs/heads/master
2023-03-18T04:04:59.111664
2021-03-10T15:03:07
2021-03-10T15:03:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
437
java
14 https://raw.githubusercontent.com/mjtb49/LattiCG/master/src/randomreverser/reversal/asm/Token.java package randomreverser.reversal.asm; public class Token { private final String text; private final int line; public Token(String text, int line) { this.text = text; this.line = line; } public String getText() { return text; } public int getLine() { return line; } }
[ "veronika.cucorova@gmail.com" ]
veronika.cucorova@gmail.com
5cec364e7d1f0f407f153faa741887e7a7129776
1edb528ff62988fe9f58f4ecdca9089ebe36155d
/app/src/main/java/com/example/mainactivity/dashActivity.java
6873650671bdc807d018b0263eb856e4640e0917
[]
no_license
Mayur2311/News
7d8d937bd14b4fb4a676af91f59442a03c672876
f868042586b822520cdb96dd145fbf70e1f47eac
refs/heads/master
2023-05-04T05:49:10.112474
2021-05-23T19:45:10
2021-05-23T19:45:10
368,980,988
0
0
null
null
null
null
UTF-8
Java
false
false
2,927
java
package com.example.mainactivity; import androidx.annotation.NonNull; import androidx.appcompat.app.ActionBarDrawerToggle; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; import androidx.core.view.GravityCompat; import androidx.drawerlayout.widget.DrawerLayout; import androidx.navigation.NavController; import androidx.navigation.Navigation; import android.content.Intent; import android.os.Bundle; import android.view.MenuItem; import android.widget.Toast; import com.example.mainactivity.utils.NetworkCheck; import com.google.android.material.navigation.NavigationView; import com.google.firebase.auth.FirebaseAuth; public class dashActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener { Toolbar toolbar; DrawerLayout drawerLayout; NavController navController; NavigationView navigationView; FirebaseAuth firebaseAuth; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_dash); firebaseAuth = FirebaseAuth.getInstance(); setupNavigation(); NetworkCheck networkCheck = new NetworkCheck(); if(!networkCheck.checkNetwork(this)) { Toast.makeText(getApplicationContext(), "No Internet", Toast.LENGTH_SHORT).show(); } } @Override public boolean onNavigationItemSelected(@NonNull MenuItem item) { item.setCheckable(true); drawerLayout.closeDrawers(); int id =item.getItemId(); if (id == R.id.dashboard) { navController.navigate(R.id.dashboardFragment); }else if (id == R.id.logout) { firebaseAuth.signOut(); Intent intent = new Intent(this, MainActivity.class); startActivity(intent); finish(); } return true; } public void setupNavigation() { toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayShowHomeEnabled(true); drawerLayout = findViewById(R.id.drawerDashLayout); navigationView = findViewById(R.id.navigationView); ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawerLayout, toolbar, R.string.drawer_open, R.string.drawer_close); drawerLayout.addDrawerListener(toggle); toggle.syncState(); navigationView.setNavigationItemSelectedListener(this); navController = Navigation.findNavController(this, R.id.host_fragment); } @Override public void onBackPressed() { if (drawerLayout.isDrawerOpen(GravityCompat.START)) { drawerLayout.closeDrawer(GravityCompat.START); }else { super.onBackPressed(); } } }
[ "you@example.com" ]
you@example.com
c29979fef650a6372a34a7556b147d1025856cec
cc4d254ace9fbb01333537a33d752ae535ef28c2
/Testing/app/src/main/java/com/adityadua/testing/MainActivity.java
52b1106f93b29834ab0219b1dc37f40ed0225ded
[]
no_license
aditya-dua/Android19May
511531d4324b39c6e34257b8d60adfa803afa826
f36fc49d67a76e75294443697d33cd5d98d89738
refs/heads/master
2020-03-18T17:17:21.005919
2018-09-02T04:21:45
2018-09-02T04:21:45
135,018,910
0
0
null
null
null
null
UTF-8
Java
false
false
334
java
package com.adityadua.testing; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }
[ "adityaduatechm@gmail.com" ]
adityaduatechm@gmail.com
93de9602d9a2126ab9b3792ef510ec18e0c2e083
35b710e9bc210a152cc6cda331e71e9116ba478c
/tc-unused/src/main/java/com/topcoder/web/openaim/dao/hibernate/DocumentDAOHibernate.java
4ffdb5164111f2facba43e08f53e8233e31efaac
[]
no_license
appirio-tech/tc1-tcnode
d17649afb38998868f9a6d51920c4fe34c3e7174
e05a425be705aca8f530caac1da907d9a6c4215a
refs/heads/master
2023-08-04T19:58:39.617425
2016-05-15T00:22:36
2016-05-15T00:22:36
56,892,466
1
8
null
2022-04-05T00:47:40
2016-04-23T00:27:46
Java
UTF-8
Java
false
false
490
java
package com.topcoder.web.openaim.dao.hibernate; import com.topcoder.web.common.dao.hibernate.Base; import com.topcoder.web.openaim.dao.DocumentDAO; import com.topcoder.web.openaim.model.Document; /** * @author dok * @version $Revision: 68803 $ Date: 2005/01/01 00:00:00 * Create Date: Aug 1, 2006 */ public class DocumentDAOHibernate extends Base implements DocumentDAO { public Document find(Long id) { return (Document) super.find(Document.class, id); } }
[ "dongzhengbin@winterflames-MacBook-Pro.local" ]
dongzhengbin@winterflames-MacBook-Pro.local
d7ac3aa302dceee8b313256a63550b5c5bbb0e0a
e9c2f8cdcee975a5900ecdc12e50aefc1f8be813
/spring-framework/test/org/springframework/jmx/AbstractJmxTests.java
ec98b00a54192a91bbac169d2921af661ff5de2d
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
z-dp/springsource
feee1c285667098b72ff65c95a5e8fa5e2aa4b07
e217eeb091c27834409ac5ee55b690b8e669c2e8
refs/heads/master
2020-04-10T03:19:35.581789
2018-12-07T04:10:04
2018-12-07T04:10:04
160,766,989
0
0
null
null
null
null
UTF-8
Java
false
false
682
java
/* * Created on Jul 5, 2004 */ package org.springframework.jmx; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; /** * @author Rob Harrop */ public abstract class AbstractJmxTests extends AbstractMBeanServerTests { private ClassPathXmlApplicationContext ctx; protected void onSetUp() throws Exception { ctx = new ClassPathXmlApplicationContext(getApplicationContextPath()); } protected String getApplicationContextPath() { return "org/springframework/jmx/applicationContext.xml"; } protected ApplicationContext getContext() { return this.ctx; } }
[ "zidp@cyclecentury.com" ]
zidp@cyclecentury.com
673388fb3d892020d927e90ee0d7b332d003a542
0c359e241cce729ce777db41d3a4feefa48c30c0
/src/main/java/com/controllerface/cmdr_j/classes/modules/optional/shields/shieldcells/size6/ShieldCellBank_6D.java
14033aa4124f4cfc495d6227a860a6507c3420aa
[]
no_license
controllerface/CMDR-J
760cafe4b89fc86715ee7941d66eaaf7978cf067
9fc70e1ae2f2119e3dc93bbc9a26544526beb56a
refs/heads/main
2022-09-29T02:43:58.308231
2022-09-12T02:09:01
2022-09-12T02:09:01
128,938,494
1
1
null
2021-11-21T01:42:20
2018-04-10T13:37:30
Java
UTF-8
Java
false
false
1,542
java
package com.controllerface.cmdr_j.classes.modules.optional.shields.shieldcells.size6; import com.controllerface.cmdr_j.classes.data.ItemEffects; import com.controllerface.cmdr_j.classes.data.ItemEffectData; import com.controllerface.cmdr_j.classes.modules.optional.shields.shieldcells.AbstractShieldCellBank; import com.controllerface.cmdr_j.enums.equipment.modules.stats.ItemEffect; public class ShieldCellBank_6D extends AbstractShieldCellBank { public ShieldCellBank_6D() { super("6D Shield Cell Bank", new ItemEffects( new ItemEffectData(ItemEffect.Size, 6.0), new ItemEffectData(ItemEffect.Class, "D"), new ItemEffectData(ItemEffect.Mass, 16.0), new ItemEffectData(ItemEffect.Integrity, 68.0), new ItemEffectData(ItemEffect.PowerDraw, 1.42), new ItemEffectData(ItemEffect.BootTime, 25.0), new ItemEffectData(ItemEffect.ShieldBankSpinUp, 5.0), new ItemEffectData(ItemEffect.ShieldBankReinforcement, 26.0), new ItemEffectData(ItemEffect.ShieldBankHeat, 640.0), new ItemEffectData(ItemEffect.AmmoClipSize, 1.0), new ItemEffectData(ItemEffect.AmmoMaximum, 3.0), new ItemEffectData(ItemEffect.ShieldBankDuration, 7.6) )); } @Override public long price() { return 222_444; } }
[ "controll.face@gmail.com" ]
controll.face@gmail.com
2dbe3835e55209e83db2ad82de4f07b0c999eb4a
e1938b85ba2f6f15bd925e916727f48d9db5490d
/src/main/java/com/qunjie/ocean/servcie/TokenCache.java
a7c3cf952413b731136157174ae3e51027a41b59
[]
no_license
weizhuxiao/integration
5a6daea250f4becf7f6286d1818e2fab754289cd
56765a97bbeb804004cfbb5841386c6f0185ea37
refs/heads/main
2023-08-19T04:26:48.267906
2021-05-19T08:35:20
2021-05-19T08:35:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,067
java
package com.qunjie.ocean.servcie; import com.alibaba.fastjson.JSONObject; import com.google.common.collect.Maps; import com.qunjie.common.email.DefaultEmailAddress; import com.qunjie.common.email.event.SendEmailEvent; import com.qunjie.ocean.model.TokenModel; import com.qunjie.ocean.utils.HttpHelper; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import java.util.HashMap; import java.util.Map; /** * Copyright (C),2020-2021,็พคๆฐๅฐ็ซ ็‰ฉ่”็ฝ‘ * FileName: com.qunjie.ocean.servcie.TokenCache * * @author whs * Date: 2021/3/1 10:51 * Description: * History: * &lt;author&gt; &lt;time&gt; &lt;version&gt; &lt;desc&gt; * ไฟฎๆ”นไบบๅง“ๅ ไฟฎๆ”นๆ—ถ้—ด ็‰ˆๆœฌๅท ๆ่ฟฐ */ @Slf4j @Component public class TokenCache { @Autowired HttpHelper httpHelper; @Autowired ApplicationContext applicationContext; private static Map<String, TokenModel> accessTokenMap = Maps.newConcurrentMap(); public static final String APP_ID = "1692668295491611"; public static final String SECRET = "915a689fe0b4c496f061ff1c83264ac1ec80b1f6"; public static final String ADVERTISER_ID = "1690201024478285"; public static final String key = APP_ID + SECRET; public synchronized void setToken(TokenModel token){ accessTokenMap.put(key,token); } public synchronized TokenModel getToken(){ TokenModel tokenModel = accessTokenMap.computeIfAbsent(key,k->new TokenModel()); return tokenModel; } public void refreshToken(){ TokenModel tokenModel = accessTokenMap.computeIfAbsent(key,k->new TokenModel()); if (tokenModel != null){ String refresh_token = tokenModel.getRefresh_token(); TokenModel newTokenModel = refreshAccessToken(refresh_token); setToken(newTokenModel); }else { } } public TokenModel getAccessToken(String code) { // ่ฏทๆฑ‚ๅœฐๅ€ String open_api_url_prefix = "https://ad.oceanengine.com/open_api/"; String uri = "oauth2/access_token/"; // ่ฏทๆฑ‚ๅ‚ๆ•ฐ Map<String, String> data = new HashMap() { { put("app_id", TokenCache.APP_ID); put("secret", TokenCache.SECRET); put("grant_type", "auth_code"); put("auth_code", code); } }; JSONObject jsonObject = httpHelper.doPost(open_api_url_prefix + uri, data); if (jsonObject != null){ JSONObject data1 = jsonObject.getJSONObject("data"); TokenModel tokenModel = new TokenModel(data1.getString("access_token"),data1.getLong("expires_in"), data1.getString("refresh_token"),data1.getLong("refresh_token_expires_in")); setToken(tokenModel); return tokenModel; } return null; } public TokenModel refreshAccessToken(String refresh_token) { // ่ฏทๆฑ‚ๅœฐๅ€ String open_api_url_prefix = "https://ad.oceanengine.com/open_api/"; String uri = "oauth2/refresh_token/"; // ่ฏทๆฑ‚ๅ‚ๆ•ฐ1 Map < String,String> data = new HashMap() { { put("appid", TokenCache.APP_ID); put("secret", TokenCache.SECRET); put("grant_type", "refresh_token"); put("refresh_token", refresh_token); } }; // ๆž„้€ ่ฏทๆฑ‚ JSONObject jsonObject = httpHelper.doPost(open_api_url_prefix + uri, data); if (jsonObject != null) { JSONObject data1 = jsonObject.getJSONObject("data"); TokenModel tokenModel = new TokenModel(data1.getString("access_token"), data1.getLong("expires_in"), data1.getString("refresh_token"), data1.getLong("refresh_token_expires_in")); return tokenModel; } return null; } @Scheduled(cron = "0 0 0/12 * * ?") public void refreshToke(){ log.info("==============refresh็ผ“ๅญ˜็š„token๏ผ================================"); TokenModel tokenModel = accessTokenMap.get(key); if (tokenModel != null){ TokenModel tokenModel1 = refreshAccessToken(tokenModel.getRefresh_token()); setToken(tokenModel1); }else { applicationContext.publishEvent(new SendEmailEvent(this,"้ฃž้ฑผ้”€ๅ”ฎ็บฟ็ดขๆœชๆŽˆๆƒ๏ผŒๅˆฐๅฆ‚ไธ‹ๅœฐๅ€:\nhttps://ad.oceanengine.com/openapi/appid/list.html?rid=7ag3hu8nekn#/external/\n" + "็™ปๅฝ•ๅŽ็‚นAPPID็ฎก็†--->็‚นๅ‡ปtest้‚ฃไธช็Œซ--->็‚นๅ‡ปไธ‹ๆ–น็š„'็‚นๅ‡ป่ทณ่ฝฌ'-->ๅฎŒๆˆๆŽˆๆƒ\n่ดฆๆˆท๏ผšqjwl1@gooddian.cn\n" + "ๅฏ†็ ๏ผšGd123456!", DefaultEmailAddress.SENDTODev,"้ฃž้ฑผ้”€ๅ”ฎ็บฟ็ดขๆœชๆŽˆๆƒ๏ผ")); log.info("==================็ผ“ๅญ˜็š„tokenๅคฑๆ•ˆ=====้œ€้‡ๆ–ฐๆŽˆๆƒ๏ผ================"); } } }
[ "704378949@qq.com" ]
704378949@qq.com
531e5cdd734d39cb798eed98817ec7c0d6d16e39
f15889af407de46a94fd05f6226c66182c6085d0
/callosumemr/src/main/java/com/nas/recovery/web/action/appointment/AppointmentAction.java
eed03dbf5497f5ce08f1b547fbc527d57620fd72
[]
no_license
oreon/sfcode-full
231149f07c5b0b9b77982d26096fc88116759e5b
bea6dba23b7824de871d2b45d2a51036b88d4720
refs/heads/master
2021-01-10T06:03:27.674236
2015-04-27T10:23:10
2015-04-27T10:23:10
55,370,912
0
0
null
null
null
null
UTF-8
Java
false
false
1,228
java
package com.nas.recovery.web.action.appointment; import java.util.ArrayList; import java.util.List; import javax.faces.event.ValueChangeEvent; import javax.faces.model.SelectItem; import javax.persistence.EntityManager; import org.hibernate.Criteria; import org.hibernate.criterion.Restrictions; import org.apache.commons.lang.StringUtils; import org.jboss.seam.ScopeType; import org.jboss.seam.annotations.Scope; import org.jboss.seam.annotations.Begin; import org.jboss.seam.annotations.End; import org.jboss.seam.annotations.Factory; import org.jboss.seam.annotations.In; import org.jboss.seam.annotations.Logger; import org.jboss.seam.annotations.Name; import org.jboss.seam.annotations.Out; import org.jboss.seam.Component; import org.jboss.seam.security.Identity; import org.jboss.seam.annotations.datamodel.DataModel; import org.jboss.seam.annotations.datamodel.DataModelSelection; import org.jboss.seam.faces.FacesMessages; import org.jboss.seam.log.Log; import org.jboss.seam.annotations.Observer; //@Scope(ScopeType.CONVERSATION) @Name("appointmentAction") public class AppointmentAction extends AppointmentActionBase implements java.io.Serializable{ }
[ "singhj@38423737-2f20-0410-893e-9c0ab9ae497d" ]
singhj@38423737-2f20-0410-893e-9c0ab9ae497d
bdc951717aae4aef617d589838f2f04bfd75691e
45d58ad7e0af7cf0ec69ee218b0ba46da81c2abd
/src/java/org/apache/fop/datatypes/ValidationPercentBaseContext.java
6349fc4d16757f9ddb20f9cc6079514b0cbf82a0
[ "Apache-2.0" ]
permissive
balabit-deps/balabit-os-7-fop
48cc73bfb90a83329d4e8041bf1c622884df8a08
3ff623f6752a0550998528362469857048ccb324
refs/heads/master
2020-04-07T09:11:06.972556
2018-11-07T15:43:56
2018-11-07T15:43:56
158,243,262
0
0
null
null
null
null
UTF-8
Java
false
false
2,169
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* $Id: ValidationPercentBaseContext.java 1617052 2014-08-10 06:55:01Z gadams $ */ package org.apache.fop.datatypes; import org.apache.fop.fo.FObj; /** * This base context is used during validation when the actual base values are still unknown * but should still already be checked. The actual value returned is not so important in this * case. But it's important that zero and non-zero values can be distinguished. * <p> * Example: A table with collapsing border model has no padding. The Table FO should be able * to check if non-zero values (even percentages) have been specified. */ public final class ValidationPercentBaseContext implements PercentBaseContext { /** * Main constructor. */ private ValidationPercentBaseContext() { } /** * Returns the value for the given lengthBase. * {@inheritDoc} */ public int getBaseLength(int lengthBase, FObj fobj) { //Simply return a dummy value which produces a non-zero value when a non-zero percentage //was specified. return 100000; } private static PercentBaseContext pseudoContextForValidation = new ValidationPercentBaseContext(); /** @return a base context for validation purposes. See class description. */ public static PercentBaseContext getPseudoContext() { return pseudoContextForValidation; } }
[ "testbot@balabit.com" ]
testbot@balabit.com
3cf2ef4f2adcd6c62473514b35f71c973663c4d7
9aeb261d951d7efd9511184ed38c9caa0a3cd59f
/src/main/java/com/android/tools/r8/naming/identifiernamestring/ClassForNameIdentifierNameStringLookupResult.java
5785d0a64b92ec3a845e61df207a0c10f9903c5c
[ "BSD-3-Clause", "MIT", "Apache-2.0", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-unknown-license-reference" ]
permissive
veryriskyrisk/r8
70bbac0692fcdd7106721015d82d898654ba404a
c4e4ae59b83f3d913c34c55e90000a4756cfe65f
refs/heads/master
2023-03-22T03:51:56.548646
2021-03-17T16:53:58
2021-03-18T09:00:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
795
java
// Copyright (c) 2020, the R8 project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. package com.android.tools.r8.naming.identifiernamestring; import com.android.tools.r8.graph.DexType; import com.android.tools.r8.utils.InternalOptions; public class ClassForNameIdentifierNameStringLookupResult extends IdentifierNameStringTypeLookupResult { ClassForNameIdentifierNameStringLookupResult(DexType type) { super(type); } @Override public boolean isTypeInitializedFromUse() { return true; } @Override public boolean isTypeCompatInstantiatedFromUse(InternalOptions options) { return options.isForceProguardCompatibilityEnabled(); } }
[ "christofferqa@google.com" ]
christofferqa@google.com
d38d0fe2e104d9cc0efc77ec8b2623907975359a
b7f3edb5b7c62174bed808079c3b21fb9ea51d52
/chrome/test/android/javatests/src/org/chromium/chrome/test/pagecontroller/controllers/notifications/DownloadNotificationController.java
248bd4504556a7b27893317e94f53521ee3fb393
[ "BSD-3-Clause" ]
permissive
otcshare/chromium-src
26a7372773b53b236784c51677c566dc0ad839e4
64bee65c921db7e78e25d08f1e98da2668b57be5
refs/heads/webml
2023-03-21T03:20:15.377034
2020-11-16T01:40:14
2020-11-16T01:40:14
209,262,645
18
21
BSD-3-Clause
2023-03-23T06:20:07
2019-09-18T08:52:07
null
UTF-8
Java
false
false
1,398
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.test.pagecontroller.controllers.notifications; import org.chromium.chrome.test.pagecontroller.controllers.PageController; import org.chromium.chrome.test.pagecontroller.utils.IUi2Locator; import org.chromium.chrome.test.pagecontroller.utils.Ui2Locators; /** * Download Permissions Dialog (download for offline viewing) Page Controller. */ public class DownloadNotificationController extends PageController { private static final IUi2Locator LOCATOR_DOWNLOAD_NOTIFICATION = Ui2Locators.withTextContaining("needs storage access to download files"); private static final IUi2Locator LOCATOR_CONTINUE = Ui2Locators.withAnyResEntry(android.R.id.button1); private static final DownloadNotificationController sInstance = new DownloadNotificationController(); private DownloadNotificationController() {} public static DownloadNotificationController getInstance() { return sInstance; } public void clickContinue() { mUtils.click(LOCATOR_CONTINUE); } @Override public DownloadNotificationController verifyActive() { mLocatorHelper.verifyOnScreen(LOCATOR_DOWNLOAD_NOTIFICATION); return this; } }
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
1ab1c3234c91736e24381684c2cee3fc184455ac
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project38/src/test/java/org/gradle/test/performance38_4/Test38_385.java
20dc32a99c4dc57cc8ae372b3179059568e5c342
[]
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.performance38_4; import static org.junit.Assert.*; public class Test38_385 { private final Production38_385 production = new Production38_385("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
d60dbebc4d489da2aa254beb2fe7d28072f6b912
c992cc664787167313fb4d317f172e8b057b1f5b
/modules/ui-widgets/src/main/java/io/jmix/ui/widgets/client/addons/dragdroplayouts/ui/VDDLayoutStateDragImageProvider.java
6ebb845d868efb5a49367874d1eb79b218d0fdd2
[ "Apache-2.0" ]
permissive
alexbudarov/jmix
42628ce00a2a67bac7f4113a7e642d5a67c38197
23272dc3d6cb1f1a9826edbe888b3c993ab22d85
refs/heads/master
2020-12-19T15:57:38.886284
2020-01-23T10:06:16
2020-01-23T10:06:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,687
java
/* * Copyright 2015 John Ahlroos * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package io.jmix.ui.widgets.client.addons.dragdroplayouts.ui; import com.google.gwt.dom.client.Element; import com.google.gwt.user.client.ui.Widget; import io.jmix.ui.widgets.client.addons.dragdroplayouts.ui.interfaces.DDLayoutState; import io.jmix.ui.widgets.client.addons.dragdroplayouts.ui.interfaces.VDragImageProvider; import com.vaadin.client.ComponentConnector; import com.vaadin.client.ConnectorMap; import com.vaadin.client.Util; import com.vaadin.shared.Connector; public class VDDLayoutStateDragImageProvider implements VDragImageProvider { private final DDLayoutState state; public VDDLayoutStateDragImageProvider(DDLayoutState state) { this.state = state; } @Override public Element getDragImageElement(Widget w) { ComponentConnector component = Util.findConnectorFor(w); Connector dragImage = state.referenceImageComponents.get(component); if (dragImage != null) { return ConnectorMap.get(component.getConnection()) .getElement(dragImage.getConnectorId()); } return null; } }
[ "minaev@haulmont.com" ]
minaev@haulmont.com
2eedebb1df8b91c8d37f97aad06e23103e62ae29
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE81_XSS_Error_Message/CWE81_XSS_Error_Message__Servlet_listen_tcp_81_base.java
baa2631f20821fa2632e8b9ca96dc50c8b15a154
[]
no_license
bqcuong/Juliet-Test-Case
31e9c89c27bf54a07b7ba547eddd029287b2e191
e770f1c3969be76fdba5d7760e036f9ba060957d
refs/heads/master
2020-07-17T14:51:49.610703
2019-09-03T16:22:58
2019-09-03T16:22:58
206,039,578
1
2
null
null
null
null
UTF-8
Java
false
false
871
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE81_XSS_Error_Message__Servlet_listen_tcp_81_base.java Label Definition File: CWE81_XSS_Error_Message__Servlet.label.xml Template File: sources-sink-81_base.tmpl.java */ /* * @description * CWE: 81 Cross Site Scripting (XSS) in Error Message * BadSource: listen_tcp Read data using a listening tcp connection * GoodSource: A hardcoded string * Sinks: sendErrorServlet * BadSink : XSS in sendError * Flow Variant: 81 Data flow: data passed in a parameter to an abstract method * * */ package testcases.CWE81_XSS_Error_Message; import testcasesupport.*; import javax.servlet.http.*; public abstract class CWE81_XSS_Error_Message__Servlet_listen_tcp_81_base { public abstract void action(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable; }
[ "bqcuong2212@gmail.com" ]
bqcuong2212@gmail.com
b6cd0418719f18dc23c1deea4c8b6ad782419396
dfac1eb4ac647b96f311a7cdd07dec558a209bd6
/src/com/zjxjwxk/leetcode/_0725_Split_Linked_List_in_Parts/SolutionTest.java
60015720b0cd8cedfe38c0753108339d42b5a195
[]
no_license
zjxjwxk/LeetCode
7f8e91edb23b24bbedbff6cca49c32e4e3bd78bf
99a8a17fa1417b066bbd204ab7170fdcb5295532
refs/heads/master
2023-08-25T18:46:11.137419
2023-08-15T08:10:45
2023-08-15T08:10:45
141,663,719
0
0
null
null
null
null
UTF-8
Java
false
false
1,267
java
package com.zjxjwxk.leetcode._0725_Split_Linked_List_in_Parts; import com.zjxjwxk.leetcode.util.DSFactory; import com.zjxjwxk.leetcode.util.ListNode; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; class SolutionTest { private final Solution solution = new Solution(); @Test void splitListToParts1() { ListNode head = DSFactory.newLinkedList(new int[]{ 1, 2, 3 }); int k = 5; ListNode[] ans = { DSFactory.newLinkedList(new int[]{1}), DSFactory.newLinkedList(new int[]{2}), DSFactory.newLinkedList(new int[]{3}), null, null }; assertArrayEquals(ans, solution.splitListToParts(head, k)); } @Test void splitListToParts2() { ListNode head = DSFactory.newLinkedList(new int[]{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }); int k = 3; ListNode[] ans = { DSFactory.newLinkedList(new int[]{1, 2, 3, 4}), DSFactory.newLinkedList(new int[]{5, 6 ,7}), DSFactory.newLinkedList(new int[]{8, 9, 10}) }; assertArrayEquals(ans, solution.splitListToParts(head, k)); } }
[ "zjxjwxk@gmail.com" ]
zjxjwxk@gmail.com
f18efa563dc96a042b2791d7911326d40e7ce267
eb9f655206c43c12b497c667ba56a0d358b6bc3a
/platform/testFramework/bootstrap/src/com/intellij/tests/IgnoreException.java
9721ec7c7af9335a09bf70280bf3191e09140641
[ "Apache-2.0" ]
permissive
JetBrains/intellij-community
2ed226e200ecc17c037dcddd4a006de56cd43941
05dbd4575d01a213f3f4d69aa4968473f2536142
refs/heads/master
2023-09-03T17:06:37.560889
2023-09-03T11:51:00
2023-09-03T12:12:27
2,489,216
16,288
6,635
Apache-2.0
2023-09-12T07:41:58
2011-09-30T13:33:05
null
UTF-8
Java
false
false
1,262
java
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.tests; import org.junit.AssumptionViolatedException; import java.lang.reflect.Method; import java.util.List; public class IgnoreException extends Exception { public static final IgnoreException INSTANCE = new IgnoreException(); private static final String MULTIPLE_FAILURES_ERROR = "org.opentest4j.MultipleFailuresError"; private IgnoreException() { } public static boolean isIgnoringThrowable(Throwable throwable) { if (throwable instanceof AssumptionViolatedException) return true; if (throwable instanceof IgnoreException) return true; if (throwable.getClass().getName().equals(MULTIPLE_FAILURES_ERROR)) { try { Method getFailuresMethod = Class.forName(MULTIPLE_FAILURES_ERROR).getDeclaredMethod("getFailures"); @SuppressWarnings("unchecked") List<Throwable> failures = (List<Throwable>)getFailuresMethod.invoke(throwable); for (Throwable failure : failures) { if (isIgnoringThrowable(failure)) return true; } } catch (Throwable e) { return false; } } return false; } }
[ "intellij-monorepo-bot-no-reply@jetbrains.com" ]
intellij-monorepo-bot-no-reply@jetbrains.com
5400fd57a63f3e74ceb3f696f10c07d969038515
1591b38d9b7fb8ef3e16c79f32980cb3b6e04fa2
/examples/hostCardEmulationClient/src/main/java/com/github/skjolber/nfc/external/hceclient/EchoHostAdpuServiceActivity.java
0b70b9926fbf206261c35be4025ffbcbe069977c
[ "Apache-2.0" ]
permissive
imartinezortiz/external-nfc-api
4dd7a5df40b8678a7591bd0edbf5c8c353c6fe56
e98aa670f656219151b2bbf25b51cbaa0de92280
refs/heads/master
2022-04-09T12:56:47.104520
2020-03-25T10:13:42
2020-03-25T10:13:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,292
java
package com.github.skjolber.nfc.external.hceclient; import android.app.AlertDialog; import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; import android.content.res.Configuration; import android.net.Uri; import android.nfc.NfcAdapter; import android.nfc.cardemulation.CardEmulation; import android.os.Bundle; import android.preference.PreferenceManager; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.TextView; import com.github.skjolber.nfc.util.Broadcast; /** * * Activity for this app to echo the HCE service using internal NFC. * */ public class EchoHostAdpuServiceActivity extends DialogActivity { private static String TAG = EchoHostAdpuServiceActivity.class.getName(); private boolean receiving = false; private final BroadcastReceiver hostCardEmulationBroadcastReceiver = new BroadcastReceiver() { public void onReceive(Context context, final Intent intent) { String action = intent.getAction(); if (Broadcast.HOST_CARD_EMULATION_ACTION_PROCESS_COMMAND_ADPU.equals(action)) { final byte[] command = intent.getByteArrayExtra(Broadcast.HOST_CARD_EMULATION_EXTRA_COMMAND); final byte[] response = intent.getByteArrayExtra(Broadcast.HOST_CARD_EMULATION_EXTRA_RESPONSE); runOnUiThread(new Runnable() { public void run() { TextView textView = (TextView) findViewById(R.id.text); textView.setText(textView.getText() + " <- " + EchoHostApduService.toHexString(command) + "\n -> " + EchoHostApduService.toHexString(response) + "\n"); } }); } else if (Broadcast.HOST_CARD_EMULATION_ACTION_DEACTIVATED.equals(action)) { runOnUiThread(new Runnable() { public void run() { TextView textView = (TextView) findViewById(R.id.text); textView.setText(textView.getText() + "Deactivated (tag lost or IsoDep.close() called)" + "\n"); } }); } else if ("android.intent.action.MAIN".equals(action)) { // ignore } else throw new IllegalArgumentException("Unexpected action " + action); } }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); PreferenceManager.setDefaultValues(this, R.xml.preferences, false); setContentView(R.layout.activity_main); CardEmulation cardEmulation = CardEmulation.getInstance(NfcAdapter.getDefaultAdapter(this)); boolean defaultService = cardEmulation.isDefaultServiceForAid(new ComponentName(this, EchoHostApduService.class), EchoHostApduService.AID); if (!defaultService) { Log.w(TAG, "Expected default service for AID " + EchoHostApduService.AID); } Log.d(TAG, "Service AID is " + EchoHostApduService.AID); enableBroadcast(); showHelpfulDialog(); Intent intent = getIntent(); hostCardEmulationBroadcastReceiver.onReceive(this, getIntent()); } private void showHelpfulDialog() { final AlertDialog.Builder alert = new AlertDialog.Builder(this); alert.setTitle(R.string.dialogTitle); alert.setMessage(R.string.dialogMessage); alert.setNegativeButton(R.string.dialogClose, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); return; } }); final AlertDialog dialog = alert.create(); dialog.setCanceledOnTouchOutside(true); dialog.setCancelable(true); // back button show(dialog); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } public void enableBroadcast() { if (!receiving) { IntentFilter serviceFilter = new IntentFilter(); serviceFilter.addAction(Broadcast.HOST_CARD_EMULATION_ACTION_PROCESS_COMMAND_ADPU); serviceFilter.addAction(Broadcast.HOST_CARD_EMULATION_ACTION_DEACTIVATED); registerReceiver(hostCardEmulationBroadcastReceiver, serviceFilter); receiving = true; } } public void disableBroadcast() { if (receiving) { unregisterReceiver(hostCardEmulationBroadcastReceiver); receiving = false; } } public void showHelp(View view) { String url = "https://developer.android.com/guide/topics/connectivity/nfc/hce.html#ScreenOffBehavior"; Intent i = new Intent(Intent.ACTION_VIEW); i.setData(Uri.parse(url)); startActivity(i); } public void clear(View view) { TextView textView = (TextView) findViewById(R.id.text); textView.setText(""); } @Override protected void onDestroy() { disableBroadcast(); super.onDestroy(); } @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.menu_server: { Intent intent = new Intent(this, HceInvokerActivity.class); startActivity(intent); return true; } case R.id.action_preferences: { Intent intent = new Intent(this, PreferencesActivity.class); startActivity(intent); return true; } default: return super.onOptionsItemSelected(item); } } }
[ "thomas.skjolberg@gmail.com" ]
thomas.skjolberg@gmail.com
facdf70b8a96fde18e203401c57ee7f2a13451cb
319a371ab83c04a9a2466b0ec1e2a67b93fa7f2f
/zj-xm-salary/src/main/java/com/apih5/mybatis/dao/ZjXmJxPeripheryScoreDetailedMapper.java
1109ee6c6c09c608e59193370908acfb37d4dde2
[]
no_license
zhangrenyi666/apih5-2
0232faa65e2968551d55db47fb35f689e5a03996
afd9b7d574fab11410aab5e0465a0bd706bcf942
refs/heads/master
2023-08-01T13:11:51.678508
2021-09-10T05:52:34
2021-09-10T05:52:34
406,647,352
0
0
null
null
null
null
UTF-8
Java
false
false
1,786
java
package com.apih5.mybatis.dao; import java.util.List; import java.util.Map; import com.apih5.mybatis.pojo.ZjXmJxPeripheryScoreDetailed; public interface ZjXmJxPeripheryScoreDetailedMapper { int deleteByPrimaryKey(String key); int insert(ZjXmJxPeripheryScoreDetailed record); int insertSelective(ZjXmJxPeripheryScoreDetailed record); ZjXmJxPeripheryScoreDetailed selectByPrimaryKey(String key); int updateByPrimaryKeySelective(ZjXmJxPeripheryScoreDetailed record); int updateByPrimaryKey(ZjXmJxPeripheryScoreDetailed record); List<ZjXmJxPeripheryScoreDetailed> selectByZjXmJxPeripheryScoreDetailedList(ZjXmJxPeripheryScoreDetailed record); List<ZjXmJxPeripheryScoreDetailed> getZjXmJxPeripheryScoreDetailedList(ZjXmJxPeripheryScoreDetailed record); int batchDeleteUpdateZjXmJxPeripheryScoreDetailed(List<ZjXmJxPeripheryScoreDetailed> recordList, ZjXmJxPeripheryScoreDetailed record); int batchInsertZjXmJxPeripheryScoreDetailed(List<ZjXmJxPeripheryScoreDetailed> recordList); int batchUpdateZjXmJxPeripheryScoreDetailedByReviewer(List<ZjXmJxPeripheryScoreDetailed> recordList); int countZjXmJxPeripheryScoreDetailedList(ZjXmJxPeripheryScoreDetailed record); List<ZjXmJxPeripheryScoreDetailed> getZjXmJxPeripheryScoreDetailedReviewerByTime( ZjXmJxPeripheryScoreDetailed record); List<ZjXmJxPeripheryScoreDetailed> getZjXmJxPeripheryScoreDetailedListBySystem(ZjXmJxPeripheryScoreDetailed record); List<ZjXmJxPeripheryScoreDetailed> getZjXmJxPeripheryScoreDetailedListByReviewer( ZjXmJxPeripheryScoreDetailed record); List<ZjXmJxPeripheryScoreDetailed> getZjXmJxPeripheryScoreDetailedAllAuditee(ZjXmJxPeripheryScoreDetailed record); List<Map<String, Object>> getZjXmJxPeripheryScoreDetailedPeripheryExcel(ZjXmJxPeripheryScoreDetailed record); }
[ "2267843676@qq.com" ]
2267843676@qq.com
44cc7391c15225b226ffbe370e4bfe21acb91a03
1d8cadbe702d2f23f68f09ce668528cd44ccb2c8
/domino-ui/src/main/java/org/dominokit/domino/ui/modals/DefaultZIndexManager.java
6bd963bb34c0e0651caf01da4c90fc1a929f7ca7
[ "Apache-2.0" ]
permissive
mamta/domino-ui
1f2c438c11ffe98efc576a8b29477e36ded2611e
39ce3e679ddae269b847d236c6d6a1065d3b1cb1
refs/heads/master
2023-06-24T15:32:24.613806
2023-03-21T09:07:59
2023-03-21T09:07:59
202,545,464
0
0
Apache-2.0
2019-11-29T08:45:07
2019-08-15T13:24:32
Java
UTF-8
Java
false
false
3,349
java
/* * Copyright ยฉ 2019 Dominokit * * 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.dominokit.domino.ui.modals; import static java.util.Objects.isNull; import static java.util.Objects.nonNull; import static org.dominokit.domino.ui.utils.DominoElement.body; import java.util.*; import org.dominokit.domino.ui.utils.DominoUIConfig; import org.dominokit.domino.ui.utils.IsPopup; public class DefaultZIndexManager implements ZIndexManager { private Integer currentZIndex; private static Deque<IsPopup<?>> modals = new LinkedList<>(); private final List<ZIndexListener> listeners = new ArrayList<>(); /** * {@inheritDoc} * * @return The next z-index starting from {@link DominoUIConfig#getInitialZIndex()} and * incremented by {@link DominoUIConfig#getZindexIncrement()} with every call */ @Override public Integer getNextZIndex() { if (isNull(currentZIndex)) { this.currentZIndex = DominoUIConfig.INSTANCE.getInitialZIndex(); } currentZIndex += DominoUIConfig.INSTANCE.getZindexIncrement(); return currentZIndex; } /** * {@inheritDoc} Also attach the modal backdrop if not attached * * @param popup the popup to be shown next */ @Override public void onPopupOpen(IsPopup<?> popup) { if (popup.isModal()) { Integer nextZIndex = getNextZIndex(); ModalBackDrop.INSTANCE.setZIndex(nextZIndex); if (!ModalBackDrop.INSTANCE.isAttached()) { body().appendChild(ModalBackDrop.INSTANCE); } modals.push(popup); } Integer nextZIndex = getNextZIndex(); popup.setZIndex(nextZIndex); listeners.forEach( listener -> listener.onZIndexChange(new ZIndexListener.ZIndexInfo(popup, modals))); } /** * {@inheritDoc} Also remove the modal backdrop when modal remain open * * @param popup the popup to be closed */ @Override public void onPopupClose(IsPopup<?> popup) { if (popup.isModal()) { modals.remove(popup); if (!modals.isEmpty()) { Integer backdropZIndex = getNextZIndex(); ModalBackDrop.INSTANCE.setZIndex(backdropZIndex); Integer modalZIndex = getNextZIndex(); modals.peek().setZIndex(modalZIndex); listeners.forEach( listener -> listener.onZIndexChange(new ZIndexListener.ZIndexInfo(modals.peek(), modals))); } else { ModalBackDrop.INSTANCE.remove(); } } } @Override public Optional<IsPopup<?>> getTopLevelModal() { return Optional.ofNullable(modals.peek()); } @Override public void addZIndexListener(ZIndexListener listener) { if (nonNull(listener)) { listeners.add(listener); } } @Override public void removeZIndexListener(ZIndexListener listener) { if (nonNull(listener)) { listeners.remove(listener); } } }
[ "ahmad.bawaneh@dominokit.com" ]
ahmad.bawaneh@dominokit.com
bc08479c6382ec687d427169c7a2c8db1e64e8d3
406856cc4bddfe155163998b13abbe60c0691a4d
/trunk/demonstrate-project/ddd-mybatis-project/infra/src/main/java/com/dayatang/domain/InstanceFactory.java
32561239280e52503cf846a73b408435b00cdd4c
[]
no_license
tylerchen/demonstrates
15368098ad121ac292646ff389bc744685321e90
2c9cc9bc7c30455e328b2e4aaac8efae2b51fe56
refs/heads/master
2020-04-05T23:14:05.153233
2018-09-13T03:34:19
2018-09-13T03:34:19
2,938,431
10
3
null
null
null
null
UTF-8
Java
false
false
4,335
java
package com.dayatang.domain; import java.util.HashMap; import java.util.Map; /** * ๅฎžไพ‹ๅทฅๅŽ‚็ฑปใ€‚้€š่ฟ‡ๅฎƒๅฏไปฅ่Žทๅพ—ๅ…ถ็ฎก็†็š„็ฑป็š„ๅฎžไพ‹ใ€‚ InstanceFactoryๅ‘ๅฎขๆˆทไปฃ็ ้š่—ไบ†IoCๅทฅๅŽ‚็š„ๅ…ทไฝ“ๅฎž็Žฐใ€‚ๅœจๅŽๅฐ๏ผŒๅฎƒ้€š่ฟ‡ * InstanceProvider็ญ–็•ฅๆŽฅๅฃ๏ผŒๅ…่ฎธ้€‰ๆ‹ฉไธๅŒ็š„IoCๅทฅๅŽ‚๏ผŒไพ‹ๅฆ‚Spring๏ผŒ Google Guiceๅ’ŒTapestryIoC็ญ‰็ญ‰ใ€‚ * IoCๅทฅๅŽ‚ๅบ”่ฏฅๅœจๅบ”็”จ็จ‹ๅบๅฏๅŠจๆ—ถ่ฃ…้…ๅฅฝ๏ผŒไนŸๅฐฑๆ˜ฏๆŠŠๅˆๅง‹ๅŒ–ๅฅฝ็š„InstanceProvider * ๅฎž็Žฐ็ฑปๆไพ›็ป™InstanceFactoryใ€‚ๅฏนไบŽwebๅบ”็”จๆฅ่ฏด๏ผŒๆœ€ไฝณ็š„ๅˆๅง‹ๅŒ–ๆ–นๅผๆ˜ฏๅˆ› * ๅปบไธ€ไธชServlet่ฟ‡ๆปคๅ™จๆˆ–็›‘ๅฌๅ™จ๏ผŒๅนถ้ƒจ็ฝฒๅˆฐweb.xml้‡Œ้ข๏ผ›ๅฏนๆ™ฎ้€šjavaๅบ”็”จ็จ‹ * ๅบๆฅ่ฏด๏ผŒๆœ€ไฝณ็š„ๅˆๅง‹ๅŒ–ไฝ็ฝฎๆ˜ฏๅœจmain()ๅ‡ฝๆ•ฐ้‡Œ้ข๏ผ›ๅฏนไบŽๅ•ๅ…ƒๆต‹่ฏ•๏ผŒๆœ€ไฝณ็š„ๅˆๅง‹ ๅŒ–ไฝ็ฝฎๆ˜ฏsetUp()ๆ–นๆณ•ๅ†…้ƒจใ€‚ * * * @author yyang * */ public class InstanceFactory { private static InstanceProvider instanceProvider; /** * ่ฎพ็ฝฎๅฎžไพ‹ๆไพ›่€…ใ€‚ * * @param provider * ไธ€ไธชๅฎžไพ‹ๆไพ›่€…็š„ๅฎžไพ‹ใ€‚ */ public static void setInstanceProvider(InstanceProvider provider) { instanceProvider = provider; } /** * ่Žทๅ–ๆŒ‡ๅฎš็ฑปๅž‹็š„ๅฏน่ฑกๅฎžไพ‹ใ€‚ๅฆ‚ๆžœIoCๅฎนๅ™จๆฒก้…็ฝฎๅฅฝๆˆ–่€…IoCๅฎนๅ™จไธญๆ‰พไธๅˆฐ่ฏฅ็ฑปๅž‹็š„ๅฎžไพ‹ๅˆ™ๆŠ›ๅ‡บๅผ‚ๅธธใ€‚ * * @param <T> * ๅฏน่ฑก็š„็ฑปๅž‹ * @param beanClass * ๅฏน่ฑก็š„็ฑป * @return ็ฑปๅž‹ไธบT็š„ๅฏน่ฑกๅฎžไพ‹ */ @SuppressWarnings("unchecked") public static <T> T getInstance(Class<T> beanClass) { T result = null; result = (T) instances.get(beanClass.getName()); if (result != null) { return result; } checkInstanceProviderExistance(); try { result = getInstanceProvider().getInstance(beanClass); } catch (Exception e) { throw new IllegalArgumentException("IoC container exception!", e); } if (result == null) { throw new IllegalArgumentException("There's not bean of type '" + beanClass + "' exists in IoC container!"); } return result; } /** * ่Žทๅ–ๆŒ‡ๅฎš็ฑปๅž‹็š„ๅฏน่ฑกๅฎžไพ‹ใ€‚ๅฆ‚ๆžœIoCๅฎนๅ™จๆฒก้…็ฝฎๅฅฝๆˆ–่€…IoCๅฎนๅ™จไธญๆ‰พไธๅˆฐ่ฏฅๅฎžไพ‹ๅˆ™ๆŠ›ๅ‡บๅผ‚ๅธธใ€‚ * * @param <T> * ๅฏน่ฑก็š„็ฑปๅž‹ * @param beanName * ๅฎž็Žฐ็ฑปๅœจๅฎนๅ™จไธญ้…็ฝฎ็š„ๅๅญ— * @param beanClass * ๅฏน่ฑก็š„็ฑป * @return ็ฑปๅž‹ไธบT็š„ๅฏน่ฑกๅฎžไพ‹ */ @SuppressWarnings("unchecked") public static <T> T getInstance(Class<T> beanClass, String beanName) { T result = (T) instances.get(toName(beanClass.getName(), beanName)); if (result != null) { return result; } checkInstanceProviderExistance(); try { result = getInstanceProvider().getInstance(beanClass, beanName); } catch (Exception e) { throw new IllegalArgumentException("IoC container exception!", e); } if (result == null) { throw new IllegalArgumentException("There's not bean '" + beanName + "' of type '" + beanClass + "' exists in IoC container!"); } return result; } /** * ่Žทๅ–ๅฎžไพ‹ๆไพ›่€…ใ€‚ * * @return ๅฎžไฝ“ๆไพ›่€…็š„ไธ€ไธชๅฎž็Žฐ็ฑปใ€‚ */ private static InstanceProvider getInstanceProvider() { return instanceProvider; } private static void checkInstanceProviderExistance() { if (instanceProvider == null) { throw new IllegalArgumentException( "No IoC instance provider exists!"); } } /** * ไปฅไธ‹้ƒจๅˆ†ไป…็”จไบŽๆไพ›ไปฃ็ ๆต‹่ฏ•ๅŠŸ่ƒฝ๏ผŒไบงๅ“ไปฃ็ ไธ่ฆ็”จ */ private static Map<String, Object> instances = new HashMap<String, Object>(); /** * ๅฐ†ๆœๅŠก็ป‘ๅฎšๅˆฐๅ…ทไฝ“ๅฎžไพ‹ * @param serviceInterface * @param serviceImplementation */ public static <T> void bind(Class<T> serviceInterface, T serviceImplementation) { instances.put(serviceInterface.getName(), serviceImplementation); } /** * ๅฐ†ๆœๅŠก็ป‘ๅฎšๅˆฐๅ…ทไฝ“ๅฎžไพ‹ๅนถๆŒ‡ๅฎšๅๅญ— * @param serviceInterface * @param serviceImplementation * @param beanName */ public static <T> void bind(Class<T> serviceInterface, T serviceImplementation, String beanName) { instances.put(toName(serviceInterface.getName(), beanName), serviceImplementation); } private static String toName(String className, String beanName) { return className + ":" + beanName; } /** * ๅˆคๆ–ญๆ˜ฏๅฆๅทฒ็ปๅˆๅง‹ๅŒ–๏ผŒไนŸๅฐฑๆ˜ฏ่ฎพ็ฝฎไบ†InstanceProvider * @return */ public static boolean isInitialized() { return instanceProvider != null; } }
[ "iffiff1@gmail.com" ]
iffiff1@gmail.com
8676d8d02357ad260cf08f52a5c23e788ba7f391
2eb5604c0ba311a9a6910576474c747e9ad86313
/chado-pg-orm/src/org/irri/iric/chado/so/Orf.java
84bd2addccc668cdfb50a8c90ccfec83073346b5
[]
no_license
iric-irri/portal
5385c6a4e4fd3e569f5334e541d4b852edc46bc1
b2d3cd64be8d9d80b52d21566f329eeae46d9749
refs/heads/master
2021-01-16T00:28:30.272064
2014-05-26T05:46:30
2014-05-26T05:46:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
369
java
package org.irri.iric.chado.so; // Generated 05 26, 14 1:32:25 PM by Hibernate Tools 3.4.0.CR1 /** * Orf generated by hbm2java */ public class Orf implements java.io.Serializable { private OrfId id; public Orf() { } public Orf(OrfId id) { this.id = id; } public OrfId getId() { return this.id; } public void setId(OrfId id) { this.id = id; } }
[ "locem@berting-debian.ourwebserver.no-ip.biz" ]
locem@berting-debian.ourwebserver.no-ip.biz
ff7896b44036e07ee094c7f128e01c5cafd27fbf
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/RT_News_com.rt.mobile.english/javafiles/android/support/transition/ViewUtils$1.java
812319c338ae73d3c7851c4043e8e961e3df7367
[ "MIT" ]
permissive
Andreas237/AndroidPolicyAutomation
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
refs/heads/master
2020-04-10T02:14:08.789751
2019-05-16T19:29:11
2019-05-16T19:29:11
160,739,088
5
1
null
null
null
null
UTF-8
Java
false
false
1,986
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) annotate safe package android.support.transition; import android.util.Property; import android.view.View; // Referenced classes of package android.support.transition: // ViewUtils static final class ViewUtils$1 extends Property { public Float get(View view) { return Float.valueOf(ViewUtils.getTransitionAlpha(view)); // 0 0:aload_1 // 1 1:invokestatic #18 <Method float ViewUtils.getTransitionAlpha(View)> // 2 4:invokestatic #24 <Method Float Float.valueOf(float)> // 3 7:areturn } public volatile Object get(Object obj) { return ((Object) (get((View)obj))); // 0 0:aload_0 // 1 1:aload_1 // 2 2:checkcast #27 <Class View> // 3 5:invokevirtual #29 <Method Float get(View)> // 4 8:areturn } public void set(View view, Float float1) { ViewUtils.setTransitionAlpha(view, float1.floatValue()); // 0 0:aload_1 // 1 1:aload_2 // 2 2:invokevirtual #35 <Method float Float.floatValue()> // 3 5:invokestatic #39 <Method void ViewUtils.setTransitionAlpha(View, float)> // 4 8:return } public volatile void set(Object obj, Object obj1) { set((View)obj, (Float)obj1); // 0 0:aload_0 // 1 1:aload_1 // 2 2:checkcast #27 <Class View> // 3 5:aload_2 // 4 6:checkcast #20 <Class Float> // 5 9:invokevirtual #42 <Method void set(View, Float)> // 6 12:return } ViewUtils$1(Class class1, String s) { super(class1, s); // 0 0:aload_0 // 1 1:aload_1 // 2 2:aload_2 // 3 3:invokespecial #11 <Method void Property(Class, String)> // 4 6:return } }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
812b57a3e59603846ae77425e0ecb120be228a45
27ebd68f113d1fd6045d65e3475289b286c2cdc5
/temp/src/minecraft_server/net/minecraft/block/BlockCactus.java
2814773ec8381a3f64a9abc641e5cdbe9e873b1c
[]
no_license
EvilKanoa/KClient
1959a4b4cdcb659c356a3ee0ee2a8cb6469c9bc9
0003f5a8b86d6866140cc6be8d2dc6e13f7ce810
refs/heads/master
2021-01-20T23:16:47.776753
2014-08-19T22:10:15
2014-08-19T22:10:15
23,127,153
0
1
null
null
null
null
UTF-8
Java
false
false
3,795
java
package net.minecraft.block; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.world.World; public class BlockCactus extends Block { private static final String __OBFID = "CL_00000210"; protected BlockCactus() { super(Material.field_151570_A); this.func_149675_a(true); this.func_149647_a(CreativeTabs.field_78031_c); } public void func_149674_a(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_) { if(p_149674_1_.func_147437_c(p_149674_2_, p_149674_3_ + 1, p_149674_4_)) { int var6; for(var6 = 1; p_149674_1_.func_147439_a(p_149674_2_, p_149674_3_ - var6, p_149674_4_) == this; ++var6) { ; } if(var6 < 3) { int var7 = p_149674_1_.func_72805_g(p_149674_2_, p_149674_3_, p_149674_4_); if(var7 == 15) { p_149674_1_.func_147449_b(p_149674_2_, p_149674_3_ + 1, p_149674_4_, this); p_149674_1_.func_72921_c(p_149674_2_, p_149674_3_, p_149674_4_, 0, 4); this.func_149695_a(p_149674_1_, p_149674_2_, p_149674_3_ + 1, p_149674_4_, this); } else { p_149674_1_.func_72921_c(p_149674_2_, p_149674_3_, p_149674_4_, var7 + 1, 4); } } } } public AxisAlignedBB func_149668_a(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_) { float var5 = 0.0625F; return AxisAlignedBB.func_72332_a().func_72299_a((double)((float)p_149668_2_ + var5), (double)p_149668_3_, (double)((float)p_149668_4_ + var5), (double)((float)(p_149668_2_ + 1) - var5), (double)((float)(p_149668_3_ + 1) - var5), (double)((float)(p_149668_4_ + 1) - var5)); } public boolean func_149686_d() { return false; } public boolean func_149662_c() { return false; } public int func_149645_b() { return 13; } public boolean func_149742_c(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_) { return !super.func_149742_c(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_)?false:this.func_149718_j(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_); } public void func_149695_a(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_) { if(!this.func_149718_j(p_149695_1_, p_149695_2_, p_149695_3_, p_149695_4_)) { p_149695_1_.func_147480_a(p_149695_2_, p_149695_3_, p_149695_4_, true); } } public boolean func_149718_j(World p_149718_1_, int p_149718_2_, int p_149718_3_, int p_149718_4_) { if(p_149718_1_.func_147439_a(p_149718_2_ - 1, p_149718_3_, p_149718_4_).func_149688_o().func_76220_a()) { return false; } else if(p_149718_1_.func_147439_a(p_149718_2_ + 1, p_149718_3_, p_149718_4_).func_149688_o().func_76220_a()) { return false; } else if(p_149718_1_.func_147439_a(p_149718_2_, p_149718_3_, p_149718_4_ - 1).func_149688_o().func_76220_a()) { return false; } else if(p_149718_1_.func_147439_a(p_149718_2_, p_149718_3_, p_149718_4_ + 1).func_149688_o().func_76220_a()) { return false; } else { Block var5 = p_149718_1_.func_147439_a(p_149718_2_, p_149718_3_ - 1, p_149718_4_); return var5 == Blocks.field_150434_aF || var5 == Blocks.field_150354_m; } } public void func_149670_a(World p_149670_1_, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity p_149670_5_) { p_149670_5_.func_70097_a(DamageSource.field_76367_g, 1.0F); } }
[ "kanoa@kanoa.ca" ]
kanoa@kanoa.ca
1f134bc57a3ee1f0d19c58e9112989871a2346d5
1f8498c886dedd9cd9cb5296f25a5a4962abb6d4
/stack-client/src/main/java/com/inductiveautomation/opcua/stack/client/fsm/states/DisconnectedState.java
5994190599afa9816d742d040e5244a6addc231b
[ "Apache-2.0" ]
permissive
doutdex/opc-ua-stack
ea6c98f6ee92b48ee3f8778c75b37bcb5c221044
a577af239a255a9de784ceded1be5b638aaccefa
refs/heads/master
2021-01-17T21:53:09.912599
2015-02-16T14:28:09
2015-02-16T14:28:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,422
java
package com.inductiveautomation.opcua.stack.client.fsm.states; import java.util.concurrent.CompletableFuture; import com.inductiveautomation.opcua.stack.client.UaTcpClient; import com.inductiveautomation.opcua.stack.client.fsm.ConnectionStateContext; import com.inductiveautomation.opcua.stack.client.fsm.ConnectionStateEvent; import io.netty.channel.Channel; public class DisconnectedState implements ConnectionState { private final CompletableFuture<Channel> channelFuture = new CompletableFuture<>(); @Override public ConnectionState transition(ConnectionStateEvent event, ConnectionStateContext context) { switch (event) { case ConnectRequested: CompletableFuture<Channel> channelFuture = UaTcpClient.bootstrap(context.getClient()); channelFuture.whenCompleteAsync((ch, ex) -> { if (ch != null) { context.handleEvent(ConnectionStateEvent.ConnectSuccess); } else { context.handleEvent(ConnectionStateEvent.ConnectFailure); } }, context.getClient().getExecutorService()); return new ConnectingState(channelFuture); default: return context.getState(); } } @Override public CompletableFuture<Channel> getChannelFuture() { return channelFuture; } }
[ "kevinherron@gmail.com" ]
kevinherron@gmail.com
a4febf779baad28d13cbd428246f720be3dcd596
bf7b4c21300a8ccebb380e0e0a031982466ccd83
/middlewareConcepts2014-master/Assignment3/lib/jacorb-3.4/src/generated/org/omg/PortableServer/POAManagerFactoryHolder.java
fd733e8a6b5d4cbb1e94f4acfdc4f9340b77331f
[]
no_license
Puriakshat/Tuberlin
3fe36b970aabad30ed95e8a07c2f875e4912a3db
28dcf7f7edfe7320c740c306b1c0593a6c1b3115
refs/heads/master
2021-01-19T07:30:16.857479
2014-11-06T18:49:16
2014-11-06T18:49:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
774
java
package org.omg.PortableServer; /** * Generated from IDL interface "POAManagerFactory". * * @author JacORB IDL compiler V @project.version@ * @version generated at 27-May-2014 20:14:30 */ public final class POAManagerFactoryHolder implements org.omg.CORBA.portable.Streamable{ public POAManagerFactory value; public POAManagerFactoryHolder() { } public POAManagerFactoryHolder (final POAManagerFactory initial) { value = initial; } public org.omg.CORBA.TypeCode _type() { return POAManagerFactoryHelper.type(); } public void _read (final org.omg.CORBA.portable.InputStream in) { value = POAManagerFactoryHelper.read (in); } public void _write (final org.omg.CORBA.portable.OutputStream _out) { POAManagerFactoryHelper.write (_out,value); } }
[ "puri.akshat@gmail.com" ]
puri.akshat@gmail.com
e38fd94030e103ce7e279270ccd39145505c8830
0487b3aa560fb587dca5d0c1978a6adf60e2a03e
/plugins/gradle/src/org/jetbrains/plugins/gradle/action/AbstractGradleLinkedProjectAction.java
7f228ee17aa5dc44e7b5e7faffa2d99f5f5d554d
[ "Apache-2.0" ]
permissive
serso/intellij-community
c09ed9ce0b00340cb58a7fb7fa7cf280896ac1bf
f7e8ad45f6b987c1c7940bb8a667086d1b554365
refs/heads/master
2021-01-15T17:59:53.752302
2012-11-08T12:59:30
2012-11-08T12:59:51
6,597,019
1
0
null
null
null
null
UTF-8
Java
false
false
2,155
java
package org.jetbrains.plugins.gradle.action; import com.intellij.openapi.actionSystem.*; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Pair; import com.intellij.openapi.util.text.StringUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.plugins.gradle.config.GradleSettings; import java.io.File; /** * Common super class for gradle actions that require {@link GradleSettings#getLinkedProjectPath()} linked project}. * <p/> * Not thread-safe. * * @author Denis Zhdanov * @since 1/31/12 5:36 PM */ public abstract class AbstractGradleLinkedProjectAction extends AnAction { @Override public void update(AnActionEvent e) { final Pair<Project, String> pair = deriveProjects(e.getDataContext()); final boolean visible = pair != null; e.getPresentation().setVisible(visible); if (!visible) { return; } doUpdate(e.getPresentation(), pair.first, pair.second); } @Override public void actionPerformed(AnActionEvent e) { final Project project = PlatformDataKeys.PROJECT.getData(e.getDataContext()); if (project == null) { return; } final Pair<Project, String> pair = deriveProjects(e.getDataContext()); if (pair == null) { e.getPresentation().setVisible(false); return; } doActionPerformed(project, pair.second); } @Nullable private static Pair<Project, String> deriveProjects(@Nullable DataContext context) { if (context == null) { return null; } final Project project = PlatformDataKeys.PROJECT.getData(context); if (project == null) { return null; } final String path = GradleSettings.getInstance(project).getLinkedProjectPath(); if (StringUtil.isEmpty(path) || !new File(path).isFile()) { return null; } return new Pair<Project, String>(project, path); } protected abstract void doUpdate(@NotNull Presentation presentation, @NotNull Project project, @NotNull String linkedProjectPath); protected abstract void doActionPerformed(@NotNull Project project, @NotNull String linkedProjectPath); }
[ "Denis.Zhdanov@jetbrains.com" ]
Denis.Zhdanov@jetbrains.com
58f85ac7b8d42948ea2f53057ab1afaa32bde9a9
0290374216c09b3b8a914f24351114d4262353ac
/aliyun-java-sdk-cms/src/main/java/com/aliyuncs/cms/model/v20190101/DescribeMonitorGroupInstanceAttributeResponse.java
a3083915ed974c137d62d4f25f2318b709c6285a
[ "Apache-2.0" ]
permissive
tanglong8848/aliyun-openapi-java-sdk
7ab06933afb468648d6eaefd0388f371cf066273
c01b826b7957745890439702c86832d956ca752b
refs/heads/master
2020-05-22T12:17:55.556803
2019-05-10T10:15:51
2019-05-10T10:15:51
186,335,507
1
0
null
2019-05-13T02:58:49
2019-05-13T02:58:49
null
UTF-8
Java
false
false
5,808
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.cms.model.v20190101; import java.util.List; import com.aliyuncs.AcsResponse; import com.aliyuncs.cms.transform.v20190101.DescribeMonitorGroupInstanceAttributeResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class DescribeMonitorGroupInstanceAttributeResponse extends AcsResponse { private String requestId; private Boolean success; private Integer code; private String message; private Integer pageNumber; private Integer pageSize; private Integer total; private List<Resource> resources; public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public Boolean getSuccess() { return this.success; } public void setSuccess(Boolean success) { this.success = success; } public Integer getCode() { return this.code; } public void setCode(Integer code) { this.code = code; } public String getMessage() { return this.message; } public void setMessage(String message) { this.message = message; } public Integer getPageNumber() { return this.pageNumber; } public void setPageNumber(Integer pageNumber) { this.pageNumber = pageNumber; } public Integer getPageSize() { return this.pageSize; } public void setPageSize(Integer pageSize) { this.pageSize = pageSize; } public Integer getTotal() { return this.total; } public void setTotal(Integer total) { this.total = total; } public List<Resource> getResources() { return this.resources; } public void setResources(List<Resource> resources) { this.resources = resources; } public static class Resource { private String instanceName; private String instanceId; private String desc; private String networkType; private String category; private String dimension; private List<Tag> tags; private Region region; private Vpc vpc; public String getInstanceName() { return this.instanceName; } public void setInstanceName(String instanceName) { this.instanceName = instanceName; } public String getInstanceId() { return this.instanceId; } public void setInstanceId(String instanceId) { this.instanceId = instanceId; } public String getDesc() { return this.desc; } public void setDesc(String desc) { this.desc = desc; } public String getNetworkType() { return this.networkType; } public void setNetworkType(String networkType) { this.networkType = networkType; } public String getCategory() { return this.category; } public void setCategory(String category) { this.category = category; } public String getDimension() { return this.dimension; } public void setDimension(String dimension) { this.dimension = dimension; } public List<Tag> getTags() { return this.tags; } public void setTags(List<Tag> tags) { this.tags = tags; } public Region getRegion() { return this.region; } public void setRegion(Region region) { this.region = region; } public Vpc getVpc() { return this.vpc; } public void setVpc(Vpc vpc) { this.vpc = vpc; } public static class Tag { private String key; private String value; public String getKey() { return this.key; } public void setKey(String key) { this.key = key; } public String getValue() { return this.value; } public void setValue(String value) { this.value = value; } } public static class Region { private String regionId; private String availabilityZone; public String getBizRegionId() { return this.regionId; } public void setBizRegionId(String regionId) { this.regionId = regionId; } /** * @deprecated use getBizRegionId instead of this. */ @Deprecated public String getRegionId() { return this.regionId; } /** * @deprecated use setBizRegionId instead of this. */ @Deprecated public void setRegionId(String regionId) { this.regionId = regionId; } public String getAvailabilityZone() { return this.availabilityZone; } public void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; } } public static class Vpc { private String vpcInstanceId; private String vswitchInstanceId; public String getVpcInstanceId() { return this.vpcInstanceId; } public void setVpcInstanceId(String vpcInstanceId) { this.vpcInstanceId = vpcInstanceId; } public String getVswitchInstanceId() { return this.vswitchInstanceId; } public void setVswitchInstanceId(String vswitchInstanceId) { this.vswitchInstanceId = vswitchInstanceId; } } } @Override public DescribeMonitorGroupInstanceAttributeResponse getInstance(UnmarshallerContext context) { return DescribeMonitorGroupInstanceAttributeResponseUnmarshaller.unmarshall(this, context); } }
[ "haowei.yao@alibaba-inc.com" ]
haowei.yao@alibaba-inc.com
6d27a4d1ce292e85de46946f4ca3ea1b6c7afccf
d40ae6dca13e6be7c914f6a9fc3539b3ea201a7d
/extensions/robospice-spring-android-parent/robospice-spring-android-test/src/com/octo/android/robospice/springandroid/test/model/xml/Forecast.java
f813f008568037a8a3e40baea66935b05a4d66a3
[ "Apache-2.0" ]
permissive
hakan42/robospice
f8fabfe3dc54699b5c4fe25597d1293aabdb68b3
a93ee5d7ee6c565ec72995614de93a8808292920
refs/heads/master
2021-01-17T05:26:00.163051
2013-01-02T15:54:25
2013-01-02T15:54:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,354
java
package com.octo.android.robospice.springandroid.test.model.xml; import java.util.List; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; public class Forecast { private int id; @Element private String date; @ElementList(inline = true) private List< Day > listDay; @Element private String day_max_temp; @ElementList(inline = true) private List< Night > listNight; @Element private String night_min_temp; @Element private String temp_unit; public String getDate() { return this.date; } public void setDate( String date ) { this.date = date; } public List< Day > getDay() { return this.listDay; } public void setDay( List< Day > day ) { this.listDay = day; } public String getDay_max_temp() { return this.day_max_temp; } public void setDay_max_temp( String day_max_temp ) { this.day_max_temp = day_max_temp; } public List< Night > getNight() { return this.listNight; } public void setNight( List< Night > night ) { this.listNight = night; } public String getNight_min_temp() { return this.night_min_temp; } public void setNight_min_temp( String night_min_temp ) { this.night_min_temp = night_min_temp; } public String getTemp_unit() { return this.temp_unit; } public void setTemp_unit( String temp_unit ) { this.temp_unit = temp_unit; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ( date == null ? 0 : date.hashCode() ); result = prime * result + ( day_max_temp == null ? 0 : day_max_temp.hashCode() ); result = prime * result + id; result = prime * result + ( listDay == null ? 0 : listDay.hashCode() ); result = prime * result + ( listNight == null ? 0 : listNight.hashCode() ); result = prime * result + ( night_min_temp == null ? 0 : night_min_temp.hashCode() ); result = prime * result + ( temp_unit == null ? 0 : temp_unit.hashCode() ); return result; } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } if ( obj == null ) { return false; } if ( getClass() != obj.getClass() ) { return false; } Forecast other = (Forecast) obj; if ( date == null ) { if ( other.date != null ) { return false; } } else if ( !date.equals( other.date ) ) { return false; } if ( day_max_temp == null ) { if ( other.day_max_temp != null ) { return false; } } else if ( !day_max_temp.equals( other.day_max_temp ) ) { return false; } if ( id != other.id ) { return false; } if ( listDay == null ) { if ( other.listDay != null ) { return false; } } else if ( !listDay.equals( other.listDay ) ) { return false; } if ( listNight == null ) { if ( other.listNight != null ) { return false; } } else if ( !listNight.equals( other.listNight ) ) { return false; } if ( night_min_temp == null ) { if ( other.night_min_temp != null ) { return false; } } else if ( !night_min_temp.equals( other.night_min_temp ) ) { return false; } if ( temp_unit == null ) { if ( other.temp_unit != null ) { return false; } } else if ( !temp_unit.equals( other.temp_unit ) ) { return false; } return true; } @Override public String toString() { return "Forecast [date=" + date + ", day=" + listDay + ", day_max_temp=" + day_max_temp + ", night=" + listNight + ", night_min_temp=" + night_min_temp + ", temp_unit=" + temp_unit + "]"; } }
[ "steff.nicolas@gmail.com" ]
steff.nicolas@gmail.com
00151120d6e1516bac2b78562604d93053114a5a
13c68c3dc922acfb8171ab7418451156ab8ea0c5
/app/build/generated/source/r/debug/com/alibaba/android/vlayout/R.java
bce6aa595062f9defbdacd710de4250ab21446ee
[]
no_license
sceneren/yuntx_sdk_new_ui
d94ca530759c7682b20a72c7e612ec9a6cdb70ea
9e6ffcd03ab022e0bc680d5e95057886a3a79b6c
refs/heads/master
2020-06-10T08:19:13.122557
2019-06-25T02:46:02
2019-06-25T02:46:02
193,621,948
0
1
null
null
null
null
UTF-8
Java
false
false
1,265
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * gradle plugin from the resource data it found. It * should not be modified by hand. */ package com.alibaba.android.vlayout; public final class R { public static final class attr { public static final int layoutManager = 0x7f010076; public static final int reverseLayout = 0x7f010078; public static final int spanCount = 0x7f010077; public static final int stackFromEnd = 0x7f010079; } public static final class dimen { public static final int item_touch_helper_max_drag_scroll_per_frame = 0x7f0900be; } public static final class id { public static final int item_touch_helper_previous_elevation = 0x7f0f0010; } public static final class styleable { public static final int[] RecyclerView = { 0x010100c4, 0x7f010076, 0x7f010077, 0x7f010078, 0x7f010079 }; public static final int RecyclerView_android_orientation = 0; public static final int RecyclerView_layoutManager = 1; public static final int RecyclerView_reverseLayout = 3; public static final int RecyclerView_spanCount = 2; public static final int RecyclerView_stackFromEnd = 4; } }
[ "renjunjia1@163.com" ]
renjunjia1@163.com
73624b1c90b9be8c493caa08d9b996dc64f1ad95
00cb65b1c597ac9dcfb5777d9c2a53df4afb6fe0
/src/main/java/org/folio/cataloging/dao/persistence/IndexListKey.java
37d77e919dab89ce7224b704505594e3cb112738
[ "Apache-2.0" ]
permissive
cchiama/mod-cataloging
35bb6d7a74cff436ce3482038eaad56bd3a2386c
03033567e708400fd9596cd79493bca503e1cca2
refs/heads/master
2020-03-28T17:00:51.976674
2018-09-20T13:24:17
2018-09-20T13:24:17
148,750,798
0
0
null
2018-09-14T07:17:23
2018-09-14T07:17:23
null
UTF-8
Java
false
false
2,127
java
/* * (c) LibriCore * * Created on Jul 20, 2004 * * IndexListKey.java */ package org.folio.cataloging.dao.persistence; import java.io.Serializable; import java.util.Locale; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * Hibernate key class for IDX_LIST table * @author paulm * @version %I%, %G% * @since 1.0 */ public class IndexListKey implements Serializable { private static final Pattern p = Pattern.compile("(\\d+)(.+)"); //digits then the rest private int keyNumber; private String typeCode; private String language; /** * Class constructor * * * @since 1.0 */ public IndexListKey() { } /** * Uses regexp to isolate the digits (group 1) from the rest (group 2) * Class constructor * * @param key a concatenation of keyNumber and typeCode as used in BrowseManager's * Maps * @since 1.0 */ public IndexListKey(String key) { Matcher m = p.matcher(key); m.find(); setKeyNumber(Integer.parseInt(m.group(1))); setTypeCode(m.group(2)); setLanguage(Locale.ENGLISH.getISO3Language()); } public int getKeyNumber() { return keyNumber; } public String getTypeCode() { return typeCode; } public void setKeyNumber(int i) { keyNumber = i; } public void setTypeCode(String string) { typeCode = string; } /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object anObject) { IndexListKey aKey = (IndexListKey)anObject; if (this.getKeyNumber() == aKey.getKeyNumber()) { if (this.getTypeCode().compareTo(aKey.getTypeCode()) == 0){ return true; } } return false; } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ public int hashCode() { return this.getKeyNumber(); } /** * * * @return * @exception * @see * @since 1.0 */ public String getLanguage() { return language; } /** * * * @param string * @exception * @see * @since 1.0 */ public void setLanguage(String string) { language = string; } }
[ "a.gazzarini@gmail.com" ]
a.gazzarini@gmail.com
ba80f3703af0305d9e72f2a435ebc363aa7a8684
22b1fe6a0af8ab3c662551185967bf2a6034a5d2
/experimenting-rounds/massive-count-of-annotated-classes/src/main/java/fr/javatronic/blog/massive/annotation2/Class_751.java
717aa06851bb8082c98e722cf7ca0fdf86c03500
[ "Apache-2.0" ]
permissive
lesaint/experimenting-annotation-processing
b64ed2182570007cb65e9b62bb2b1b3f69d168d6
1e9692ceb0d3d2cda709e06ccc13290262f51b39
refs/heads/master
2021-01-23T11:20:19.836331
2014-11-13T10:37:14
2014-11-13T10:37:14
26,336,984
1
0
null
null
null
null
UTF-8
Java
false
false
145
java
package fr.javatronic.blog.massive.annotation2; import fr.javatronic.blog.processor.Annotation_002; @Annotation_002 public class Class_751 { }
[ "sebastien.lesaint@gmail.com" ]
sebastien.lesaint@gmail.com
ceb39161ef36e695606229866c4d5a26fd5fd05b
9004c7b5e7086ab0f53d40d3ac9feae80fa3d1b9
/src/main/java/me/dags/copy/PlayerManager.java
059735902f6ff4495cc255d58b3e6055f6e52bc9
[]
no_license
dags-/CopyPasta
9bf8ab4f97aec071db9d4125688a1959acb92621
d42d6c33b1ea1314a200cbcdad50a1b3a7a8f07e
refs/heads/master
2021-06-07T04:35:58.108319
2020-09-01T21:14:18
2020-09-01T21:14:18
90,264,705
0
2
null
null
null
null
UTF-8
Java
false
false
2,959
java
package me.dags.copy; import java.nio.file.Path; import java.util.HashMap; import java.util.Map; import java.util.Optional; import java.util.UUID; import java.util.function.Function; import me.dags.copy.util.Utils; import me.dags.copy.util.fmt; import org.spongepowered.api.Sponge; import org.spongepowered.api.config.ConfigRoot; import org.spongepowered.api.entity.living.player.Player; import org.spongepowered.api.event.cause.Cause; import org.spongepowered.api.event.cause.EventContext; import org.spongepowered.api.event.cause.EventContextKeys; import org.spongepowered.api.plugin.PluginContainer; /** * @author dags <dags@dags.me> */ public class PlayerManager { private static final PlayerManager INSTANCE = new PlayerManager(); private final Path userDir; private final PluginContainer container; private final Function<UUID, PlayerData> factory; private final Map<UUID, PlayerData> data = new HashMap<>(); private PlayerManager() { PluginContainer plugin = Sponge.getPluginManager().getPlugin(CopyPasta.ID).orElseThrow(IllegalStateException::new); Object instance = plugin.getInstance().orElseThrow(IllegalStateException::new); ConfigRoot root = Sponge.getGame().getConfigManager().getPluginConfig(instance); container = plugin; userDir = Utils.getDir(root.getDirectory(), "users"); factory = uuid -> new PlayerData(userDir.resolve(uuid + ".conf")); } public PlayerData must(Player player) { return data.computeIfAbsent(player.getUniqueId(), factory); } public Optional<PlayerData> get(Player player) { return get(player.getUniqueId()); } public Optional<PlayerData> get(UUID uuid) { return Optional.ofNullable(data.get(uuid)); } public void drop(Player player) { drop(player.getUniqueId()); } public void drop(UUID uuid) { PlayerData playerData = data.remove(uuid); if (playerData != null) { playerData.save(); } } public void handle(Player player, Throwable t) { handle(player.getUniqueId(), t); } public void handle(UUID uuid, Throwable t) { PlayerData playerData = data.get(uuid); if (playerData != null) { playerData.setOperating(false); CopyPasta.getInstance().submitSync(() -> { t.printStackTrace(); Sponge.getServer().getPlayer(uuid) .ifPresent(fmt.warn("An error occurred: %s, see console", t.getClass().getSimpleName())::tell); }); } } public Cause getCause(Player player) { EventContext context = EventContext.builder() .add(EventContextKeys.NOTIFIER, player) .add(EventContextKeys.OWNER, player) .build(); return Cause.of(context, container); } public static PlayerManager getInstance() { return INSTANCE; } }
[ "dags@dags.me" ]
dags@dags.me
8c847e28b5e9df815bcd33d3115013c2e60c0c79
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_498/Testnull_49798.java
f274cdfaa155cf3d3804e992539c7ce40228f15f
[]
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
308
java
package org.gradle.test.performancenull_498; import static org.junit.Assert.*; public class Testnull_49798 { private final Productionnull_49798 production = new Productionnull_49798("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
7620d29ab45fb6304b97335de8e9cf6248091daa
097df92ce1bfc8a354680725c7d10f0d109b5b7d
/com/amazon/ws/emr/hadoop/fs/shaded/com/amazonaws/services/dynamodbv2/endpointdiscovery/AmazonDynamoDBEndpointCacheLoader.java
4f8b8fad4413de945da21f60abca40556bd00e79
[]
no_license
cozos/emrfs-hadoop
7a1a1221ffc3aa8c25b1067cf07d3b46e39ab47f
ba5dfa631029cb5baac2f2972d2fdaca18dac422
refs/heads/master
2022-10-14T15:03:51.500050
2022-10-06T05:38:49
2022-10-06T05:38:49
233,979,996
2
2
null
2022-10-06T05:41:46
2020-01-15T02:24:16
Java
UTF-8
Java
false
false
1,705
java
package com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.dynamodbv2.endpointdiscovery; import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.cache.CacheLoader; import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.dynamodbv2.AmazonDynamoDB; import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.dynamodbv2.model.DescribeEndpointsRequest; import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.dynamodbv2.model.DescribeEndpointsResult; import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.dynamodbv2.model.Endpoint; import java.util.HashMap; import java.util.List; import java.util.Map; public class AmazonDynamoDBEndpointCacheLoader implements CacheLoader<String, Map<String, String>> { private final AmazonDynamoDB client; public AmazonDynamoDBEndpointCacheLoader(AmazonDynamoDB client) { this.client = client; } public Map<String, String> load(String key) { DescribeEndpointsResult response = client.describeEndpoints(new DescribeEndpointsRequest()); List<Endpoint> endpoints = response.getEndpoints(); if ((endpoints == null) || (endpoints.size() == 0)) { return null; } Endpoint endpoint = (Endpoint)endpoints.get(0); Map<String, String> endpointDetail = new HashMap(); endpointDetail.put("CachePeriod", String.valueOf(endpoint.getCachePeriodInMinutes())); endpointDetail.put("Endpoint", endpoint.getAddress()); return endpointDetail; } } /* Location: * Qualified Name: com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.dynamodbv2.endpointdiscovery.AmazonDynamoDBEndpointCacheLoader * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "Arwin.tio@adroll.com" ]
Arwin.tio@adroll.com
0f52c4a11b4a176f4a421f80449af648a17c1a15
963a2d17f03a6c18a120687b03f9a624b78a7423
/crux-dev/src/main/java/org/cruxframework/crux/core/client/screen/RootViewContainer.java
9dee6a60a34413965612b2f03fe831349ac8e11f
[]
no_license
MiskaRoming/crux
3f3026ec20d87d2808846dc10ea00c0d4479c496
03c02cc10866d6509112b7b5a5f577ff6e9aedf3
refs/heads/master
2021-01-24T15:33:31.007204
2015-06-02T18:08:42
2015-06-02T18:08:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,257
java
/* * Copyright 2011 cruxframework.org. * * 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.cruxframework.crux.core.client.screen; import org.cruxframework.crux.core.client.screen.views.SingleViewContainer; import org.cruxframework.crux.core.client.screen.views.View; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.Panel; import com.google.gwt.user.client.ui.RootPanel; /** * @author Thiago da Rosa de Bustamante * */ class RootViewContainer extends SingleViewContainer { private Panel containerPanel; private View rootView; public RootViewContainer() { super(null, true); containerPanel = RootPanel.get(); bindToDOM(); } public View getView() { return rootView; } @Override protected boolean doAdd(View view, boolean lazy, Object parameter) { assert(views.isEmpty()):"RootViewContainer can not contain more then one view"; rootView = view; boolean added = super.doAdd(view, lazy, parameter); if (!added) {//During view creation, a widget can make a reference to Screen static methods... So, it is better to // set rootView reference before widgets creation... rootView = null; } return added; } @Override protected boolean doRemove(View view, boolean skipEvents) { boolean removed = super.doRemove(view, skipEvents); if (removed) { rootView = null; } return removed; } @Override protected Panel getContainerPanel(View view) { return getContainerPanel(); } protected Panel getContainerPanel() { return containerPanel; } @Override protected void handleViewTitle(String title, Panel containerPanel, String viewId) { Window.setTitle(title); } }
[ "thiago@cruxframework.org" ]
thiago@cruxframework.org
0cbce173b773089ca12071a7462e8ff8c958173c
a4082921471f4a22f59b6698aef54900317f5709
/01SourceCode/lambda-mls/lambda-portal/src/main/java/com/yatop/lambda/portal/job/controller/JobController.java
37346925370af31811d86e7dde9030fa0f131e84
[]
no_license
P79N6A/lambda-xxoo
3aae11893a78ce863a4f96b821a500dcb7f35500
75c41019282d53eaa59aaa220e6fff49a337d01f
refs/heads/master
2020-04-29T07:35:36.491014
2019-03-16T10:34:03
2019-03-16T10:34:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,696
java
package com.yatop.lambda.portal.job.controller; import com.yatop.lambda.portal.common.annotation.Log; import com.yatop.lambda.portal.common.controller.BaseController; import com.yatop.lambda.portal.common.domain.QueryRequest; import com.yatop.lambda.portal.common.exception.PortalException; import com.yatop.lambda.portal.job.domain.Job; import com.yatop.lambda.portal.job.service.JobService; import com.wuwenze.poi.ExcelKit; import lombok.extern.slf4j.Slf4j; import org.apache.shiro.authz.annotation.RequiresPermissions; //import org.quartz.CronExpression; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; import javax.validation.constraints.NotBlank; import java.util.List; import java.util.Map; @Slf4j //@Validated //@RestController //@RequestMapping("job") public class JobController extends BaseController { private String message; /*@Autowired private JobService jobService; @GetMapping @RequiresPermissions("job:view") public Map<String, Object> jobList(QueryRequest request, Job job) { return super.selectByPageNumSize(request, () -> this.jobService.findJobs(request, job)); } @GetMapping("cron/check") public boolean checkCron(String cron) { try { return CronExpression.isValidExpression(cron); } catch (Exception e) { return false; } } @Log("ๆ–ฐๅขžๅฎšๆ—ถไปปๅŠก") @PostMapping @RequiresPermissions("job:add") public void addJob(@Valid Job job) throws PortalException { try { this.jobService.createJob(job); } catch (Exception e) { message = "ๆ–ฐๅขžๅฎšๆ—ถไปปๅŠกๅคฑ่ดฅ"; log.error(message, e); throw new PortalException(message); } } @Log("ๅˆ ้™คๅฎšๆ—ถไปปๅŠก") @DeleteMapping("/{jobIds}") @RequiresPermissions("job:delete") public void deleteJob(@NotBlank(message = "{required}") @PathVariable String jobIds) throws PortalException { try { String[] ids = jobIds.split(","); this.jobService.deleteJobs(ids); } catch (Exception e) { message = "ๅˆ ้™คๅฎšๆ—ถไปปๅŠกๅคฑ่ดฅ"; log.error(message, e); throw new PortalException(message); } } @Log("ไฟฎๆ”นๅฎšๆ—ถไปปๅŠก") @PutMapping @RequiresPermissions("job:update") public void updateJob(@Valid Job job) throws PortalException { try { this.jobService.updateJob(job); } catch (Exception e) { message = "ไฟฎๆ”นๅฎšๆ—ถไปปๅŠกๅคฑ่ดฅ"; log.error(message, e); throw new PortalException(message); } } @Log("ๆ‰ง่กŒๅฎšๆ—ถไปปๅŠก") @GetMapping("run/{jobId}") @RequiresPermissions("job:run") public void runJob(@NotBlank(message = "{required}") @PathVariable String jobId) throws PortalException { try { this.jobService.run(jobId); } catch (Exception e) { message = "ๆ‰ง่กŒๅฎšๆ—ถไปปๅŠกๅคฑ่ดฅ"; log.error(message, e); throw new PortalException(message); } } @Log("ๆš‚ๅœๅฎšๆ—ถไปปๅŠก") @GetMapping("pause/{jobId}") @RequiresPermissions("job:pause") public void pauseJob(@NotBlank(message = "{required}") @PathVariable String jobId) throws PortalException { try { this.jobService.pause(jobId); } catch (Exception e) { message = "ๆš‚ๅœๅฎšๆ—ถไปปๅŠกๅคฑ่ดฅ"; log.error(message, e); throw new PortalException(message); } } @Log("ๆขๅคๅฎšๆ—ถไปปๅŠก") @GetMapping("resume/{jobId}") @RequiresPermissions("job:resume") public void resumeJob(@NotBlank(message = "{required}") @PathVariable String jobId) throws PortalException { try { this.jobService.resume(jobId); } catch (Exception e) { message = "ๆขๅคๅฎšๆ—ถไปปๅŠกๅคฑ่ดฅ"; log.error(message, e); throw new PortalException(message); } } @PostMapping("excel") @RequiresPermissions("job:export") public void export(Job job, QueryRequest request, HttpServletResponse response) throws PortalException { try { List<Job> jobs = this.jobService.findJobs(request, job); ExcelKit.$Export(Job.class, response).downXlsx(jobs, false); } catch (Exception e) { message = "ๅฏผๅ‡บExcelๅคฑ่ดฅ"; log.error(message, e); throw new PortalException(message); } }*/ }
[ "tomlee714@126.com" ]
tomlee714@126.com
f0f28e7f50706eebc8b869daeca238d1a2418cac
768f506ef2a4bd9099dda9e7e4a51679dea7efa5
/stc05.studentsMVC-master/src/main/controllers/HelloServlet.java
a92a03d96ab2fcd8dcf410dab05565f2a546201b
[]
no_license
wohan/PracticeAdapterObserver-master
a5a211dace48931d1598a3dd8a9183f4238a6cf2
a68c963792e79dbd029c72f15c55fbddf024d8cc
refs/heads/master
2021-01-20T12:23:13.548655
2017-05-05T09:10:44
2017-05-05T09:10:44
90,357,992
0
0
null
null
null
null
UTF-8
Java
false
false
841
java
package main.controllers; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; /** * Created by admin on 18.04.2017. */ public class HelloServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { //resp.getWriter().print("lalala"); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/login.jsp"); dispatcher.forward(req, resp); } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { super.doPost(req, resp); } }
[ "you@example.com" ]
you@example.com
9e1cb2078b7026afc2a2ec6f3bf4cd46a4353398
ff3dfce1e20ad81adcd57c706d975d8a47151882
/src/Ship.java
418f9788179e40c9b676b1cdd84e0e9a1d19b7a8
[]
no_license
Keos99/MySeaBattle
c33c4158a83e7d4d80045377bcaade32ff94b809
8046767a0454ced47804bb4c9370fa8903f54e92
refs/heads/master
2020-06-27T11:34:01.145627
2017-08-15T20:24:15
2017-08-15T20:24:15
97,043,391
0
0
null
null
null
null
UTF-8
Java
false
false
1,273
java
/** * Created by Keos99 on 15.06.2017. */ public class Ship { private int decknum = 0; // ะšะพะปะธั‡ะตัั‚ะฒะพ ะฟะฐะปัƒะฑ private int count = 0; // ะกั‡ะตั‚ั‡ะธะบ Field field; Verification verifi; void shipGeneration(Field field, Verification verifi, char[][] gamefield) { int decknum; int count; int shipnumber = 0; for (decknum = 4; decknum > 0; decknum--) { shipnumber++; for (count = 4; count >= decknum; count--) { do { field.setRandomDirection(); field.setRandomYX(decknum); field.readCells(decknum, field.getRandomY(), field.getRandomX(), field.getRandomDirection(),gamefield); } while (verifi.isCellEmpty(field.returncelltc(), decknum)); field.placeShip(decknum, field.getRandomY(), field.getRandomX(), field.getRandomDirection(),gamefield); field.indent(decknum, field.getRandomY(), field.getRandomX(), field.getRandomDirection(),gamefield); System.out.println("ะšะพั€ะฐะฑะปัŒ โ„– " + shipnumber + ", c " + decknum + " ะฟะฐะปัƒะฑะฐะผะธ, ะทะฐะฝัะป ัะฒะพะต ะผะตัั‚ะพ!"); } } System.out.println(); } }
[ "keos99@bk.ru" ]
keos99@bk.ru
09775e90550c7a9ce6e16ebbd302cd9c1a6efbb4
6b63ef1bf7bf75b90d520c2b16d7f74bf8358ceb
/ResearchPortlet/src/th/ac/kmutt/research/form/PositionMasterForm.java
b7b0c15fb7df5ec1ec7f71abac6d69108e40f99e
[]
no_license
GJ-jirayu/Kmutt-Research
868ec5d28e68a930d9d267ca733c91eadab108be
e5c929e7b609d9ef3477a8be1e7954de63ffce80
refs/heads/master
2021-01-17T10:23:49.339311
2016-06-15T10:54:52
2016-06-15T10:54:52
58,120,639
3
1
null
null
null
null
UTF-8
Java
false
false
747
java
package th.ac.kmutt.research.form; import java.io.Serializable; import th.ac.kmutt.research.model.PositionM; public class PositionMasterForm extends CommonForm implements Serializable { /** * */ private static final long serialVersionUID = 1L; /** * */ private PositionM positionM; public PositionMasterForm(PositionM positionM) { super(); this.positionM = positionM; } public PositionMasterForm() { super(); positionM = new PositionM(); // TODO Auto-generated constructor stub } public PositionM getPositionM() { return positionM; } public void setPositionM(PositionM positionM) { this.positionM = positionM; } }
[ "wirun@goingjesse.com" ]
wirun@goingjesse.com
dfa975a65eb4699557ece73cd0a4460acd614fbc
97fd02f71b45aa235f917e79dd68b61c62b56c1c
/src/main/java/com/tencentcloudapi/dasb/v20191018/models/ResetUserResponse.java
c1d13473533dfb0cf151bbb62c5d6f44500881b1
[ "Apache-2.0" ]
permissive
TencentCloud/tencentcloud-sdk-java
7df922f7c5826732e35edeab3320035e0cdfba05
09fa672d75e5ca33319a23fcd8b9ca3d2afab1ec
refs/heads/master
2023-09-04T10:51:57.854153
2023-09-01T03:21:09
2023-09-01T03:21:09
129,837,505
537
317
Apache-2.0
2023-09-13T02:42:03
2018-04-17T02:58:16
Java
UTF-8
Java
false
false
2,433
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.tencentcloudapi.dasb.v20191018.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class ResetUserResponse extends AbstractModel{ /** * ๅ”ฏไธ€่ฏทๆฑ‚ ID๏ผŒๆฏๆฌก่ฏทๆฑ‚้ƒฝไผš่ฟ”ๅ›žใ€‚ๅฎšไฝ้—ฎ้ข˜ๆ—ถ้œ€่ฆๆไพ›่ฏฅๆฌก่ฏทๆฑ‚็š„ RequestIdใ€‚ */ @SerializedName("RequestId") @Expose private String RequestId; /** * Get ๅ”ฏไธ€่ฏทๆฑ‚ ID๏ผŒๆฏๆฌก่ฏทๆฑ‚้ƒฝไผš่ฟ”ๅ›žใ€‚ๅฎšไฝ้—ฎ้ข˜ๆ—ถ้œ€่ฆๆไพ›่ฏฅๆฌก่ฏทๆฑ‚็š„ RequestIdใ€‚ * @return RequestId ๅ”ฏไธ€่ฏทๆฑ‚ ID๏ผŒๆฏๆฌก่ฏทๆฑ‚้ƒฝไผš่ฟ”ๅ›žใ€‚ๅฎšไฝ้—ฎ้ข˜ๆ—ถ้œ€่ฆๆไพ›่ฏฅๆฌก่ฏทๆฑ‚็š„ RequestIdใ€‚ */ public String getRequestId() { return this.RequestId; } /** * Set ๅ”ฏไธ€่ฏทๆฑ‚ ID๏ผŒๆฏๆฌก่ฏทๆฑ‚้ƒฝไผš่ฟ”ๅ›žใ€‚ๅฎšไฝ้—ฎ้ข˜ๆ—ถ้œ€่ฆๆไพ›่ฏฅๆฌก่ฏทๆฑ‚็š„ RequestIdใ€‚ * @param RequestId ๅ”ฏไธ€่ฏทๆฑ‚ ID๏ผŒๆฏๆฌก่ฏทๆฑ‚้ƒฝไผš่ฟ”ๅ›žใ€‚ๅฎšไฝ้—ฎ้ข˜ๆ—ถ้œ€่ฆๆไพ›่ฏฅๆฌก่ฏทๆฑ‚็š„ RequestIdใ€‚ */ public void setRequestId(String RequestId) { this.RequestId = RequestId; } public ResetUserResponse() { } /** * NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, * and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. */ public ResetUserResponse(ResetUserResponse source) { if (source.RequestId != null) { this.RequestId = new String(source.RequestId); } } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "RequestId", this.RequestId); } }
[ "tencentcloudapi@tencent.com" ]
tencentcloudapi@tencent.com
c86580dc8d0395a3e006f6eaa6f461680850ea0e
f7def0ab5b7bfbb0f2f9fbb989238f09bf18a93f
/servlet/src/test/java/io/undertow/servlet/test/listener/request/async/onError/AsyncServlet3.java
8dd8b49205c6087291662cf31acf5d031ef81327
[ "Apache-2.0" ]
permissive
stuartwdouglas/undertow
9f12ead5426c05b7414dac33b66663fc8112298d
1609b26b67030f9ca5a62869f5088087f2d1ecbf
refs/heads/master
2023-01-11T00:33:15.464202
2020-07-28T06:26:37
2020-07-28T06:26:37
5,106,225
1
1
Apache-2.0
2020-07-30T11:07:44
2012-07-19T06:22:19
Java
UTF-8
Java
false
false
1,551
java
/* * JBoss, Home of Professional Open Source. * Copyright 2014 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.undertow.servlet.test.listener.request.async.onError; import java.io.IOException; import javax.servlet.AsyncContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class AsyncServlet3 extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { final AsyncContext ctx = req.startAsync(); ctx.addListener(new SimpleAsyncListener()); ctx.addListener(new AsyncEventListener()); Thread thread = new Thread(new Runnable() { @Override public void run() { ctx.dispatch("/async2"); } }); thread.start(); } }
[ "stuart.w.douglas@gmail.com" ]
stuart.w.douglas@gmail.com
bf1b86e640fa952673aea33f9ed360ab8a1a2f25
3913a14e2cc38ffc08f5ac46b47494170ed451dd
/java/src/main/java/com/ibm/watson/data/client/model/SearchResultCategories.java
f057e88072d08ae42e4480d9d725e2740147f6db
[ "Apache-2.0" ]
permissive
samirvikash/watson-data-api-clients
0c143e16ebe7b94f4c643c4748d8e641562e56a6
a871aad7d4189ea28b04c2887a63592ae24034fd
refs/heads/master
2023-06-12T09:27:41.854074
2021-05-24T10:05:44
2021-05-24T10:05:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,124
java
/* * Copyright 2020 IBM Corp. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.ibm.watson.data.client.model; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Objects; /** * SearchResultCategories */ public class SearchResultCategories { private List<String> secondaryCategoryIds; private Long lastUpdatedAt; private List<String> secondaryCategoryGlobalIds; private String primaryCategoryGlobalId; private String primaryCategoryId; private String primaryCategoryName; private List<String> secondaryCategoryNames; public SearchResultCategories secondaryCategoryIds(List<String> secondaryCategoryIds) { this.secondaryCategoryIds = secondaryCategoryIds; return this; } @javax.annotation.Nullable @JsonProperty("secondary_category_ids") @JsonInclude(value = JsonInclude.Include.NON_NULL) public List<String> getSecondaryCategoryIds() { return secondaryCategoryIds; } public void setSecondaryCategoryIds(List<String> secondaryCategoryIds) { this.secondaryCategoryIds = secondaryCategoryIds; } public SearchResultCategories lastUpdatedAt(Long lastUpdatedAt) { this.lastUpdatedAt = lastUpdatedAt; return this; } @javax.annotation.Nullable @JsonProperty("last_updated_at") @JsonInclude(value = JsonInclude.Include.NON_NULL) public Long getLastUpdatedAt() { return lastUpdatedAt; } public void setLastUpdatedAt(Long lastUpdatedAt) { this.lastUpdatedAt = lastUpdatedAt; } public SearchResultCategories secondaryCategoryGlobalIds(List<String> secondaryCategoryGlobalIds) { this.secondaryCategoryGlobalIds = secondaryCategoryGlobalIds; return this; } @javax.annotation.Nullable @JsonProperty("secondary_category_global_ids") @JsonInclude(value = JsonInclude.Include.NON_NULL) public List<String> getSecondaryCategoryGlobalIds() { return secondaryCategoryGlobalIds; } public void setSecondaryCategoryGlobalIds(List<String> secondaryCategoryGlobalIds) { this.secondaryCategoryGlobalIds = secondaryCategoryGlobalIds; } public SearchResultCategories primaryCategoryGlobalId(String primaryCategoryGlobalId) { this.primaryCategoryGlobalId = primaryCategoryGlobalId; return this; } @javax.annotation.Nullable @JsonProperty("primary_category_global_id") @JsonInclude(value = JsonInclude.Include.NON_NULL) public String getPrimaryCategoryGlobalId() { return primaryCategoryGlobalId; } public void setPrimaryCategoryGlobalId(String primaryCategoryGlobalId) { this.primaryCategoryGlobalId = primaryCategoryGlobalId; } public SearchResultCategories primaryCategoryId(String primaryCategoryId) { this.primaryCategoryId = primaryCategoryId; return this; } @javax.annotation.Nullable @JsonProperty("primary_category_id") @JsonInclude(value = JsonInclude.Include.NON_NULL) public String getPrimaryCategoryId() { return primaryCategoryId; } public void setPrimaryCategoryId(String primaryCategoryId) { this.primaryCategoryId = primaryCategoryId; } public SearchResultCategories primaryCategoryName(String primaryCategoryName) { this.primaryCategoryName = primaryCategoryName; return this; } @javax.annotation.Nullable @JsonProperty("primary_category_name") @JsonInclude(value = JsonInclude.Include.NON_NULL) public String getPrimaryCategoryName() { return primaryCategoryName; } public void setPrimaryCategoryName(String primaryCategoryName) { this.primaryCategoryName = primaryCategoryName; } public SearchResultCategories secondaryCategoryNames(List<String> secondaryCategoryNames) { this.secondaryCategoryNames = secondaryCategoryNames; return this; } @javax.annotation.Nullable @JsonProperty("secondary_category_names") @JsonInclude(value = JsonInclude.Include.NON_NULL) public List<String> getSecondaryCategoryNames() { return secondaryCategoryNames; } public void setSecondaryCategoryNames(List<String> secondaryCategoryNames) { this.secondaryCategoryNames = secondaryCategoryNames; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SearchResultCategories that = (SearchResultCategories)o; return Objects.equals(this.secondaryCategoryIds, that.secondaryCategoryIds) && Objects.equals(this.lastUpdatedAt, that.lastUpdatedAt) && Objects.equals(this.secondaryCategoryGlobalIds, that.secondaryCategoryGlobalIds) && Objects.equals(this.primaryCategoryGlobalId, that.primaryCategoryGlobalId) && Objects.equals(this.primaryCategoryId, that.primaryCategoryId) && Objects.equals(this.primaryCategoryName, that.primaryCategoryName) && Objects.equals(this.secondaryCategoryNames, that.secondaryCategoryNames); } @Override public int hashCode() { return Objects.hash(secondaryCategoryIds, lastUpdatedAt, secondaryCategoryGlobalIds, primaryCategoryGlobalId, primaryCategoryId, primaryCategoryName, secondaryCategoryNames); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SearchResultCategories {\n"); sb.append(" secondaryCategoryIds: ").append(toIndentedString(secondaryCategoryIds)).append("\n"); sb.append(" lastUpdatedAt: ").append(toIndentedString(lastUpdatedAt)).append("\n"); sb.append(" secondaryCategoryGlobalIds: ").append(toIndentedString(secondaryCategoryGlobalIds)).append("\n"); sb.append(" primaryCategoryGlobalId: ").append(toIndentedString(primaryCategoryGlobalId)).append("\n"); sb.append(" primaryCategoryId: ").append(toIndentedString(primaryCategoryId)).append("\n"); sb.append(" primaryCategoryName: ").append(toIndentedString(primaryCategoryName)).append("\n"); sb.append(" secondaryCategoryNames: ").append(toIndentedString(secondaryCategoryNames)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "chris@thegrotes.net" ]
chris@thegrotes.net
ae744b70c256ef787a2dfacd4d2f4ca67b1b3407
79595075622ded0bf43023f716389f61d8e96e94
/app/src/main/java/com/android/org/bouncycastle/crypto/signers/ECDSASigner.java
4defa02c4906be09b88f8c5cd37d74b7bb593f78
[]
no_license
dstmath/OppoR15
96f1f7bb4d9cfad47609316debc55095edcd6b56
b9a4da845af251213d7b4c1b35db3e2415290c96
refs/heads/master
2020-03-24T16:52:14.198588
2019-05-27T02:24:53
2019-05-27T02:24:53
142,840,716
7
4
null
null
null
null
UTF-8
Java
false
false
5,576
java
package com.android.org.bouncycastle.crypto.signers; import com.android.org.bouncycastle.crypto.CipherParameters; import com.android.org.bouncycastle.crypto.DSA; import com.android.org.bouncycastle.crypto.params.ECDomainParameters; import com.android.org.bouncycastle.crypto.params.ECKeyParameters; import com.android.org.bouncycastle.crypto.params.ECPrivateKeyParameters; import com.android.org.bouncycastle.crypto.params.ECPublicKeyParameters; import com.android.org.bouncycastle.crypto.params.ParametersWithRandom; import com.android.org.bouncycastle.math.ec.ECAlgorithms; import com.android.org.bouncycastle.math.ec.ECConstants; import com.android.org.bouncycastle.math.ec.ECCurve; import com.android.org.bouncycastle.math.ec.ECFieldElement; import com.android.org.bouncycastle.math.ec.ECMultiplier; import com.android.org.bouncycastle.math.ec.ECPoint; import com.android.org.bouncycastle.math.ec.FixedPointCombMultiplier; import java.math.BigInteger; import java.security.SecureRandom; public class ECDSASigner implements ECConstants, DSA { private final DSAKCalculator kCalculator; private ECKeyParameters key; private SecureRandom random; public ECDSASigner() { this.kCalculator = new RandomDSAKCalculator(); } public ECDSASigner(DSAKCalculator kCalculator) { this.kCalculator = kCalculator; } public void init(boolean forSigning, CipherParameters param) { SecureRandom providedRandom = null; if (!forSigning) { this.key = (ECPublicKeyParameters) param; } else if (param instanceof ParametersWithRandom) { ParametersWithRandom rParam = (ParametersWithRandom) param; this.key = (ECPrivateKeyParameters) rParam.getParameters(); providedRandom = rParam.getRandom(); } else { this.key = (ECPrivateKeyParameters) param; } this.random = initSecureRandom(forSigning ? this.kCalculator.isDeterministic() ^ 1 : false, providedRandom); } public BigInteger[] generateSignature(byte[] message) { ECDomainParameters ec = this.key.getParameters(); BigInteger n = ec.getN(); BigInteger e = calculateE(n, message); BigInteger d = ((ECPrivateKeyParameters) this.key).getD(); if (this.kCalculator.isDeterministic()) { this.kCalculator.init(n, d, message); } else { this.kCalculator.init(n, this.random); } ECMultiplier basePointMultiplier = createBasePointMultiplier(); while (true) { BigInteger k = this.kCalculator.nextK(); BigInteger r = basePointMultiplier.multiply(ec.getG(), k).normalize().getAffineXCoord().toBigInteger().mod(n); if (!r.equals(ZERO)) { if (!k.modInverse(n).multiply(e.add(d.multiply(r))).mod(n).equals(ZERO)) { return new BigInteger[]{r, k.modInverse(n).multiply(e.add(d.multiply(r))).mod(n)}; } } } } public boolean verifySignature(byte[] message, BigInteger r, BigInteger s) { ECDomainParameters ec = this.key.getParameters(); BigInteger n = ec.getN(); BigInteger e = calculateE(n, message); if (r.compareTo(ONE) < 0 || r.compareTo(n) >= 0) { return false; } if (s.compareTo(ONE) < 0 || s.compareTo(n) >= 0) { return false; } BigInteger c = s.modInverse(n); ECPoint point = ECAlgorithms.sumOfTwoMultiplies(ec.getG(), e.multiply(c).mod(n), ((ECPublicKeyParameters) this.key).getQ(), r.multiply(c).mod(n)); if (point.isInfinity()) { return false; } ECCurve curve = point.getCurve(); if (curve != null) { BigInteger cofactor = curve.getCofactor(); if (cofactor != null && cofactor.compareTo(EIGHT) <= 0) { ECFieldElement D = getDenominator(curve.getCoordinateSystem(), point); if (!(D == null || (D.isZero() ^ 1) == 0)) { ECFieldElement X = point.getXCoord(); while (curve.isValidFieldElement(r)) { if (curve.fromBigInteger(r).multiply(D).equals(X)) { return true; } r = r.add(n); } return false; } } } return point.normalize().getAffineXCoord().toBigInteger().mod(n).equals(r); } protected BigInteger calculateE(BigInteger n, byte[] message) { int log2n = n.bitLength(); int messageBitLength = message.length * 8; BigInteger e = new BigInteger(1, message); if (log2n < messageBitLength) { return e.shiftRight(messageBitLength - log2n); } return e; } protected ECMultiplier createBasePointMultiplier() { return new FixedPointCombMultiplier(); } protected ECFieldElement getDenominator(int coordinateSystem, ECPoint p) { switch (coordinateSystem) { case 1: case 6: case 7: return p.getZCoord(0); case 2: case 3: case 4: return p.getZCoord(0).square(); default: return null; } } protected SecureRandom initSecureRandom(boolean needed, SecureRandom provided) { if (needed) { return provided == null ? new SecureRandom() : provided; } else { return null; } } }
[ "toor@debian.toor" ]
toor@debian.toor
2a3a15e3210edd0154202e552809f5be0ee5fc73
4bec34f9f496db1f092d71b3dedbc77e2b9d2ee1
/cbs.api.contest.dao/src/main/java/com/lifeix/cbs/contest/dto/fb/FbContestExt.java
b873db3182ba34d118465aae9ed39c994432795e
[]
no_license
888xin/cbs.api
08ec358363f1d7a0fc9037cf6746cc441c879497
d9667aa1933fd9f0e02d2be97bc8aa7b8c8fe782
refs/heads/master
2020-03-27T07:14:56.367782
2018-08-26T11:49:04
2018-08-26T11:50:00
146,175,221
0
1
null
null
null
null
UTF-8
Java
false
false
2,430
java
package com.lifeix.cbs.contest.dto.fb; import java.io.Serializable; public class FbContestExt implements Serializable { private static final long serialVersionUID = -8991527363577124824L; private Long contestId; private Long targetId; private String homeTeamExt; private String awayTeamExt; private String lineups; private String scores; private Integer status; private String goals; private String penalties; private String cards; private String substitutions; private String referee; private String venue; public FbContestExt() { super(); } public Long getContestId() { return contestId; } public void setContestId(Long contestId) { this.contestId = contestId; } public Long getTargetId() { return targetId; } public void setTargetId(Long targetId) { this.targetId = targetId; } public String getHomeTeamExt() { return homeTeamExt; } public void setHomeTeamExt(String homeTeamExt) { this.homeTeamExt = homeTeamExt; } public String getAwayTeamExt() { return awayTeamExt; } public void setAwayTeamExt(String awayTeamExt) { this.awayTeamExt = awayTeamExt; } public String getScores() { return scores; } public void setScores(String scores) { this.scores = scores; } public Integer getStatus() { return status; } public void setStatus(Integer status) { this.status = status; } public String getGoals() { return goals; } public void setGoals(String goals) { this.goals = goals; } public String getPenalties() { return penalties; } public void setPenalties(String penalties) { this.penalties = penalties; } public String getCards() { return cards; } public void setCards(String cards) { this.cards = cards; } public String getSubstitutions() { return substitutions; } public void setSubstitutions(String substitutions) { this.substitutions = substitutions; } public String getReferee() { return referee; } public void setReferee(String referee) { this.referee = referee; } public String getVenue() { return venue; } public void setVenue(String venue) { this.venue = venue; } public String getLineups() { return lineups; } public void setLineups(String lineups) { this.lineups = lineups; } }
[ "888xin@sina.com" ]
888xin@sina.com
dc14cd3c513535f57c5f80e175f67a2936928176
a744882fb7cf18944bd6719408e5a9f2f0d6c0dd
/sourcecode8/src/sun/net/www/content/text/plain.java
98225450da41b99fc67c552a12f9bcfa176cdde9
[ "Apache-2.0" ]
permissive
hanekawasann/learn
a39b8d17fd50fa8438baaa5b41fdbe8bd299ab33
eef678f1b8e14b7aab966e79a8b5a777cfc7ab14
refs/heads/master
2022-09-13T02:18:07.127489
2020-04-26T07:58:35
2020-04-26T07:58:35
176,686,231
0
0
Apache-2.0
2022-09-01T23:21:38
2019-03-20T08:16:05
Java
UTF-8
Java
false
false
1,826
java
/* * Copyright (c) 1994, 1996, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code 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 * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /** * Plain text file handler. * * @author Steven B. Byrne */ package sun.net.www.content.text; import java.net.*; import java.io.InputStream; import java.io.IOException; public class plain extends ContentHandler { /** * Returns a PlainTextInputStream object from which data * can be read. */ public Object getContent(URLConnection uc) { try { InputStream is = uc.getInputStream(); return new PlainTextInputStream(uc.getInputStream()); } catch (IOException e) { return "Error reading document:\n" + e.toString(); } } }
[ "763803382@qq.com" ]
763803382@qq.com
bd0ed47a7219fc3df0f549b048080c480eb49916
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_completed/13368520.java
748616a69c7c10a3bed76895c19e92c31e21cb09
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,100
java
class c13368520 { public MyHelperClass Streams; public MyHelperClass getWriter(){ return null; } public MyHelperClass _getFile(String o0){ return null; } public void sendTextFile(String filename) throws IOException { MyHelperClass Checker = new MyHelperClass(); Checker.checkEmpty(filename, "filename"); URL url =(URL)(Object) _getFile(filename); PrintWriter out =(PrintWriter)(Object) getWriter(); Streams.copy(new InputStreamReader(url.openStream()), out); out.close(); } } // Code below this line has been added to remove errors class MyHelperClass { public MyHelperClass checkEmpty(String o0, String o1){ return null; } public MyHelperClass copy(InputStreamReader o0, PrintWriter o1){ return null; }} class IOException extends Exception{ public IOException(String errorMessage) { super(errorMessage); } } class URL { public MyHelperClass openStream(){ return null; }} class PrintWriter { public MyHelperClass close(){ return null; }} class InputStreamReader { InputStreamReader(MyHelperClass o0){} InputStreamReader(){}}
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
7825f590711fc58fc092a1a5c1e820c7df6e5660
92c1674aacda6c550402a52a96281ff17cfe5cff
/module22/module11/module2/src/main/java/com/android/example/module22_module11_module2/ClassAAD.java
c4052dcc65f2c57f4ebf4eaf8c60aa7dbea33f1f
[]
no_license
bingranl/android-benchmark-project
2815c926df6a377895bd02ad894455c8b8c6d4d5
28738e2a94406bd212c5f74a79179424dd72722a
refs/heads/main
2023-03-18T20:29:59.335650
2021-03-12T11:47:03
2021-03-12T11:47:03
336,009,838
0
0
null
null
null
null
UTF-8
Java
false
false
1,685
java
package com.android.example.module22_module11_module2; public class ClassAAD { private com.android.example.module06_module061_module4.ClassAAJ instance_var_1_0 = new com.android.example.module06_module061_module4.ClassAAJ(); private com.android.example.module06_module165_module6.ClassAAD instance_var_1_1 = new com.android.example.module06_module165_module6.ClassAAD(); private com.android.example.module22_module07_module21.ClassAAF instance_var_1_2 = new com.android.example.module22_module07_module21.ClassAAF(); private com.android.example.module06_module264_module6.ClassAAE instance_var_1_3 = new com.android.example.module06_module264_module6.ClassAAE(); private com.android.example.module22_module01_module40_module4.ClassAAA instance_var_1_4 = new com.android.example.module22_module01_module40_module4.ClassAAA(); public void method0( com.android.example.module06_module061_module4.ClassAAD param0, com.android.example.module06_module312_module2.ClassAAA param1, com.android.example.module06_module264_module6.ClassAAA param2) throws Throwable { } public void method1( com.android.example.module22_module07_module19.ClassAAF param0, com.android.example.module06_module302.ClassAAA param1, com.android.example.module22_module01_module20_module1.ClassAAE param2, com.android.example.module22_module07_module27.ClassAAJ param3) throws Throwable { if (new java.lang.Object().equals(new java.lang.Object())) { com.android.example.module06_module341_module1.ClassAAB local_var_3_0 = new com.android.example.module06_module341_module1.ClassAAB(); local_var_3_0.method1(new com.android.example.module06_module341_module2.ClassAAH()); } } }
[ "bingran@google.com" ]
bingran@google.com
76523687bc97b01b39fe26dfa2d7c17ba2c65215
3ce95d041a94a3fa5eef116513c13a988aa8c6c8
/src/main/java/com/softuni/sportify/domain/entities/Order.java
144ee6bd23fa42cb9813311123b8844aadac04d0
[ "MIT" ]
permissive
Andrey-V-Georgiev/Sportify
14db0d49f873b2b4ae0fd04bbac75406f90b8775
3b922b731b19ead26a0238900e92c405efc8b66f
refs/heads/master
2022-10-29T02:14:35.069358
2019-12-21T15:56:39
2019-12-21T15:56:39
222,259,427
0
1
MIT
2022-10-19T01:40:22
2019-11-17T14:19:47
Java
UTF-8
Java
false
false
1,851
java
package com.softuni.sportify.domain.entities; import javax.persistence.*; import java.math.BigDecimal; import java.time.LocalDateTime; @Entity @Table(name = "orders") public class Order extends BaseEntity { private Event event; private Account account; private LocalDateTime orderDate; private boolean paymentConfirmed; private boolean coveredByCardType; private BigDecimal extraCharge; public Order() { } @OneToOne(fetch = FetchType.LAZY) @MapsId public Event getEvent() { return event; } public void setEvent(Event event) { this.event = event; } @ManyToOne(optional = false) @JoinColumn(name="account_id", nullable=false) public Account getAccount() { return account; } public void setAccount(Account account) { this.account = account; } @Column(name = "order_date", nullable = false) public LocalDateTime getOrderDate() { return orderDate; } public void setOrderDate(LocalDateTime orderDate) { this.orderDate = orderDate; } @Column(name = "payment_confirmed", nullable = false) public boolean isPaymentConfirmed() { return paymentConfirmed; } public void setPaymentConfirmed(boolean paymentConfirmed) { this.paymentConfirmed = paymentConfirmed; } @Column(name = "covered_by_card_type", nullable = false) public boolean isCoveredByCardType() { return coveredByCardType; } public void setCoveredByCardType(boolean coveredByCardType) { this.coveredByCardType = coveredByCardType; } @Column(name = "extra_charge", nullable = false) public BigDecimal getExtraCharge() { return extraCharge; } public void setExtraCharge(BigDecimal extraCharge) { this.extraCharge = extraCharge; } }
[ "andrey.v.georgiev@gmail.com" ]
andrey.v.georgiev@gmail.com
86b5cbbd592edf53c1db47ed70f89e86434bb0bd
afa96a9730f720bedca6bdfa7c3c49b2c37efcd5
/asm/src/org/objectweb/asm/xml/SAXModuleAdapter.java
9c9c2c36cd5d3785a82ec897904ce6f0a9a399a5
[ "BSD-3-Clause", "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
cybernetics/moditect
98ac2a171cb507ed42fe37df2f5d1ce05827a8f9
169b480ccc83310498d3bba0f541d4f3f1d79865
refs/heads/master
2021-01-18T05:13:56.559812
2017-03-07T20:36:19
2017-03-07T20:36:19
84,278,943
1
0
null
2017-03-08T04:38:18
2017-03-08T04:38:18
null
UTF-8
Java
false
false
5,756
java
/*** * ASM XML Adapter * Copyright (c) 2004-2011, Eugene Kuleshov * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holders nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ package org.objectweb.asm.xml; import org.objectweb.asm.ModuleVisitor; import org.objectweb.asm.Opcodes; import org.xml.sax.helpers.AttributesImpl; /** * Generate SAX event for a module description. * * @author Remi Forax */ public final class SAXModuleAdapter extends ModuleVisitor { private final SAXAdapter sa; public SAXModuleAdapter(final SAXAdapter sa) { super(Opcodes.ASM6); this.sa = sa; } @Override public void visitMainClass(String mainClass) { AttributesImpl att = new AttributesImpl(); att.addAttribute("", "name", "name", "", mainClass); sa.addElement("main-class", att); } @Override public void visitTarget(String osName, String osArch, String osVersion) { AttributesImpl att = new AttributesImpl(); att.addAttribute("", "osName", "osName", "", osName); att.addAttribute("", "osArch", "osArch", "", osName); att.addAttribute("", "osVersion", "osVersion", "", osName); sa.addElement("target", att); } @Override public void visitPackage(String packaze) { AttributesImpl att = new AttributesImpl(); att.addAttribute("", "name", "name", "", packaze); sa.addElement("packages", att); } @Override public void visitRequire(String module, int access, String version) { AttributesImpl att = new AttributesImpl(); StringBuilder sb = new StringBuilder(); SAXClassAdapter.appendAccess(access | SAXClassAdapter.ACCESS_MODULE, sb); att.addAttribute("", "module", "module", "", module); att.addAttribute("", "access", "access", "", sb.toString()); if (version != null) { att.addAttribute("", "access", "access", "", version); } sa.addElement("requires", att); } @Override public void visitExport(String packaze, int access, String... modules) { AttributesImpl att = new AttributesImpl(); StringBuilder sb = new StringBuilder(); SAXClassAdapter.appendAccess(access | SAXClassAdapter.ACCESS_MODULE, sb); att.addAttribute("", "name", "name", "", packaze); att.addAttribute("", "access", "access", "", sb.toString()); sa.addStart("exports", att); if (modules != null && modules.length > 0) { for(String to: modules) { AttributesImpl atts = new AttributesImpl(); atts.addAttribute("", "module", "module", "", to); sa.addElement("to", atts); } } sa.addEnd("exports"); } @Override public void visitOpen(String packaze, int access, String... modules) { AttributesImpl att = new AttributesImpl(); StringBuilder sb = new StringBuilder(); SAXClassAdapter.appendAccess(access | SAXClassAdapter.ACCESS_MODULE, sb); att.addAttribute("", "name", "name", "", packaze); att.addAttribute("", "access", "access", "", sb.toString()); sa.addStart("opens", att); if (modules != null && modules.length > 0) { for(String to: modules) { AttributesImpl atts = new AttributesImpl(); atts.addAttribute("", "module", "module", "", to); sa.addElement("to", atts); } } sa.addEnd("opens"); } @Override public void visitUse(String service) { AttributesImpl att = new AttributesImpl(); att.addAttribute("", "service", "service", "", service); sa.addElement("uses", att); } @Override public void visitProvide(String service, String... providers) { AttributesImpl att = new AttributesImpl(); att.addAttribute("", "service", "service", "", service); sa.addStart("provides", att); for(String provider: providers) { AttributesImpl atts = new AttributesImpl(); atts.addAttribute("", "provider", "provider", "", provider); sa.addElement("with", atts); } sa.addEnd("provides"); } @Override public void visitEnd() { sa.addEnd("module"); } }
[ "gunnar.morling@googlemail.com" ]
gunnar.morling@googlemail.com
982fe99eda40e1c719e1d94667b6a8e7a86412de
f0d25d83176909b18b9989e6fe34c414590c3599
/app/src/main/java/com/google/android/gms/internal/bq.java
90187eec2f1336515f965b4045cad86af6673cea
[]
no_license
lycfr/lq
e8dd702263e6565486bea92f05cd93e45ef8defc
123914e7c0d45956184dc908e87f63870e46aa2e
refs/heads/master
2022-04-07T18:16:31.660038
2020-02-23T03:09:18
2020-02-23T03:09:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
212
java
package com.google.android.gms.internal; public final class bq extends bs { /* access modifiers changed from: protected */ public final boolean zze(double d, double d2) { return d <= d2; } }
[ "quyenlm.vn@gmail.com" ]
quyenlm.vn@gmail.com
59dd34df0ba21743512093000150cbe37409787f
6be17cb822590c2800034c903bc8b06485d35a9c
/slider-core/src/main/java/org/apache/hoya/core/registry/ServiceRegistryClient.java
0a0a29b4bc77474e66fc237ec9718a69e751e321
[ "Apache-2.0" ]
permissive
victoryWang/slider
e3308c94bb9df6fa8acc51b03a74601e119a5c1f
869df8c53633af45d5b7ec22289e7184d0fa7b96
refs/heads/master
2020-01-23T22:00:13.213331
2014-03-31T17:37:42
2014-03-31T17:37:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,904
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.hoya.core.registry; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.yarn.api.records.ApplicationReport; import org.apache.hadoop.yarn.exceptions.YarnException; import org.apache.hoya.yarn.client.HoyaYarnClientImpl; import java.io.IOException; import java.util.List; /** * Client code for interacting with a registry of service instances. * The initial logic just enumerates service instances in the YARN RM */ public class ServiceRegistryClient { final HoyaYarnClientImpl yarnClient; final String username; final Configuration conf; public ServiceRegistryClient(HoyaYarnClientImpl yarnClient, String username, Configuration conf) { this.yarnClient = yarnClient; this.username = username; this.conf = conf; } /** * find all live instances of a specific app -if there is >1 in the cluster, * this returns them all. State should be running or less * @param appname application name * @return the list of all matching application instances */ public List<ApplicationReport> findAllLiveInstances(String appname) throws YarnException, IOException { return yarnClient.findAllLiveInstances(username, appname); } /** * Find an instance of a application belong to the current user * @param appname application name * @return the app report or null if none is found * @throws YarnException YARN issues * @throws IOException IO problems */ public ApplicationReport findInstance(String appname) throws YarnException, IOException { List<ApplicationReport> instances = listInstances(); return yarnClient.findClusterInInstanceList(instances, appname); } /** * List instances belonging to a specific user * @return a possibly empty list of AMs */ public List<ApplicationReport> listInstances() throws YarnException, IOException { return yarnClient.listInstances(username); } }
[ "stevel@hortonworks.com" ]
stevel@hortonworks.com
11da13a5fa692d671d275b32e86288f57362df86
18c10aa1261bea4ae02fa79598446df714519c6f
/70_spring/11_AOP_JoinPoint/src/main/java/com/spring/biz/user/UserServiceClient.java
db629b8692b18ddfbdc3e4f4705e660d03555a7f
[]
no_license
giveseul-23/give_Today_I_Learn
3077efbcb11ae4632f68dfa3f9285d2c2ad27359
f5599f0573fbf0ffdfbcc9c79b468e3c76303dd4
refs/heads/master
2023-05-06T08:13:49.845436
2021-05-25T04:33:20
2021-05-25T04:33:20
330,189,867
0
0
null
null
null
null
UTF-8
Java
false
false
1,104
java
package com.spring.biz.user; import java.util.List; import org.springframework.context.support.GenericXmlApplicationContext; import com.spring.biz.board.BoardService; import com.spring.biz.board.BoardVO; public class UserServiceClient { public static void main(String[] args) { //1. ์Šคํ”„๋ง ์ปจํ…Œ์ด๋„ˆ ๊ตฌ๋™ GenericXmlApplicationContext container = new GenericXmlApplicationContext("applicationContext_before.xml"); System.out.println("---- ์ปจํ…Œ์ด๋„ˆ ๊ตฌ๋™ ํ›„ ----"); //2. ์Šคํ”„๋ง ์ปจํ…Œ์ด๋„ˆ ์‚ฌ์šฉ // UserService userService = (UserService) container.getBean("userService"); /*์–ด๋…ธํ…Œ์ด์…˜ ์„œ๋น„์Šค ์ด๋ฆ„ ์„ค์ • ์—†์ด ์•„๋ž˜์ฒ˜๋Ÿผ๋„ ๊ฐ€๋Šฅ*/ UserService userService = container.getBean(UserService.class); //๋ฐ์ดํ„ฐ ์กฐํšŒ UserVO vo = new UserVO(); vo.setId("TEST"); vo.setPassword("TEST"); UserVO user = userService.getUser(vo); if(user != null) { System.out.println("user : " + user); }else { System.out.println("์‚ฌ์šฉ์ž๊ฐ€ ์กด์žฌํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค."); } //3, ์Šคํ”„๋ง ์ปจํ…Œ์ด๋„ˆ ์ข…๋ฃŒ container.close(); } }
[ "joodasel@icloud.com" ]
joodasel@icloud.com
95a3c67903620732793203f3c8723bd5d3484d70
4e3c5dc1cfd033b0e7c1bea625f9ee64ae12871a
/com/vungle/publisher/ij.java
512b72d5f933dfd84240817d6ea1c046ee6db74b
[]
no_license
haphan2014/idle_heroes
ced0f6301b7a618e470ebfa722bef3d4becdb6ba
5bcc66f8e26bf9273a2a8da2913c27a133b7d60a
refs/heads/master
2021-01-20T05:01:54.157508
2017-08-25T14:06:51
2017-08-25T14:06:51
101,409,563
1
4
null
null
null
null
UTF-8
Java
false
false
1,224
java
package com.vungle.publisher; import com.vungle.publisher.ig.C1790a; import dagger.MembersInjector; import javax.inject.Provider; /* compiled from: vungle */ public final class ij implements MembersInjector<C1790a> { static final /* synthetic */ boolean f2165a = (!ij.class.desiredAssertionStatus()); private final Provider<cq> f2166b; private final Provider<ig> f2167c; public final /* synthetic */ void injectMembers(Object obj) { C1790a c1790a = (C1790a) obj; if (c1790a == null) { throw new NullPointerException("Cannot inject members into a null reference"); } c1790a.f1530d = (cq) this.f2166b.get(); c1790a.f2159a = this.f2167c; } private ij(Provider<cq> provider, Provider<ig> provider2) { if (f2165a || provider != null) { this.f2166b = provider; if (f2165a || provider2 != null) { this.f2167c = provider2; return; } throw new AssertionError(); } throw new AssertionError(); } public static MembersInjector<C1790a> m1968a(Provider<cq> provider, Provider<ig> provider2) { return new ij(provider, provider2); } }
[ "hien.bui@vietis.com.vn" ]
hien.bui@vietis.com.vn
b432d64401fed22dcf01979cf5237580b40d5e56
9f68540857f4233e06b9a9bdaa2f6a186cf4f583
/src/com/android/settings/webview/WebViewAppPicker.java
88ead258ad8835384e49303c58bac29996753d47
[ "Apache-2.0" ]
permissive
Ankits-lab/packages_apps_Settings
142dc865ff5ba0a5502b36fc4176f096231c3181
82cbefb9817e5b244bb50fdaffbe0f90381f269c
refs/heads/main
2023-01-12T04:07:58.863359
2020-11-14T09:36:09
2020-11-14T09:36:09
312,785,971
0
0
null
null
null
null
UTF-8
Java
false
false
6,455
java
/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.settings.webview; import static android.provider.Settings.ACTION_WEBVIEW_SETTINGS; import android.app.Activity; import android.app.settings.SettingsEnums; import android.content.Context; import android.content.Intent; import android.content.pm.ApplicationInfo; import android.content.pm.PackageInfo; import android.content.pm.PackageItemInfo; import android.content.pm.PackageManager; import android.text.TextUtils; import android.webkit.UserPackage; import androidx.annotation.VisibleForTesting; import com.android.settings.R; import com.android.settings.applications.defaultapps.DefaultAppPickerFragment; import com.android.settingslib.applications.DefaultAppInfo; import java.util.ArrayList; import java.util.List; public class WebViewAppPicker extends DefaultAppPickerFragment { private WebViewUpdateServiceWrapper mWebViewUpdateServiceWrapper; private WebViewUpdateServiceWrapper getWebViewUpdateServiceWrapper() { if (mWebViewUpdateServiceWrapper == null) { setWebViewUpdateServiceWrapper(createDefaultWebViewUpdateServiceWrapper()); } return mWebViewUpdateServiceWrapper; } @Override public void onAttach(Context context) { super.onAttach(context); if (!mUserManager.isAdminUser()) { getActivity().finish(); } } @Override protected int getPreferenceScreenResId() { return R.xml.webview_app_settings; } @Override protected List<DefaultAppInfo> getCandidates() { final List<DefaultAppInfo> packageInfoList = new ArrayList<DefaultAppInfo>(); final Context context = getContext(); final WebViewUpdateServiceWrapper webViewUpdateService = getWebViewUpdateServiceWrapper(); final List<ApplicationInfo> pkgs = webViewUpdateService.getValidWebViewApplicationInfos(context); for (ApplicationInfo ai : pkgs) { packageInfoList.add(createDefaultAppInfo(context, mPm, ai, getDisabledReason(webViewUpdateService, context, ai.packageName))); } return packageInfoList; } @Override protected String getDefaultKey() { PackageInfo currentPackage = getWebViewUpdateServiceWrapper().getCurrentWebViewPackage(); return currentPackage == null ? null : currentPackage.packageName; } protected boolean setDefaultKey(String key) { boolean success = getWebViewUpdateServiceWrapper().setWebViewProvider(key); return success; } @Override protected void onSelectionPerformed(boolean success) { if (success) { Activity activity = getActivity(); Intent intent = activity == null ? null : activity.getIntent(); if (intent != null && ACTION_WEBVIEW_SETTINGS.equals(intent.getAction())) { // If this was started through ACTION_WEBVIEW_SETTINGS then return once we have // chosen a new package. getActivity().finish(); } } else { getWebViewUpdateServiceWrapper().showInvalidChoiceToast(getActivity()); updateCandidates(); } } private WebViewUpdateServiceWrapper createDefaultWebViewUpdateServiceWrapper() { return new WebViewUpdateServiceWrapper(); } @VisibleForTesting void setWebViewUpdateServiceWrapper(WebViewUpdateServiceWrapper wvusWrapper) { mWebViewUpdateServiceWrapper = wvusWrapper; } @Override public int getMetricsCategory() { return SettingsEnums.WEBVIEW_IMPLEMENTATION; } private static class WebViewAppInfo extends DefaultAppInfo { public WebViewAppInfo(Context context, PackageManager pm, int userId, PackageItemInfo packageItemInfo, String summary, boolean enabled) { super(context, pm, userId, packageItemInfo, summary, enabled); } @Override public CharSequence loadLabel() { String versionName = ""; try { versionName = mPm.getPackageInfo(packageItemInfo.packageName, 0).versionName; } catch (PackageManager.NameNotFoundException e) { } return String.format("%s %s", super.loadLabel(), versionName); } } @VisibleForTesting DefaultAppInfo createDefaultAppInfo(Context context, PackageManager pm, PackageItemInfo packageItemInfo, String disabledReason) { return new WebViewAppInfo(context, pm, mUserId, packageItemInfo, disabledReason, TextUtils.isEmpty(disabledReason) /* enabled */); } /** * Returns the reason why a package cannot be used as WebView implementation. * This is either because of it being disabled, uninstalled, or hidden for any user. */ @VisibleForTesting String getDisabledReason(WebViewUpdateServiceWrapper webviewUpdateServiceWrapper, Context context, String packageName) { List<UserPackage> userPackages = webviewUpdateServiceWrapper.getPackageInfosAllUsers(context, packageName); for (UserPackage userPackage : userPackages) { if (!userPackage.isInstalledPackage()) { // Package uninstalled/hidden return context.getString( R.string.webview_uninstalled_for_user, userPackage.getUserInfo().name); } else if (!userPackage.isEnabledPackage()) { // Package disabled return context.getString( R.string.webview_disabled_for_user, userPackage.getUserInfo().name); } } return null; } }
[ "keneankit01@gmail.com" ]
keneankit01@gmail.com
e27d5ce577b552bbe7eaac8fec231be1972a78e6
c4ccf1f266e1984f10d978b03b64ec053799f68c
/core/src/main/java/com/google/errorprone/bugpatterns/android/IsLoggableTagLength.java
777a53949acad19a54aa602236f464e3ddb9e515
[ "Apache-2.0" ]
permissive
reudismam/error-prone
717a3e7651a7ba947f89b06dce10fcdeb194205a
8beb267881dacf3146e47a8b366d013a4c94c127
refs/heads/master
2021-01-24T07:25:36.216154
2018-02-22T18:33:13
2018-02-22T22:54:02
122,960,649
0
0
Apache-2.0
2018-02-26T11:33:01
2018-02-26T11:33:00
null
UTF-8
Java
false
false
5,390
java
/* * Copyright 2016 The Error Prone Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.errorprone.bugpatterns.android; import static com.google.errorprone.BugPattern.Category.ANDROID; import static com.google.errorprone.BugPattern.SeverityLevel.ERROR; import static com.google.errorprone.matchers.Description.NO_MATCH; import static com.google.errorprone.matchers.Matchers.anything; import static com.google.errorprone.matchers.Matchers.classLiteral; import static com.google.errorprone.matchers.Matchers.hasModifier; import static com.google.errorprone.matchers.Matchers.kindIs; import static com.google.errorprone.matchers.Matchers.receiverOfInvocation; import static com.google.errorprone.matchers.method.MethodMatchers.instanceMethod; import static com.google.errorprone.matchers.method.MethodMatchers.staticMethod; import static com.google.errorprone.util.ASTHelpers.getReceiver; import static com.google.errorprone.util.ASTHelpers.getSymbol; import static com.sun.source.tree.Tree.Kind.IDENTIFIER; import static javax.lang.model.element.Modifier.FINAL; import com.google.common.base.Utf8; import com.google.errorprone.BugPattern; import com.google.errorprone.VisitorState; import com.google.errorprone.bugpatterns.BugChecker; import com.google.errorprone.bugpatterns.BugChecker.MethodInvocationTreeMatcher; import com.google.errorprone.matchers.Description; import com.google.errorprone.matchers.Matcher; import com.google.errorprone.util.ASTHelpers; import com.sun.source.tree.ClassTree; import com.sun.source.tree.ExpressionTree; import com.sun.source.tree.IdentifierTree; import com.sun.source.tree.MethodInvocationTree; import com.sun.source.tree.VariableTree; import com.sun.source.util.TreeScanner; import com.sun.tools.javac.code.Symbol; import com.sun.tools.javac.code.Symbol.VarSymbol; /** @author epmjohnston@google.com (Emily P.M. Johnston) */ @BugPattern( name = "IsLoggableTagLength", summary = "Log tag too long, cannot exceed 23 characters.", explanation = "`Log.isLoggable(tag, level)` throws an `IllegalArgumentException` if its tag argument is" + " more than 23 characters long.", category = ANDROID, severity = ERROR ) public class IsLoggableTagLength extends BugChecker implements MethodInvocationTreeMatcher { private static final Matcher<ExpressionTree> IS_LOGGABLE_CALL = staticMethod().onClass("android.util.Log").named("isLoggable"); private static final Matcher<ExpressionTree> GET_SIMPLE_NAME_CALL = instanceMethod().onExactClass("java.lang.Class").named("getSimpleName"); private static final Matcher<MethodInvocationTree> RECEIVER_IS_CLASS_LITERAL = receiverOfInvocation(classLiteral(anything())); @Override public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState state) { if (!IS_LOGGABLE_CALL.matches(tree, state)) { return NO_MATCH; } ExpressionTree tagArg = tree.getArguments().get(0); // Check for constant value. String tagConstantValue = ASTHelpers.constValue(tagArg, String.class); if (tagConstantValue != null) { return isValidTag(tagConstantValue) ? NO_MATCH : describeMatch(tagArg); } // Check for class literal simple name (e.g. MyClass.class.getSimpleName(). ExpressionTree tagExpr = tagArg; // If the tag argument is a final field, retrieve the initializer. if (kindIs(IDENTIFIER).matches(tagArg, state)) { VariableTree declaredField = findEnclosingIdentifier((IdentifierTree) tagArg, state); if (declaredField == null || !hasModifier(FINAL).matches(declaredField, state)) { return NO_MATCH; } tagExpr = declaredField.getInitializer(); } if (GET_SIMPLE_NAME_CALL.matches(tagExpr, state) && RECEIVER_IS_CLASS_LITERAL.matches((MethodInvocationTree) tagExpr, state)) { String tagName = getSymbol(getReceiver(getReceiver(tagExpr))).getSimpleName().toString(); return isValidTag(tagName) ? NO_MATCH : describeMatch(tagArg); } return NO_MATCH; } private boolean isValidTag(String tag) { return Utf8.encodedLength(tag) <= 23; } private VariableTree findEnclosingIdentifier(IdentifierTree originalNode, VisitorState state) { Symbol identifierSymbol = getSymbol(originalNode); if (!(identifierSymbol instanceof VarSymbol)) { return null; } return state .findEnclosing(ClassTree.class) .accept( new TreeScanner<VariableTree, Void>() { @Override public VariableTree visitVariable(VariableTree node, Void p) { return getSymbol(node).equals(identifierSymbol) ? node : null; } @Override public VariableTree reduce(VariableTree r1, VariableTree r2) { return r1 != null ? r1 : r2; } }, null); } }
[ "cushon@google.com" ]
cushon@google.com
b75bbb6c8149e58a570f985ad566388dae5866c2
cca5f035dbbe018268b63a8ddd77b4ec8a9ac0c0
/src/test/java/com/amyliascarlet/jsontest/bvt/JSONBytesTest.java
3d6d7f328db1ebdc708b1c1baa979db65b2e040c
[ "Apache-2.0" ]
permissive
AmyliaScarlet/amyliascarletlib
45195dc277fa16ec7f9c71f20686acaaf2b84366
6bd7f69edae8d201e41c6ccfa231ce51fb0ffe16
refs/heads/master
2020-05-25T10:53:20.312058
2019-05-21T07:04:35
2019-05-21T07:04:35
187,766,221
0
2
null
null
null
null
UTF-8
Java
false
false
992
java
package com.amyliascarlet.jsontest.bvt; import org.junit.Assert; import com.amyliascarlet.lib.json.JSON; import junit.framework.TestCase; public class JSONBytesTest extends TestCase { public void test_codec() throws Exception { int len = (Character.MAX_VALUE - Character.MIN_VALUE) + 1; char[] chars = new char[len]; for (int i = 0; i < len; ++i) { char ch = (char) ((int) Character.MAX_VALUE + i); if (ch >= 55296 && ch <= 57344) { continue; } chars[i] = ch; } String text = new String(chars); byte[] bytes = JSON.toJSONBytes(text); String text2 = (String) JSON.parse(bytes); Assert.assertEquals(text.length(), text2.length()); for (int i = 0; i < len; ++i) { char c1 = text.charAt(i); char c2 = text2.charAt(i); Assert.assertEquals(c1, c2); } } }
[ "amy373978205@outlook.com" ]
amy373978205@outlook.com
10a5871cf7bdee7f786f1d7a5df91ecc2d94c540
a1e14f4ac34b55f70fb924b59d966716920e3d8b
/src/main/java/com/newscrawler/newsletter/exception/EmailAddressDuplicateException.java
3de5146a4daed60618a4960e3754a26c83078c42
[]
no_license
cocodori/news-bot
618256974353f94d0e817cb8fd4fd530686b9bf7
00dbe38ac6b291d6fc49314a654ebb50f0db8e05
refs/heads/main
2023-04-09T00:19:10.947117
2021-04-18T12:21:44
2021-04-18T12:21:44
356,917,985
5
0
null
null
null
null
UTF-8
Java
false
false
195
java
package com.newscrawler.newsletter.exception; public class EmailAddressDuplicateException extends Exception { public EmailAddressDuplicateException(String msg) { super(msg); } }
[ "moradulee@gmail.com" ]
moradulee@gmail.com
f327cc59af76866713dfd6bd5428233a97c22755
3fc503bed9e8ba2f8c49ebf7783bcdaa78951ba8
/TRAVACC_R5/travelfacades/src/de/hybris/platform/travelfacades/strategies/impl/OriginDestinationRefNumberValidationStrategy.java
18d236fa028c663e42b90a7196bce4e227ffe282
[]
no_license
RabeS/model-T
3e64b2dfcbcf638bc872ae443e2cdfeef4378e29
bee93c489e3a2034b83ba331e874ccf2c5ff10a9
refs/heads/master
2021-07-01T02:13:15.818439
2020-09-05T08:33:43
2020-09-05T08:33:43
147,307,585
0
0
null
null
null
null
UTF-8
Java
false
false
3,613
java
/* * [y] hybris Platform * * Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package de.hybris.platform.travelfacades.strategies.impl; import de.hybris.platform.commercefacades.travel.AddBundleToCartData; import de.hybris.platform.commercefacades.travel.AddBundleToCartRequestData; import de.hybris.platform.commercefacades.travel.AddToCartResponseData; import de.hybris.platform.core.model.order.AbstractOrderEntryModel; import de.hybris.platform.order.CartService; import de.hybris.platform.travelfacades.constants.TravelfacadesConstants; import de.hybris.platform.travelfacades.strategies.AbstractAddBundleToCartValidationStrategy; import de.hybris.platform.travelservices.enums.OrderEntryType; import de.hybris.platform.travelservices.enums.ProductType; import de.hybris.platform.travelservices.model.product.FareProductModel; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; import java.util.stream.IntStream; import org.springframework.beans.factory.annotation.Required; /** * Strategy that extends the {@link AbstractAddBundleToCartValidationStrategy}. * The strategy is used to validate the addBundleToCart, that is possible only if in the cart there is at least one entry for each * originDestinationRefNumber less than the one specified in the {@link AddBundleToCartRequestData}. */ public class OriginDestinationRefNumberValidationStrategy extends AbstractAddBundleToCartValidationStrategy { public static final String ADD_BUNDLE_TO_CART_VALIDATION_ERROR_NO_PREVIOUS_ENTRIES = "add.bundle.to.cart.validation.error.no" + ".previous.entries"; private CartService cartService; @Override public AddToCartResponseData validate(final AddBundleToCartRequestData addBundleToCartRequestData) { final Optional<Integer> odRefNumber = addBundleToCartRequestData.getAddBundleToCartData().stream() .map(AddBundleToCartData::getOriginDestinationRefNumber).distinct().findFirst(); if (odRefNumber.isPresent() && !odRefNumber.get().equals(TravelfacadesConstants.OUTBOUND_REFERENCE_NUMBER)) { if (!getCartService().hasSessionCart()) { return createAddToCartResponse(false, ADD_BUNDLE_TO_CART_VALIDATION_ERROR_NO_PREVIOUS_ENTRIES, null); } final List<AbstractOrderEntryModel> orderEntryList = getCartService().getSessionCart().getEntries().stream().filter( entry -> OrderEntryType.TRANSPORT.equals(entry.getType()) && (entry.getProduct() instanceof FareProductModel || ProductType.FARE_PRODUCT.equals(entry.getProduct().getProductType())) && entry.getActive()) .collect(Collectors.toList()); final boolean allPreviousEntriesExist = IntStream.range(0, odRefNumber.get()).allMatch(i -> orderEntryList.stream() .anyMatch(entry -> entry.getTravelOrderEntryInfo().getOriginDestinationRefNumber() == i)); if (!allPreviousEntriesExist) { return createAddToCartResponse(false, ADD_BUNDLE_TO_CART_VALIDATION_ERROR_NO_PREVIOUS_ENTRIES, null); } } return createAddToCartResponse(true, null, null); } /** * @return the cartService */ protected CartService getCartService() { return cartService; } /** * @param cartService * the cartService to set */ @Required public void setCartService(final CartService cartService) { this.cartService = cartService; } }
[ "sebastian.rulik@gmail.com" ]
sebastian.rulik@gmail.com
33e7bc5171cd1176bb65978ee26e645bfa0dfc0c
43ca534032faa722e206f4585f3075e8dd43de6c
/src/com/fasterxml/jackson/annotation/JsonGetter.java
df740c380ad6861e399bb65e2e890a8ea9bc25c6
[]
no_license
dnoise/IG-6.9.1-decompiled
3e87ba382a60ba995e582fc50278a31505109684
316612d5e1bfd4a74cee47da9063a38e9d50af68
refs/heads/master
2021-01-15T12:42:37.833988
2014-10-29T13:17:01
2014-10-29T13:17:01
26,952,948
1
0
null
null
null
null
UTF-8
Java
false
false
351
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.fasterxml.jackson.annotation; import java.lang.annotation.Annotation; public interface JsonGetter extends Annotation { public abstract String value(); }
[ "leo.sjoberg@gmail.com" ]
leo.sjoberg@gmail.com
e80c4022d597ded3a9cb55887e19ed1890ff1025
0af8b92686a58eb0b64e319b22411432aca7a8f3
/api-vs-impl-small/app/src/main/java/org/gradle/testapp/performancenull_44/Productionnull_4332.java
f5f898d96eb11b6eb561eb39fd5369378bb5104c
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
588
java
package org.gradle.testapp.performancenull_44; public class Productionnull_4332 { private final String property; public Productionnull_4332(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
15d500dcc8bad4a6679a207156a32eb208ba0fe1
7839ce2360744f81ff874383492ea24df330e7bc
/src/main/java/com/di/jdbc/mapper/core/PreparedStatementMapper.java
31d75ce24f72580d6187be96b3c89f7a126b5d06
[]
no_license
dingey/jdbc-mapper
0f2fee1e0b8972bca47cd44efe984af38647c76a
d9c883b428643fc92363dc095e117c7ef6962cc8
refs/heads/master
2022-05-01T17:36:11.178794
2022-03-07T03:15:44
2022-03-07T03:15:44
73,085,922
11
2
null
null
null
null
UTF-8
Java
false
false
1,224
java
package com.di.jdbc.mapper.core; import java.util.List; import java.util.Map; public interface PreparedStatementMapper extends StatementMapper { /** * ๆ‰ง่กŒ้ข„็ผ–่ฏ‘็š„sql่ฏญๅฅ๏ผŒargsๅ‚ๆ•ฐ๏ผŒ่ฟ”ๅ›žๆˆๅŠŸๆˆ–ๅคฑ่ดฅใ€‚ * * @param preparedStatement ้ข„็ผ–่ฏ‘็š„prepareStatement่ฏญๅฅ * @param args ๅ‚ๆ•ฐๅ€ผ * @return ๅฝฑๅ“็š„่กŒๆ•ฐ */ int execute(String preparedStatement, Object... args); /** * ๆ‰ง่กŒsql่ฏญๅฅ๏ผŒ่Žทๅ–็ป“ๆžœ้›†ใ€‚ * * @param preparedStatement statement่ฏญๅฅ * @param resultClass ็ป“ๆžœ็ฑปๅž‹ * @param args ๅ‚ๆ•ฐๅ€ผ * @return ไธ€่กŒๅ‡ ็އ */ <T> T get(String preparedStatement, Class<T> resultClass, Object... args); /** * ๆ‰ง่กŒsql่ฏญๅฅ๏ผŒๆ‰น้‡่Žทๅ–็ป“ๆžœ้›†ใ€‚ * * @param preparedStatement statement่ฏญๅฅ * @param resultClass ็ป“ๆžœ็ฑปๅž‹ * @param args ๅ‚ๆ•ฐๅ€ผ * @return listๅฏน่ฑก */ <T> List<T> list(String preparedStatement, Class<T> resultClass, Object... args); /** * ๆ‰ง่กŒsql่ฏญๅฅ๏ผŒๅฐ†ไธคๅˆ—ๅ€ผๆ˜ ๅฐ„ไธบmap,็ฌฌไธ€ๅˆ—key,็ฌฌไบŒๅˆ—valueใ€‚ * * @param sql statement่ฏญๅฅ * @param args ๅ‚ๆ•ฐๅ€ผ * @return mapๅฏน่ฑก */ Map<Object, Object> listToMap(String sql, Object... args); }
[ "d" ]
d
938d01d8c003101c783bc4980561e1d4f8d7743e
0b95a85deaf1c9fade3e2a5af2e816a5b00607a4
/tempcode/src/main/java/commons/setting/external/service/IAccountRuleOutService.java
aab838ac68ba56e6bd546a23b8e5f20449e65f20
[]
no_license
liwen666/lw_code
6009fb1a83ad74c987a5e58937c3a178537094b0
6fb3f4373fdf1363938ee4f30b39c9fd17c8a8d7
refs/heads/master
2020-04-09T22:58:38.355751
2019-04-25T07:37:52
2019-04-25T07:37:52
160,643,842
0
0
null
null
null
null
UTF-8
Java
false
false
890
java
package commons.setting.external.service; import java.util.List; import com.tjhq.commons.exception.ServiceException; import com.tjhq.commons.setting.external.po.AccountRuleOutPO; public interface IAccountRuleOutService { /** * ๆŸฅ่ฏข่ฎฐ่ดฆๅฎšไน‰PO * @param appId * @return * @throws ServiceException */ public List<AccountRuleOutPO> getBillDefinedData(String appId) throws ServiceException; /** * ๆŸฅ่ฏข่ฎฐ่ดฆๅฎšไน‰PO by ่ฎฐ่ดฆๅฎšไน‰ID * @param appId * @param billDefId * @return * @throws ServiceException */ public AccountRuleOutPO getAccountRuleByRuleID(String appId, String billDefId) throws ServiceException; /** * ๆŸฅ่ฏข่ฎฐ่ดฆๅฎšไน‰PO by ่ฎฐ่ดฆๅฎšไน‰็ฑปๅž‹ * @param appId * @param typeId * @return * @throws ServiceException */ public List<AccountRuleOutPO> getBillDefDataByTypeId(String appId, String typeId) throws ServiceException; }
[ "1316138287@qq.com" ]
1316138287@qq.com
62662b4710d4617cf76c8c2c15efcc0bdb77f02c
cb99c11c514f465ea1e7e114a1bb2992789e563e
/Test-master/changeskin/src/main/java/com/example/changeskin/MainActivity.java
4d45649d23b47605fff99607a564db012a4c1b0a
[]
no_license
fengyuehan/Test
a79630452e282a17ded6b6c6318a0d252c8207ff
453496cbf26449241f303a5b39a603e7aa6fe158
refs/heads/master
2022-05-26T23:38:20.196093
2022-03-17T04:35:52
2022-03-17T04:35:52
174,118,194
8
0
null
null
null
null
UTF-8
Java
false
false
1,776
java
package com.example.changeskin; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import android.content.Context; import android.os.Bundle; import android.util.AttributeSet; import android.view.View; import java.util.concurrent.CopyOnWriteArrayList; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Nullable @Override public View onCreateView(@NonNull String name, @NonNull Context context, @NonNull AttributeSet attrs) { try { if ("FrameLayout".equals(name)){ int count = attrs.getAttributeCount(); for (int i = 0;i < count; i++){ String attributeName = attrs.getAttributeName(i); String attributeValue = attrs.getAttributeValue(i); if (attributeName.equals("id")){ int id = Integer.parseInt(attributeValue.substring(1)); String idVal = getResources().getResourceName(id); if ("android:id/content".equals(idVal)){ GrayFrameLayout grayFrameLayout = new GrayFrameLayout(context,attrs); //ๅฆ‚ๆžœ่ฎพ็ฝฎไบ†่ƒŒๆ™ฏ grayFrameLayout.setBackgroundDrawable(getWindow().getDecorView().getBackground()); return grayFrameLayout; } } } } }catch (Exception e){ e.printStackTrace(); } return super.onCreateView(name, context, attrs); } }
[ "981831456@qq.com" ]
981831456@qq.com
195c3363c78fae97aed571c87b433d9b26317e16
365b59229710d5b387e00f924ac0087102cb97c9
/framework/jcompany_model/src/test/java/com/powerlogic/jcompany/persistence/jpa/entity/attach/Employee.java
b90dce32a004e924eb96543749ffe69f8756c56d
[]
no_license
iecker/jaguar615
a8045ad4729b8fe572d13cb91239b9cca81d5383
4b2658738dac4fb93dd52489de640c7f3de4e782
refs/heads/master
2020-04-21T15:20:20.126020
2018-05-25T15:14:03
2018-05-25T15:14:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,674
java
/* Jaguar-jCompany Developer Suite. Powerlogic 2010-2014. Please read licensing information in your installation directory.Contact Powerlogic for more information or contribute with this project: suporte@powerlogic.com.br - www.powerlogic.com.br */ package com.powerlogic.jcompany.persistence.jpa.entity.attach; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.MappedSuperclass; import org.hibernate.annotations.ForeignKey; import com.powerlogic.jcompany.config.domain.PlcFileAttach; /** * Funcionรกrio */ @MappedSuperclass public abstract class Employee implements Serializable{ private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy=GenerationType.AUTO, generator = "SE_FUNCIONARIO") @Column (name = "ID_FUNCIONARIO", nullable=false, length=5) private Long id; @Column (name = "NOME", nullable=false, length=40) private String nome; @ManyToOne(targetEntity=ImageEntity.class,fetch=FetchType.LAZY) @ForeignKey(name="FK_FUNCIONARIO_FOTO") @JoinColumn(name="ID_FOTO",nullable=true) @PlcFileAttach(extension={"txt","doc","pdf"}) private ImageEntity arquivoAnexado; public void setId(Long id) { this.id = id; } public Long getId() { return id; } public void setNome(String nome) { this.nome = nome; } public String getNome() { return nome; } public void setArquivoAnexado(ImageEntity arquivoAnexado) { this.arquivoAnexado = arquivoAnexado; } public ImageEntity getArquivoAnexado() { return arquivoAnexado; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((nome == null) ? 0 : nome.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Employee other = (Employee) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; if (nome == null) { if (other.nome != null) return false; } else if (!nome.equals(other.nome)) return false; return true; } }
[ "josivan.silva@castgroup.com.br" ]
josivan.silva@castgroup.com.br
108e78d6c098e4cf16ef7e6130951c67d9835aae
a26cbfbfa9415496f7f2762d2877b7e143d0607a
/Week4/Element.java
3644173ba49ac749a175283ff4cd3cbab11e53ee
[]
no_license
amandeep-verma/Princeton-Programming-With-A-Purpose
daf09d79f94de771ca8a06d18945d3375566d14a
d5b0e14ddd2f75821d4e4f3f0a90abbce427b27a
refs/heads/master
2023-03-14T16:46:40.994192
2021-04-05T09:07:44
2021-04-05T09:07:44
270,541,491
0
0
null
null
null
null
UTF-8
Java
false
false
2,164
java
import java.awt.Color; public class Element { double r; // real radius of ball double m; double vx; double vy; double height; double radius; // radius of ball (purely for graphical represation so as you can see the motion) double p; double D; double G = -9.81; double sideSquareFrame; int boucingFactorDrop; int xDirectionDrop; String picture; String info; double xinfo; double yinfo; double delta; Color BallSurfaceColor; Color BallFillColor; double rx; double ry; double K; double Area() { return 3.141 * (r) * (r); } public Element(double r, double m, double vx, double vy, double height, double radius, double p, double d, double g, double sideSquareFrame, int boucingFactorDrop, int xDirectionDrop, String picture, String info, double xinfo, double yinfo, double delta, Color ballSurfaceColor, Color ballFillColor) { super(); this.r = r; this.m = m; this.vx = vx; this.vy = vy; this.height = height; this.radius = radius; this.p = p; D = d; G = g; this.sideSquareFrame = sideSquareFrame; this.boucingFactorDrop = boucingFactorDrop; this.xDirectionDrop = xDirectionDrop; this.picture = picture; this.info = info; this.xinfo = xinfo; this.yinfo = yinfo; this.delta = delta; BallSurfaceColor = ballSurfaceColor; BallFillColor = ballFillColor; this.info = this.info + vx + "m/s SpeedY= " + vy + " m/s"; rx = 00.0 + radius; ry = 0.0 + radius + height; K = 1.0 / 2 * (p * D * Area()); } @Override public String toString() { return "Element [r=" + r + ", m=" + m + ", vx=" + vx + ", vy=" + vy + ", height=" + height + ", radius=" + radius + ", p=" + p + ", D=" + D + ", G=" + G + ", boucingFactorDrop=" + boucingFactorDrop + ", xDirectionDrop=" + xDirectionDrop + "]"; } }
[ "39786879+amandeep-verma@users.noreply.github.com" ]
39786879+amandeep-verma@users.noreply.github.com
ab713ec9de665414a651811e47db8cb196348958
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_473/Testnull_47274.java
f8fcc8caea729f7f09497bfeaa050d1f3f404ee4
[]
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
308
java
package org.gradle.test.performancenull_473; import static org.junit.Assert.*; public class Testnull_47274 { private final Productionnull_47274 production = new Productionnull_47274("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
f5ea3492409dc0004ca78e9bd5e6cc76764b3e61
80d32e12ffc52bb5742b76339887554a1c8af132
/runtime/runtime/master/src/main/java/es/bsc/mobile/runtime/types/profile/CoreProfile.java
b5d7148a771a44e4b56822d1581db6e32b0e6614
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
flordan/WACCPD
b16d97799bc142b8e89716f9313166978f1cae14
6a80bb079b5ce037221bf657e13b27672c7d82b8
refs/heads/master
2020-04-17T15:26:40.435582
2017-09-19T16:19:53
2017-09-19T16:19:53
166,698,932
0
0
null
null
null
null
UTF-8
Java
false
false
3,297
java
/* * Copyright 2008-2016 Barcelona Supercomputing Center (www.bsc.es) * * 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 es.bsc.mobile.runtime.types.profile; import es.bsc.mobile.types.JobProfile; import es.bsc.mobile.types.calc.MinMax; public class CoreProfile { private final int coreId; private final int numParams; private final MinMax[] inParamsSize; private final MinMax[] outParamsSize; private final MinMax inTargetSize; private final MinMax outTargetSize; private final MinMax resultSize; public CoreProfile(int coreId, int numParams) { this.coreId = coreId; this.numParams = numParams; inTargetSize = new MinMax(); outTargetSize = new MinMax(); resultSize = new MinMax(); inParamsSize = new MinMax[numParams]; outParamsSize = new MinMax[numParams]; for (int i = 0; i < numParams; i++) { inParamsSize[i] = new MinMax(); outParamsSize[i] = new MinMax(); } } public int getCoreId() { return coreId; } public int getNumParams() { return numParams; } public MinMax getParamInSize(int paramId) { return inParamsSize[paramId]; } public MinMax getParamOutSize(int paramId) { return outParamsSize[paramId]; } public MinMax getTargetInSize() { return inTargetSize; } public MinMax getTargetOutSize() { return outTargetSize; } public MinMax getResultSize() { return resultSize; } public void registerProfiledJob(JobProfile jp) { for (int i = 0; i < numParams; i++) { inParamsSize[i].newValue(jp.getParamsSize(true, i)); outParamsSize[i].newValue(jp.getParamsSize(false, i)); } inTargetSize.newValue(jp.getTargetSize(true)); outTargetSize.newValue(jp.getTargetSize(false)); resultSize.newValue(jp.getResultSize()); } public String dump(String prefix) { StringBuilder sb = new StringBuilder(); sb.append(prefix).append("\t IN Sizes\n"); for (int i = 0; i < numParams; i++) { sb.append(prefix).append("\t\t Param ").append(i).append("\t").append(inParamsSize[i]).append("\n"); } sb.append(prefix).append("\t\tTarget \t").append(inTargetSize).append("\n"); sb.append(prefix).append("\t OUT Sizes\n"); for (int i = 0; i < numParams; i++) { sb.append(prefix).append("\t\t Param ").append(i).append("\t").append(outParamsSize[i]).append("\n"); } sb.append(prefix).append("\t\tTarget \t").append(outTargetSize).append("\n"); sb.append(prefix).append("\t\tResult \t").append(resultSize).append("\n"); return sb.toString(); } }
[ "francesc.lordan@gmail.com" ]
francesc.lordan@gmail.com
d2144af37ab7285e24964913368159237d6e8429
fdbe7ae2cf66afd34b275583441da8b7c437ae8f
/app/src/main/java/com/example/lijinfeng/eses/colorful/setter/ViewGroupSetter.java
1f5dfaffcf816a50bf4192cbfaf203eeba5bd726
[]
no_license
jinfengli/Eses
93ba178c90b4aa8ed6a36fe3cbf32a0fa725c9e3
cbe25ced7e13d79dcd4d632c7ee51341fdc5cb2e
refs/heads/master
2021-01-17T10:59:23.398263
2016-06-16T08:23:18
2016-06-16T08:23:18
41,034,793
0
0
null
null
null
null
UTF-8
Java
false
false
5,506
java
package com.example.lijinfeng.eses.colorful.setter; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.HashSet; import java.util.Set; import android.content.res.Resources.Theme; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.View; import android.view.ViewGroup; import android.widget.AbsListView; /** * ViewGroup็ฑปๅž‹็š„Setter,็”จไบŽไฟฎๆ”นListViewใ€RecyclerView็ญ‰ViewGroup็ฑปๅž‹็š„Item * View,ๆ ธๅฟƒๆ€ๆƒณไธบ้ๅކๆฏไธชItem Viewไธญ็š„ๅญๆŽงไปถ,็„ถๅŽๆ นๆฎ็”จๆˆท็ป‘ๅฎš็š„view * idไธŽๅฑžๆ€งๆฅๅฐ†Viewไฟฎๆ”นไธบๅฝ“ๅ‰Themeไธ‹็š„ๆœ€ๆ–ฐๅฑžๆ€งๅ€ผ๏ผŒ่พพๅˆฐViewGroupๆŽงไปถ็š„ๆข่‚คๆ•ˆๆžœใ€‚ * * TODO : ColorไธŽDrawable็š„่ฎพ่ฎก้—ฎ้ข˜,ๆ˜ฏๅฆ้œ€่ฆไฟฎๆ”นไธบๆกฅๆŽฅๆจกๅผ {@see ViewBackgroundColorSetter}ใ€ * {@see ViewBackgroundDrawableSetter} * * @author mrsimple * */ public class ViewGroupSetter extends ViewSetter { /** * ListView็š„ๅญ่ฏ•ๅ›พ็š„Setter */ protected Set<ViewSetter> mItemViewSetters = new HashSet<ViewSetter>(); /** * * @param targetView * @param resId */ public ViewGroupSetter(ViewGroup targetView, int resId) { super(targetView, resId); } public ViewGroupSetter(ViewGroup targetView) { super(targetView, 0); } /** * ่ฎพ็ฝฎView็š„่ƒŒๆ™ฏ่‰ฒ * * @param viewId * @param colorId * @return */ public ViewGroupSetter childViewBgColor(int viewId, int colorId) { mItemViewSetters.add(new ViewBackgroundColorSetter(viewId, colorId)); return this; } /** * ่ฎพ็ฝฎView็š„drawable่ƒŒๆ™ฏ * * @param viewId * @param drawableId * @return */ public ViewGroupSetter childViewBgDrawable(int viewId, int drawableId) { mItemViewSetters.add(new ViewBackgroundDrawableSetter(viewId, drawableId)); return this; } /** * ่ฎพ็ฝฎๆ–‡ๆœฌ้ขœ่‰ฒ,ๅ› ๆญคView็š„็ฑปๅž‹ๅฟ…้กปไธบTextViewๆˆ–่€…ๅ…ถๅญ็ฑป * * @param viewId * @param colorId * @return */ public ViewGroupSetter childViewTextColor(int viewId, int colorId) { mItemViewSetters.add(new TextColorSetter(viewId, colorId)); return this; } @Override public void setValue(Theme newTheme, int themeId) { mView.setBackgroundColor(getColor(newTheme)); // ๆธ…็ฉบAbsListView็š„ๅ…ƒ็ด  clearListViewRecyclerBin(mView); // ๆธ…็ฉบRecyclerView clearRecyclerViewRecyclerBin(mView); // ไฟฎๆ”นๆ‰€ๆœ‰ๅญๅ…ƒ็ด ็š„็›ธๅ…ณๅฑžๆ€ง changeChildenAttrs((ViewGroup) mView, newTheme, themeId); } /** * * @param viewId * @return */ private View findViewById(View rootView, int viewId) { View targetView = rootView.findViewById(viewId); Log.d("", "### viewgroup find view : " + targetView); return targetView; } /** * ไฟฎๆ”นๅญ่ง†ๅ›พ็š„ๅฏนๅบ”ๅฑžๆ€ง * * @param viewGroup * @param newTheme * @param themeId */ private void changeChildenAttrs(ViewGroup viewGroup, Theme newTheme, int themeId) { int childCount = viewGroup.getChildCount(); for (int i = 0; i < childCount; i++) { View childView = viewGroup.getChildAt(i); // ๆทฑๅบฆ้ๅކ if (childView instanceof ViewGroup) { changeChildenAttrs((ViewGroup) childView, newTheme, themeId); } // ้ๅކๅญๅ…ƒ็ด ไธŽ่ฆไฟฎๆ”น็š„ๅฑžๆ€ง,ๅฆ‚ๆžœ็›ธๅŒ้‚ฃไนˆๅˆ™ไฟฎๆ”นๅญView็š„ๅฑžๆ€ง for (ViewSetter setter : mItemViewSetters) { // ๆฏๆฌก้ƒฝ่ฆไปŽViewGroupไธญๆŸฅๆ‰พๆ•ฐๆฎ setter.mView = findViewById(viewGroup, setter.mViewId); Log.e("", "### childView : " + childView + ", id = " + childView.getId()); Log.e("", "### setter view : " + setter.mView + ", id = " + setter.getViewId()); if (childView.getId() == setter.getViewId()) { setter.setValue(newTheme, themeId); Log.e("", "@@@ ไฟฎๆ”นๆ–ฐ็š„ๅฑžๆ€ง: " + childView); } } } } private void clearListViewRecyclerBin(View rootView) { if (rootView instanceof AbsListView) { try { Field localField = AbsListView.class .getDeclaredField("mRecycler"); localField.setAccessible(true); Method localMethod = Class.forName( "android.widget.AbsListView$RecycleBin") .getDeclaredMethod("clear", new Class[0]); localMethod.setAccessible(true); localMethod.invoke(localField.get(rootView), new Object[0]); Log.e("", "### ๆธ…็ฉบAbsListView็š„RecycerBin "); } catch (NoSuchFieldException e1) { e1.printStackTrace(); } catch (ClassNotFoundException e2) { e2.printStackTrace(); } catch (NoSuchMethodException e3) { e3.printStackTrace(); } catch (IllegalAccessException e4) { e4.printStackTrace(); } catch (InvocationTargetException e5) { e5.printStackTrace(); } } } private void clearRecyclerViewRecyclerBin(View rootView) { if (rootView instanceof RecyclerView) { try { Field localField = RecyclerView.class .getDeclaredField("mRecycler"); localField.setAccessible(true); Method localMethod = Class.forName( "android.support.v7.widget.RecyclerView$Recycler") .getDeclaredMethod("clear", new Class[0]); localMethod.setAccessible(true); localMethod.invoke(localField.get(rootView), new Object[0]); Log.e("", "### ๆธ…็ฉบRecyclerView็š„Recycer "); rootView.invalidate(); } catch (NoSuchFieldException e1) { e1.printStackTrace(); } catch (ClassNotFoundException e2) { e2.printStackTrace(); } catch (NoSuchMethodException e3) { e3.printStackTrace(); } catch (IllegalAccessException e4) { e4.printStackTrace(); } catch (InvocationTargetException e5) { e5.printStackTrace(); } } } }
[ "lijinfeng.ljf@gmail.com" ]
lijinfeng.ljf@gmail.com
fb6e2de671eee20fa6f118b28b3f5c2909700fd6
494837669ad12b8665a21c6a6cf284931dd62954
/trunk/Web Duc/java/dao/BankInfoFacadeLocal.java
8e7169c13ee4d706fb41f01701284868a5416abb
[]
no_license
BGCX067/f1203t0-sem4-eproject-svn-to-git
17865d1d37cf820face5431f4f43ef20b62aa462
30a61f31e693f6122ff190a4542a8a937749a8a5
refs/heads/master
2016-09-01T08:52:04.248683
2015-12-28T14:44:56
2015-12-28T14:44:56
48,851,007
0
0
null
null
null
null
UTF-8
Java
false
false
529
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package dao; import java.util.List; import javax.ejb.Local; import model.BankInfo; /** * * @author Duc */ @Local public interface BankInfoFacadeLocal { void create(BankInfo bankInfo); void edit(BankInfo bankInfo); void remove(BankInfo bankInfo); BankInfo find(Object id); List<BankInfo> findAll(); List<BankInfo> findRange(int[] range); int count(); }
[ "you@example.com" ]
you@example.com
87d6beae852955e2cb118833574126f8b8265e71
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/30/30_09dbec77dc3956d046812225aa4a3a22147c0f2b/RPCCopy/30_09dbec77dc3956d046812225aa4a3a22147c0f2b_RPCCopy_s.java
08b300197489c99b08679921ed9ae4d267399faa
[]
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,236
java
/** * */ package com.google.gwt.user.server.rpc; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import com.google.gwt.user.client.rpc.SerializationException; /** * Encapsulation of both RPCCopy for GWT 1.4 and GWT 1.5 * (damned invokeAndEncodeResponse !!!!!) * * @author bruno.marchesson */ public class RPCCopy { //---- // Enumeration //---- /** * GWT Version */ enum Version { GWT14, GWT15 } //---- // Attributes //---- /** * The current GWT version */ protected Version _version; //---- // Singleton //---- /** * The unique instance of the singleton */ private static RPCCopy _instance = null; /** * @return the unique instance of the singleton */ public static RPCCopy getInstance() { if (_instance == null) { _instance = new RPCCopy(); } return _instance; } //------------------------------------------------------------------------- // // Constructor // //------------------------------------------------------------------------- /** * Private constructor of the singleton */ private RPCCopy() { _version = Version.GWT15; // GWT version detection, based on RPC method parsing // (findInterfaceMethod is present in GWT 1.4 and not 1.5) // try { Method[] methods = RPC.class.getDeclaredMethods(); for (int index = 0; index < methods.length; index++) { if ("findInterfaceMethod".equals(methods[index].getName())) { _version = Version.GWT14; break; } } } catch (SecurityException e) { e.printStackTrace(); } System.out.println(_version.toString()); } //------------------------------------------------------------------------- // // Encapsulated methods // //------------------------------------------------------------------------- /** * Decode request method */ public RPCRequest decodeRequest(String encodedRequest, Class type, SerializationPolicyProvider serializationPolicyProvider) { if (_version == Version.GWT14) { return RPCCopy_GWT14.decodeRequest(encodedRequest, type, serializationPolicyProvider); } else { return RPCCopy_GWT15.decodeRequest(encodedRequest, type, serializationPolicyProvider); } } /** * Invoke method * @throws InvocationTargetException * @throws SerializationException */ public Object invoke(Object target, Method serviceMethod, Object[] args, SerializationPolicy serializationPolicy) throws SerializationException, InvocationTargetException { if (_version == Version.GWT14) { return RPCCopy_GWT14.invoke(target, serviceMethod, args, serializationPolicy); } else { return RPCCopy_GWT15.invoke(target, serviceMethod, args, serializationPolicy); } } /** * Encode successful response method. * @throws SerializationException */ public String encodeResponseForSuccess(Method serviceMethod, Object object, SerializationPolicy serializationPolicy) throws SerializationException { if (_version == Version.GWT14) { return RPCCopy_GWT14.encodeResponseForSuccess(serviceMethod, object, serializationPolicy); } else { return RPCCopy_GWT15.encodeResponseForSuccess(serviceMethod, object, serializationPolicy); } } /** * Encode failure response method. * @throws SerializationException */ public String encodeResponseForFailure(Method serviceMethod, Throwable cause, SerializationPolicy serializationPolicy) throws SerializationException { if (_version == Version.GWT14) { return RPCCopy_GWT14.encodeResponseForFailure(serviceMethod, cause, serializationPolicy); } else { return RPCCopy_GWT15.encodeResponseForFailure(serviceMethod, cause, serializationPolicy); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
42b44046cbc3faabc8fea9b32bb359b4f6e417a1
e5e048f1716e5d8e92023b6a9d4f80d9e6bd366b
/src/main/java/com/opengamma/analytics/math/minimization/ParameterLimitsTransformTestCase.java
7568eae6026553e0bf30c93070ea521849222301
[ "Apache-2.0" ]
permissive
jerome79/Analytics
e4dd03ae9d95a67f7ff36fb75bd5e268b87f2547
71ab1c7a88ed851c50a8de87af000155666f4894
refs/heads/master
2020-04-09T17:24:30.623733
2015-08-17T10:01:27
2015-08-17T10:01:27
42,441,934
1
0
null
2015-09-14T10:19:57
2015-09-14T10:19:56
null
UTF-8
Java
false
false
2,966
java
/** * Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.analytics.math.minimization; import static org.testng.AssertJUnit.assertEquals; import cern.jet.random.engine.MersenneTwister; import cern.jet.random.engine.MersenneTwister64; import cern.jet.random.engine.RandomEngine; import org.testng.annotations.Test; import com.opengamma.analytics.math.statistics.distribution.NormalDistribution; import com.opengamma.analytics.math.statistics.distribution.ProbabilityDistribution; /** * Abstract test. */ @Test public abstract class ParameterLimitsTransformTestCase { protected static final RandomEngine RANDOM = new MersenneTwister64(MersenneTwister.DEFAULT_SEED); protected static final ProbabilityDistribution<Double> NORMAL = new NormalDistribution(0, 1, RANDOM); protected void assertRoundTrip(final ParameterLimitsTransform transform, final double modelParam) { final double fp = transform.transform(modelParam); final double mp = transform.inverseTransform(fp); assertEquals(modelParam, mp, 1e-8); } // reverse protected void assertReverseRoundTrip(final ParameterLimitsTransform transform, final double fitParam) { final double mp = transform.inverseTransform(fitParam); final double fp = transform.transform(mp); assertEquals(fitParam, fp, 1e-8); } protected void assertGradientRoundTrip(final ParameterLimitsTransform transform, final double modelParam) { final double g = transform.transformGradient(modelParam); final double fp = transform.transform(modelParam); final double gInv = transform.inverseTransformGradient(fp); assertEquals(g, 1.0 / gInv, 1e-8); } protected void assertGradient(final ParameterLimitsTransform transform, final double modelParam) { final double eps = 1e-5; final double g = transform.transformGradient(modelParam); double fdg; try { final double down = transform.transform(modelParam - eps); final double up = transform.transform(modelParam + eps); fdg = (up - down) / 2 / eps; } catch (final IllegalArgumentException e) { final double fp = transform.transform(modelParam); try { final double up = transform.transform(modelParam + eps); fdg = (up - fp) / eps; } catch (final IllegalArgumentException e2) { final double down = transform.transform(modelParam - eps); fdg = (fp - down) / eps; } } assertEquals(g, fdg, 1e-6); } protected void assertInverseGradient(final ParameterLimitsTransform transform, final double fitParam) { final double eps = 1e-5; final double g = transform.inverseTransformGradient(fitParam); double fdg; final double down = transform.inverseTransform(fitParam - eps); final double up = transform.inverseTransform(fitParam + eps); fdg = (up - down) / 2 / eps; assertEquals(g, fdg, 1e-6); } }
[ "stephen@opengamma.com" ]
stephen@opengamma.com
c86a274f68e5b00764e182fdbb3bc8f3658ed621
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/13/13_e44fa3c3a5f3917f088cf28b29b7c4978bb2ef74/TcpPinger/13_e44fa3c3a5f3917f088cf28b29b7c4978bb2ef74_TcpPinger_s.java
44d132f2dd00ab7cd5d61e3b0c44922bc58c32dd
[]
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,183
java
import java.net.*; import java.text.*; /** This class does TCP-based pinging of a remote destination using a specific port @author Steven Pigeon <pigeon@iro.umontreal.ca> */ public class TcpPinger implements Pinger { /** Holds the last collected times */ private String m_tcp_times; /** A reference to ClientInfo */ private ClientInfo m_info; /** Returns the last collected times as a String. <p>The output is structured as follows <p>protocol addr:port nb_sent nb_received timeout [times]+ <p>for example: <p><tt>TCP 132.204.24.179:50 10 0 1000 !6.713ms !4.896ms !3.770ms !4.588ms !8.609ms * !21.504ms !3.359ms !8.367ms !3.439ms</tt> @return The last collected times */ public String getLastPings() { return m_tcp_times; } public void clearPings() { m_tcp_times = ""; } /** Pings an external IP address using the default port (80). */ public int ping(InetAddress addr) throws InterruptedException { return ping(addr, 80); } /** Pings an external IP address using a specific port. A string containing the summary and times gathered is constructed, and accessible through TCP_Ping.getLastPings() after having called ping(). If an error occured, getLastPings() is undefined (may contain previous call's values). <p>The output is structured as follows <p>protocol addr:port nb_sent nb_received timeout [times]+ <p>and times may be prefixed by ! if the connection is refused or fails rapidly, * (without time, just * alone) if it timed out, and prefixed by ? if some other error occured @see TcpPinger#getLastPings() @see TcpPinger#clearPings() @param addr The address to ping @param port The port to ping @return 0 (for compatibility with other pinger-classes that return the exit code) */ public int ping(InetAddress addr, int port) throws InterruptedException { DecimalFormat format = new DecimalFormat("0.000"); InetSocketAddress sock_addr = new InetSocketAddress(addr,port); String times = ""; int fails = 0; for (int p = 0; p < m_info.getNumberOfPings(); p++) { Socket ping_socket = new Socket(); String prefix = " "; if (p != 0) { // Sleep half a second Thread.sleep(500); } boolean timed_out = false; long start = System.nanoTime(); try { ping_socket.connect(sock_addr, m_info.getTCPTimeOut()); } catch (ConnectException e) { fails++; prefix = " !"; } catch (SocketTimeoutException e) { fails++; prefix = " *"; timed_out = true; } catch (Exception e) { fails++; prefix = " ?"; } long stop = System.nanoTime(); // if the connection was refused/quick error'd : it has ! as a prefix // if the connection timed out, it is shown as * (without time) // if some other error occured, it is prefixed with ? // times += prefix + (timed_out ? "" : format.format((stop-start) / 1.0e6f) + "ms" ); } // The string returned is structured as follows: // protocol addr:port sent received timeoutvalue [ times ]+ // m_tcp_times = "TCP " + addr.toString().split("/")[1] + ":" + port + " " + m_info.getNumberOfPings() + " " + (m_info.getNumberOfPings()-fails) + " " + m_info.getTCPTimeOut() + times; return 0; } /** Creates a TcpPinger (linked to a ClientInfo configuration) @param this_info A reference to a ClientInfo @see ClientInfo */ public TcpPinger(ClientInfo this_info) { m_tcp_times = ""; m_info = this_info; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
4d4e243a70adb2580e8e947414069207ca5010c4
a217123228e3015da161eebb1848bd39081e7095
/marathon-javafx/marathon-javafx-recorder/src/main/java/net/sourceforge/marathon/javafxrecorder/component/RFXSpinner.java
d9734615d9352c19ea7e2a9f99adc65986130b9c
[ "Apache-2.0" ]
permissive
matamehta/marathonv5
7455c90817e7b9bcb07e9fc88ceddbe5890b35e6
abb640eb2a447a45560351f4c77113a052064688
refs/heads/master
2021-01-25T14:49:33.496503
2018-02-12T07:06:56
2018-02-12T07:06:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,903
java
/******************************************************************************* * Copyright 2016 Jalian Systems Pvt. Ltd. * * 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 net.sourceforge.marathon.javafxrecorder.component; import java.util.logging.Logger; import javafx.geometry.Point2D; import javafx.scene.Node; import javafx.scene.control.Spinner; import net.sourceforge.marathon.javafxrecorder.IJSONRecorder; import net.sourceforge.marathon.javafxrecorder.JSONOMapConfig; public class RFXSpinner extends RFXComponent { public static final Logger LOGGER = Logger.getLogger(RFXSpinner.class.getName()); private String oldValue; public RFXSpinner(Node source, JSONOMapConfig omapConfig, Point2D point, IJSONRecorder recorder) { super(source, omapConfig, point, recorder); } @Override public void focusGained(RFXComponent prev) { oldValue = getSpinnerText((Spinner<?>) node); } @Override public void focusLost(RFXComponent next) { Spinner<?> spinner = (Spinner<?>) node; String currentValue = getSpinnerText(spinner); if (!currentValue.equals(oldValue)) { recorder.recordSelect(this, currentValue); } } @Override public String _getText() { return getSpinnerText((Spinner<?>) node); } }
[ "dakshinamurthy.karra@jaliansystems.com" ]
dakshinamurthy.karra@jaliansystems.com
6ceb5f0b5ede6f9255bf423ed529b28038456597
7a720d8496be69fe547a34891b0e49289cc133a2
/src/day07_ForLoop/Q04.java
ac19d6ee615d5535a3d42202f8359c3099caccc6
[]
no_license
yamangokhan/Summer2021Practice
e06300a5acf744e4ac47a0cdf7dccae06db2b896
bb81f7b7d5bae479707c3efe707d062485fe85c2
refs/heads/master
2023-07-31T22:32:58.837266
2021-09-09T20:31:27
2021-09-09T20:31:27
null
0
0
null
null
null
null
ISO-8859-9
Java
false
false
726
java
package day07_ForLoop; import java.util.Scanner; public class Q04 { public static void main(String[] args) { // kullanฤฑcฤฑdan 5 adet sayฤฑ isteyiniz. // bu sayฤฑlardan 5 ile 10 arasฤฑndakiler hariรง diฤŸerlerinin toplamฤฑnฤฑ bulunuz. // bu soruyu continue kullanarak รงรถzรผnรผz. Scanner scan = new Scanner (System.in); int sum= 0; for (int i = 1; i <= 5; i++) { System.out.print("lรผtfen bir sayฤฑ giriniz: "); int sayi = scan.nextInt(); if (sayi>=5 && sayi<10) { System.err.println("GirdiฤŸiniz sayฤฑ 5 ile 10 arasฤฑnda olduฤŸundan toplama yapฤฑlmamaktadฤฑr."); continue; }else { sum+=sayi; } } System.out.println("Sayฤฑlarฤฑn toplamฤฑ : "+sum); scan.close(); } }
[ "mottnr@gmail.com" ]
mottnr@gmail.com
e5792991b970db3c13713dd13c7dea4186721b6e
3a5985651d77a31437cfdac25e594087c27e93d6
/contrib-demo/xacml/netbeans-module/src/xacmlmodule/project/customizer/SEPluginProjectCustomizerModel.java
acad91d40b363c4f5cbb0517c12293344ddfe5a9
[]
no_license
vitalif/openesb-components
a37d62133d81edb3fdc091abd5c1d72dbe2fc736
560910d2a1fdf31879e3d76825edf079f76812c7
refs/heads/master
2023-09-04T14:40:55.665415
2016-01-25T13:12:22
2016-01-25T13:12:33
48,222,841
0
5
null
null
null
null
UTF-8
Java
false
false
4,564
java
/* * SEPluginProjectCustomizerModel.java * */ package xacmlmodule.project.customizer; import java.io.IOException; import javax.swing.ButtonModel; import javax.swing.text.Document; import org.netbeans.api.project.Project; import org.netbeans.api.project.ProjectManager; import xacmlmodule.project.SEPluginProjectProperties; import org.netbeans.spi.project.support.ant.AntProjectHelper; import org.netbeans.spi.project.support.ant.EditableProperties; import org.netbeans.spi.project.support.ant.PropertyEvaluator; import org.netbeans.spi.project.support.ant.ReferenceHelper; import org.netbeans.spi.project.support.ant.ui.StoreGroup; import org.openide.ErrorManager; import org.openide.filesystems.FileObject; import org.openide.util.Mutex; import org.openide.util.MutexException; /** * * @author chikkala */ public class SEPluginProjectCustomizerModel { private Project mProject; private AntProjectHelper mAntPrjHelper; private ReferenceHelper mRefHelper; private StoreGroup mPrjPropsStore; private Document mSUTargetModel; private Document mSUNameModel; private Document mSUDescModel; private Document mSUZipModel; private ButtonModel mSUZipCompressModel; private Document mBuildFilesExcludesModel; /** Creates a new instance of Customizer UI Model and initializes it */ public SEPluginProjectCustomizerModel(Project project, AntProjectHelper antProjectHelper, ReferenceHelper refHelper) { this.mProject = project; this.mAntPrjHelper = antProjectHelper; this.mRefHelper = refHelper; this.mPrjPropsStore = new StoreGroup(); init(); } public Document getSUTargetModel() { return this.mSUTargetModel; } public Document getSUNameModel() { return this.mSUNameModel; } public Document getSUDescriptionModel() { return this.mSUDescModel; } public Document getSUZipModel() { return this.mSUZipModel; } public ButtonModel getJarCompressModel() { return this.mSUZipCompressModel; } public Document getBuildFilesExcludesModel() { return this.mBuildFilesExcludesModel; } /** Initializes the visual models */ private void init() { // initialize visual models from project properties PropertyEvaluator evaluator = this.mAntPrjHelper.getStandardPropertyEvaluator(); // cutomizer-general this.mSUTargetModel = this.mPrjPropsStore.createStringDocument(evaluator, SEPluginProjectProperties.JBI_SU_TARGET_NAME); this.mSUNameModel = this.mPrjPropsStore.createStringDocument(evaluator, SEPluginProjectProperties.JBI_SU_NAME); this.mSUDescModel = this.mPrjPropsStore.createStringDocument(evaluator, SEPluginProjectProperties.JBI_SU_DESCRIPTION); // customizer-package this.mSUZipModel = this.mPrjPropsStore.createStringDocument(evaluator, SEPluginProjectProperties.JBI_SU_ZIP); this.mSUZipCompressModel = this.mPrjPropsStore.createToggleButtonModel( evaluator, SEPluginProjectProperties.JAR_COMPRESS ); this.mBuildFilesExcludesModel = this.mPrjPropsStore.createStringDocument(evaluator, SEPluginProjectProperties.BUILD_FILES_EXCLUDES); } /** Save visual models to project properties and other metadata */ public void save() { try { // Store properties @SuppressWarnings("unchecked") Boolean result = (Boolean) ProjectManager.mutex().writeAccess(new Mutex.ExceptionAction() { final FileObject projectDir = mAntPrjHelper.getProjectDirectory(); public Object run() throws IOException { //TODO: regenreate any project build script and project metadata if required. // store project properties. storeProperties(); return Boolean.TRUE; } }); // and save project if required. if (result == Boolean.TRUE) { ProjectManager.getDefault().saveProject(mProject); } } catch (MutexException e) { ErrorManager.getDefault().notify((IOException)e.getException()); } catch ( IOException ex ) { ErrorManager.getDefault().notify( ex ); } } private void storeProperties() throws IOException { EditableProperties projectProperties = mAntPrjHelper.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH); this.mPrjPropsStore.store(projectProperties); } }
[ "bitbucket@bitbucket02.private.bitbucket.org" ]
bitbucket@bitbucket02.private.bitbucket.org
f6df34235caf50f6643614330683b4c2de6a59c7
e6356bebcc294ef7c8af2f828ebdbcf34fb1cf95
/3 survey-handover_mhub@a7072cb1c04/service/src/main/java/com/mainlevel/monitoring/survey/service/model/ResultQuestion.java
b6cd89203a540da54e86918ee89aa0ec302bf3e0
[]
no_license
kondwa/nape-backend
e7a0a9df042a8d2fe3c24ff65e7eb58ae276bb04
3d877a05707177081a0fb14ae0728363261cb74b
refs/heads/master
2023-02-11T02:49:44.226746
2021-01-07T11:11:32
2021-01-07T11:11:32
327,583,710
0
0
null
null
null
null
UTF-8
Java
false
false
667
java
/* * ReportingPeriodDTO.java - v1.0.0 - 17.04.2016 * Copyright 2016, Reiner Hoppe. All rights reserved. */ package com.mainlevel.monitoring.survey.service.model; import java.util.List; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.ToString; /** * Represents one question in survey result. */ @Builder @AllArgsConstructor @NoArgsConstructor @Data @EqualsAndHashCode(callSuper = false) @ToString(callSuper = false) public class ResultQuestion { private String name; private List<ResultAnswer> answers; private List<ResultRow> rows; }
[ "kondwa@gmail.com" ]
kondwa@gmail.com
974c829a21ccfdb0b572423558454d79e0e323fd
38610ac1caf50647ad391a27d653d7a724e73905
/src/main/test/ua/training/model/dao/implementation/JDBCUserDaoTest.java
0c2477c5ccd102cccaf32445c4173dcfc2925b7f
[]
no_license
Dean4iq/Railway-ticket-office
dc0d6b8941d473f516c8b9769ebd2537d2a0dfb9
ce6d27d0fccae098e41dad96754ed7969dbbe134
refs/heads/master
2020-04-13T11:13:36.773445
2019-01-12T22:58:22
2019-01-12T22:58:22
163,167,933
0
0
null
null
null
null
UTF-8
Java
false
false
2,877
java
package ua.training.model.dao.implementation; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.Mockito; import ua.training.model.dao.UserDao; import ua.training.model.entity.User; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.when; public class JDBCUserDaoTest { @Mock Connection connection = Mockito.mock(Connection.class); @Mock ResultSet resultSet = Mockito.mock(ResultSet.class); @Mock PreparedStatement preparedStatement = Mockito.mock(PreparedStatement.class); private UserDao userDao; private User user1; private User user2; @Before public void setUp() throws Exception { user1 = new User(); user2 = null; user1.setLogin("WillWillSmithSmith"); user1.setPassword("WillSmith"); user1.setName("Will"); user1.setLastName("Smith"); user1.setNameUA("ะฃั–ะปะป"); user1.setLastNameUA("ะšะพะฒะฐะปัŒ"); user1.setAdmin(false); when(connection.prepareStatement(anyString())).thenReturn(preparedStatement); when(preparedStatement.executeUpdate()).thenReturn(1); when(preparedStatement.executeQuery()).thenReturn(resultSet); when(resultSet.next()).thenReturn(true).thenReturn(true).thenReturn(false); when(resultSet.getString("login")).thenReturn(user1.getLogin()); when(resultSet.getString("password")).thenReturn(user1.getPassword()); when(resultSet.getString("name")).thenReturn(user1.getName()); when(resultSet.getString("last_name")).thenReturn(user1.getLastName()); when(resultSet.getString("name_ua")).thenReturn(user1.getNameUA()); when(resultSet.getString("last_name_ua")).thenReturn(user1.getLastNameUA()); when(resultSet.getBoolean("admin")).thenReturn(user1.isAdmin()); userDao = new JDBCUserDao(connection); } @Test(expected = IllegalArgumentException.class) public void createWithIllegalArgument() throws SQLException { userDao.create(user2); } @Test public void findById() { User user = userDao.findById("CrocodileMan"); assertEquals(user1, user); } @Test public void findAllNotEmpty() { List<User> userList = userDao.findAll(); assertTrue(userList.size() > 0); } @Test public void findAllExactlySize() { List<User> userList = userDao.findAll(); assertEquals(2, userList.size()); } @Test public void findAll() { List<User> userList = userDao.findAll(); assertEquals(userList.get(0), user1); } }
[ "denis.ua22@gmail.com" ]
denis.ua22@gmail.com
c8f4604040d719aca715ccc10de92775a46e978c
fc6c7a82fcad534ddc06cb368d9209384f74a385
/1.JavaSyntax/src/com/javarush/task/task09/task0911/Solution.java
66939a6d3ce15bd369ffa359bd3edc288a213be9
[]
no_license
edmams789/JavaRushTasks
51d2cb4525b98f3e79718a58fb6301aa8eb43570
d8c8d33af04cd1ea67d846db1d0a435462fabd60
refs/heads/master
2023-05-05T12:20:34.636306
2021-05-19T14:45:35
2021-05-19T14:45:35
368,760,470
0
0
null
null
null
null
UTF-8
Java
false
false
1,404
java
package com.javarush.task.task09.task0911; import java.awt.*; import java.util.HashMap; /* ะ˜ัะบะปัŽั‡ะตะฝะธะต ะฟั€ะธ ั€ะฐะฑะพั‚ะต ั ะบะพะปะปะตะบั†ะธัะผะธ Map ะŸะตั€ะตั…ะฒะฐั‚ะธั‚ัŒ ะธัะบะปัŽั‡ะตะฝะธะต (ะธ ะฒั‹ะฒะตัั‚ะธ ะตะณะพ ะฝะฐ ัะบั€ะฐะฝ), ัƒะบะฐะทะฐะฒ ะตะณะพ ั‚ะธะฟ, ะฒะพะทะฝะธะบะฐัŽั‰ะตะต ะฟั€ะธ ะฒั‹ะฟะพะปะฝะตะฝะธะธ ะบะพะดะฐ: HashMap map = new HashMap(null); map.put(null, null); map.remove(null); ะขั€ะตะฑะพะฒะฐะฝะธั: 1. ะŸั€ะพะณั€ะฐะผะผะฐ ะดะพะปะถะฝะฐ ะฒั‹ะฒะพะดะธั‚ัŒ ัะพะพะฑั‰ะตะฝะธะต ะฝะฐ ัะบั€ะฐะฝ. 2. ะ’ ะฟั€ะพะณั€ะฐะผะผะต ะดะพะปะถะตะฝ ะฑั‹ั‚ัŒ ะฑะปะพะบ try-catch. 3. ะŸั€ะพะณั€ะฐะผะผะฐ ะดะพะปะถะฝะฐ ะพั‚ะปะฐะฒะปะธะฒะฐั‚ัŒ ะธัะบะปัŽั‡ะตะฝะธั ะบะพะฝะบั€ะตั‚ะฝะพะณะพ ั‚ะธะฟะฐ, ะฐ ะฝะต ะฒัะต ะฒะพะทะผะพะถะฝั‹ะต (Exception). 4. ะ’ั‹ะฒะตะดะตะฝะฝะพะต ัะพะพะฑั‰ะตะฝะธะต ะดะพะปะถะฝะพ ัะพะดะตั€ะถะฐั‚ัŒ ั‚ะธะฟ ะฒะพะทะฝะธะบัˆะตะณะพ ะธัะบะปัŽั‡ะตะฝะธั. 5. ะ˜ะผะตัŽั‰ะธะนัั ะบะพะด ะฒ ะผะตั‚ะพะดะต main ะฝะต ัƒะดะฐะปัั‚ัŒ. */ public class Solution { public static void main(String[] args) throws Exception { //ะฝะฐะฟะธัˆะธั‚ะต ั‚ัƒั‚ ะฒะฐัˆ ะบะพะด try { HashMap<String, String> map = new HashMap<String, String>(null); map.put(null, null); map.remove(null); } //ะฝะฐะฟะธัˆะธั‚ะต ั‚ัƒั‚ ะฒะฐัˆ ะบะพะด catch (NullPointerException e) { System.out.println("NullPointerException has been caught"); } } }
[ "edmams789@gmail.com" ]
edmams789@gmail.com
dcbaa0b6aa02281fabec69979707f24e2967367e
0b26aac6cb5103a25ee1cf73663a3e0adff780b4
/kubernetes/src/test/java/io/kubernetes/client/openapi/models/ExtensionsV1beta1SupplementalGroupsStrategyOptionsTest.java
c860562fd82fdb90c9735e96f3f05b7be7d078f4
[ "Apache-2.0" ]
permissive
wings-software/java
b7b551989aaf6a943b0f9bf26c4e030ddc6a99f6
ec60b5246a444631fb1a2c72bda6bfb901679bef
refs/heads/master
2020-09-20T14:28:47.084448
2019-12-18T20:41:46
2019-12-18T20:41:46
224,510,803
1
0
Apache-2.0
2019-12-18T20:41:47
2019-11-27T20:21:05
null
UTF-8
Java
false
false
1,718
java
/* * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.15.6 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package io.kubernetes.client.openapi.models; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.ExtensionsV1beta1IDRange; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** * Model tests for ExtensionsV1beta1SupplementalGroupsStrategyOptions */ public class ExtensionsV1beta1SupplementalGroupsStrategyOptionsTest { private final ExtensionsV1beta1SupplementalGroupsStrategyOptions model = new ExtensionsV1beta1SupplementalGroupsStrategyOptions(); /** * Model tests for ExtensionsV1beta1SupplementalGroupsStrategyOptions */ @Test public void testExtensionsV1beta1SupplementalGroupsStrategyOptions() { // TODO: test ExtensionsV1beta1SupplementalGroupsStrategyOptions } /** * Test the property 'ranges' */ @Test public void rangesTest() { // TODO: test ranges } /** * Test the property 'rule' */ @Test public void ruleTest() { // TODO: test rule } }
[ "291271447@qq.com" ]
291271447@qq.com
f6f491af6441f33507e2806587f5c0fd7ddca416
71071f98d05549b67d4d6741e8202afdf6c87d45
/files/Spring_XD/XD-2831/spring-xd-dirt/src/main/java/org/springframework/xd/dirt/server/DefaultModuleDeploymentPropertiesProvider.java
14cc6a6463dc7097fc06a4364d22e6c1b838ce7a
[]
no_license
Sun940201/SpringSpider
0adcdff1ccfe9ce37ba27e31b22ca438f08937ad
ff2fc7cea41e8707389cb62eae33439ba033282d
refs/heads/master
2022-12-22T09:01:54.550976
2018-06-01T06:31:03
2018-06-01T06:31:03
128,649,779
1
0
null
2022-12-16T00:51:27
2018-04-08T14:30:30
Java
UTF-8
Java
false
false
2,354
java
/* * Copyright 2014 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.xd.dirt.server; import java.util.HashMap; import java.util.Map; import org.springframework.xd.dirt.core.DeploymentUnit; import org.springframework.xd.dirt.util.DeploymentPropertiesUtility; import org.springframework.xd.module.ModuleDeploymentProperties; import org.springframework.xd.module.ModuleDescriptor; /** * Default implementation that retrieves the {@link ModuleDeploymentProperties} for the given * {@link ModuleDescriptor}. * * @author Ilayaperumal Gopinathan */ public class DefaultModuleDeploymentPropertiesProvider implements ModuleDeploymentPropertiesProvider<ModuleDeploymentProperties> { /** * Cache of module deployment properties. */ private final Map<ModuleDescriptor.Key, ModuleDeploymentProperties> mapDeploymentProperties = new HashMap<ModuleDescriptor.Key, ModuleDeploymentProperties>(); /** * DeploymentUnit (stream/job) to create module deployment properties for. */ private final DeploymentUnit deploymentUnit; /** * * @param deploymentUnit deployment unit (stream/job) to create module properties for */ public DefaultModuleDeploymentPropertiesProvider(DeploymentUnit deploymentUnit) { this.deploymentUnit = deploymentUnit; } /** * {@inheritDoc} */ @Override public ModuleDeploymentProperties propertiesForDescriptor(ModuleDescriptor moduleDescriptor) { ModuleDescriptor.Key key = moduleDescriptor.createKey(); ModuleDeploymentProperties properties = mapDeploymentProperties.get(key); if (properties == null) { properties = DeploymentPropertiesUtility.createModuleDeploymentProperties( deploymentUnit.getDeploymentProperties(), moduleDescriptor); mapDeploymentProperties.put(key, properties); } return properties; } }
[ "527474541@qq.com" ]
527474541@qq.com
dff76940771f2fa1d34d0aa69dfb2367132176f6
5a076617e29016fe75d6421d235f22cc79f8f157
/androidtalk_2010_11_17ใ€Sundy็ณปๅˆ—ใ€‘ๅ…จ็œ‹ๆ‡‚ไบ†-ๅŠ ไธคๅนด็ป้ชŒ-่ฏญ้Ÿณๆœ—่ฏป-่ฏญ้Ÿณ่ฏ†ๅˆซ-่ฏญ้Ÿณ/Study/TextOpration.java
fbacc0cad4d98d6bb7c00dca2b9f90afdf7699ef
[]
no_license
dddddttttt/androidsourcecodes
516b8c79cae7f4fa71b97a2a470eab52844e1334
3d13ab72163bbeed2ef226a476e29ca79766ea0b
refs/heads/master
2020-08-17T01:38:54.095515
2018-04-08T15:17:24
2018-04-08T15:17:24
null
0
0
null
null
null
null
GB18030
Java
false
false
2,532
java
package com.androidtalk; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.util.Arrays; import android.util.Log; public final class TextOpration { // ไธŽ็ผ–็ ๆ ผๅผๆœ‰ๅ…ณ private final static String ENC_UTF16BE = "UTF-16BE"; private final static String ENC_UTF8 = "UTF-8"; private final static String ENC_GB2312 = "GB2312"; private File _file; //ไธŽๆ–‡ไปถๆ“ไฝœๆœ‰ๅ…ณ็š„ๅ˜้‡ private String fullBookName; // ๅ…จ่ทฏๅพ„ไนฆๅ private String bookName; // ๆ— ่ทฏๅพ„ไนฆๅ private long bookSize; // size of the book private InputStream fis; private String bookFormat; // ๆ–‡ไปถๆ ผๅผ public TextOpration(String fileName) { setFullBookName(fileName); byte[] headOfBook = new byte[3]; try { _file = new File(fileName); bookSize = _file.length(); fis = new FileInputStream(_file); fis.read(headOfBook); //่ฏปๆ–‡ไปถๅคดไธ‰ไธชๅญ—่Š‚๏ผŒๅˆคๆ–ญๆ–‡ไปถ็ผ–็ ๆ ผๅผ fis.close(); fis = null; } catch (IOException ioe) { ioe.printStackTrace(); } // ๅˆคๆ–ญ็ผ–็ ๆ ผๅผ if ((headOfBook[0] == -2) && (headOfBook[1] == -1)) { bookFormat = ENC_UTF16BE; } else if ((headOfBook[0] == -1) && (headOfBook[1] == -2)) { bookFormat = ENC_UTF16BE; } else if ((headOfBook[0] == -17) && (headOfBook[1] == -69) &&(headOfBook[2] == -65)) { bookFormat = ENC_UTF8; // UTF8 with BOM } else { bookFormat = ENC_GB2312; } } public String getStringFromFile() { try { StringBuffer sBuffer = new StringBuffer(); fis = new FileInputStream(_file); InputStreamReader inputStreamReader = new InputStreamReader(fis, bookFormat); BufferedReader in = new BufferedReader(inputStreamReader); if(!_file.exists()) { return null; } while (in.ready()) { sBuffer.append(in.readLine() + "\n"); } in.close(); return sBuffer.toString(); } catch (Exception e) { e.printStackTrace(); } return null; } private void Erro(String str){ Log.d("TAG", str); } public long getBookSize() { return bookSize; } public void setFullBookName(String fileName){ fullBookName = fileName; int i = fileName.lastIndexOf('/') + 1; int t = fileName.lastIndexOf('.'); bookName = fileName.substring(i, t); } public String getBookName() { return bookName; } }
[ "harry.han@gmail.com" ]
harry.han@gmail.com
e07361d51c4c5c33f54b82bc9df6dcf3674c15ef
6e57bdc0a6cd18f9f546559875256c4570256c45
/packages/apps/Launcher3/quickstep/src/com/android/launcher3/uioverrides/OverviewToAllAppsTouchController.java
b7cffa7a9d698ee77b21402ae29acc6a02e7ec0e
[ "Apache-2.0" ]
permissive
dongdong331/test
969d6e945f7f21a5819cd1d5f536d12c552e825c
2ba7bcea4f9d9715cbb1c4e69271f7b185a0786e
refs/heads/master
2023-03-07T06:56:55.210503
2020-12-07T04:15:33
2020-12-07T04:15:33
134,398,935
2
1
null
2022-11-21T07:53:41
2018-05-22T10:26:42
null
UTF-8
Java
false
false
3,104
java
/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.launcher3.uioverrides; import static com.android.launcher3.LauncherState.ALL_APPS; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; import android.view.MotionEvent; import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.quickstep.TouchInteractionService; import com.android.quickstep.views.RecentsView; import com.sprd.ext.multimode.MultiModeController; /** * Touch controller from going from OVERVIEW to ALL_APPS. * * This is used in landscape mode. It is also used in portrait mode for the fallback recents. */ public class OverviewToAllAppsTouchController extends PortraitStatesTouchController { public OverviewToAllAppsTouchController(Launcher l) { super(l); } @Override protected boolean canInterceptTouch(MotionEvent ev) { if (mCurrentAnimation != null) { // If we are already animating from a previous state, we can intercept. return true; } if (AbstractFloatingView.getTopOpenView(mLauncher) != null) { return false; } if (mLauncher.isInState(ALL_APPS)) { // In all-apps only listen if the container cannot scroll itself return mLauncher.getAppsView().shouldContainerScroll(ev); } else if (mLauncher.isInState(NORMAL)) { return !MultiModeController.isSingleLayerMode(); } else if (mLauncher.isInState(OVERVIEW)) { RecentsView rv = mLauncher.getOverviewPanel(); return !MultiModeController.isSingleLayerMode() && ev.getY() > (rv.getBottom() - rv.getPaddingBottom()); } else { return false; } } @Override protected LauncherState getTargetState(LauncherState fromState, boolean isDragTowardPositive) { if (fromState == ALL_APPS && !isDragTowardPositive) { // Should swipe down go to OVERVIEW instead? return TouchInteractionService.isConnected() ? mLauncher.getStateManager().getLastState() : NORMAL; } else if (isDragTowardPositive) { return ALL_APPS; } return fromState; } @Override protected int getLogContainerTypeForNormalState() { return LauncherLogProto.ContainerType.WORKSPACE; } }
[ "dongdong331@163.com" ]
dongdong331@163.com
ce77beada7b970dc7d071b8e0a7fc0287742fe4a
f563d5aedb3441a9ff872eeb4d561dfa78ecfb9c
/src/headfirst/combined/djview/ControllerInterface.java
856490037285372de4a34382701bfe7ec0560ff4
[]
no_license
nevenchen/headfirst
b1e72fd976cf8b0a52b8c8e8b89ba546e0f9a771
d7ec8272af10226f24de0a84ce598df281503b87
refs/heads/master
2021-01-25T03:49:36.487684
2019-04-24T01:37:32
2019-04-24T01:37:32
7,239,898
0
0
null
null
null
null
UTF-8
Java
false
false
173
java
package headfirst.combined.djview; public interface ControllerInterface { void start(); void stop(); void increaseBPM(); void decreaseBPM(); void setBPM(int bpm); }
[ "neven.chen@hotmail.com" ]
neven.chen@hotmail.com
ad957044396ef6454559146bf72012290d9db0a9
0dfbe8f98be8f04e9aad102bef22479f37b6ebe7
/2.JavaCore/src/com/javarush/task/task12/task1224/Solution.java
57e0d096322eb25b3a9a26ca1cab06be107645fd
[]
no_license
evgeniykarpenko/MyJavaRushTasks
4a6134bad734bac5cadd7d7591b82a89ea9dc4db
07aeab9e89c89f0ddf38ea3c1b3ccb78a0d4f5ce
refs/heads/master
2020-04-18T04:17:58.702797
2019-02-20T19:56:12
2019-02-20T19:56:12
167,233,011
0
0
null
null
null
null
UTF-8
Java
false
false
945
java
package com.javarush.task.task12.task1224; /* ะะตะฒะตะดะพะผะฐ ะทะฒะตั€ัƒัˆะบะฐ */ public class Solution { public static void main(String[] args) { System.out.println(getObjectType(new Cat())); System.out.println(getObjectType(new Tiger())); System.out.println(getObjectType(new Lion())); System.out.println(getObjectType(new Bull())); System.out.println(getObjectType(new Pig())); } public static String getObjectType(Object o) { //ะฝะฐะฟะธัˆะธั‚ะต ั‚ัƒั‚ ะฒะฐัˆ ะบะพะด if(o instanceof Cat) return "ะšะพั‚"; else if(o instanceof Tiger) return "ะขะธะณั€"; else if(o instanceof Lion) return "ะ›ะตะฒ"; else if(o instanceof Bull) return "ะ‘ั‹ะบ"; return "ั…ะท"; } public static class Cat { } public static class Tiger { } public static class Lion { } public static class Bull { } public static class Pig { } }
[ "izifrag@yandex.ru" ]
izifrag@yandex.ru
b1e69c6eebf9720bcba1238e4b3077bcaa55df4a
ae6b36ea0c1e5e8a5f52a59db155b698e1d6b558
/src/test/java/com/github/fge/jsonschema/old/keyword/draftv4/DraftV4KeywordValidatorTest.java
db5a2dd8fe664f7625e587edb07314b9c1362156
[]
no_license
erwink/json-schema-validator
5eeae39fb95ead27131c689a22757dc3d97d00b1
dce5c64379e455488c60f8f59cfbe7ba99fbb5f8
refs/heads/master
2020-12-25T17:14:45.268780
2013-02-08T14:00:32
2013-02-08T14:00:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,215
java
/* * Copyright (c) 2012, Francis Galiegue <fgaliegue@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the Lesser 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 * Lesser 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 com.github.fge.jsonschema.old.keyword.draftv4; import com.github.fge.jsonschema.metaschema.BuiltinSchemas; import com.github.fge.jsonschema.old.keyword.AbstractKeywordValidatorTest; import java.io.IOException; public abstract class DraftV4KeywordValidatorTest extends AbstractKeywordValidatorTest { protected DraftV4KeywordValidatorTest(final String resourceName) throws IOException { super(BuiltinSchemas.DRAFTV4_CORE, resourceName); } }
[ "fgaliegue@gmail.com" ]
fgaliegue@gmail.com
cf625249b6f289cdaa771fd5ce0a453f0f14c83f
a0dfd5c1ac53014855cbdb6c5baf34ee96923b79
/net/minecraft/scoreboard/ScoreboardSaveData.java
ca9366e18fe52162f2872115ea1abe1fc650eaef
[]
no_license
a3535ed54a5ee6917a46cfa6c3f12679/5ab07bac_orizia_v1
13b0d93ea8cd77e82f0d2e151b00fa41559fe145
1b7507aabd17dea3981a765a18f0798f20815cd7
refs/heads/master
2021-05-08T16:41:38.684821
2018-02-12T14:56:34
2018-02-12T14:56:34
120,166,619
0
0
null
null
null
null
UTF-8
Java
false
false
8,130
java
package net.minecraft.scoreboard; import java.util.Collection; import java.util.Iterator; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.nbt.NBTTagString; import net.minecraft.world.WorldSavedData; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class ScoreboardSaveData extends WorldSavedData { private static final Logger logger = LogManager.getLogger(); private Scoreboard theScoreboard; private NBTTagCompound field_96506_b; private static final String __OBFID = "CL_00000620"; public ScoreboardSaveData() { this("scoreboard"); } public ScoreboardSaveData(String p_i2310_1_) { super(p_i2310_1_); } public void func_96499_a(Scoreboard p_96499_1_) { this.theScoreboard = p_96499_1_; if (this.field_96506_b != null) { this.readFromNBT(this.field_96506_b); } } /** * reads in data from the NBTTagCompound into this MapDataBase */ public void readFromNBT(NBTTagCompound p_76184_1_) { if (this.theScoreboard == null) { this.field_96506_b = p_76184_1_; } else { this.func_96501_b(p_76184_1_.getTagList("Objectives", 10)); this.func_96500_c(p_76184_1_.getTagList("PlayerScores", 10)); if (p_76184_1_.func_150297_b("DisplaySlots", 10)) { this.func_96504_c(p_76184_1_.getCompoundTag("DisplaySlots")); } if (p_76184_1_.func_150297_b("Teams", 9)) { this.func_96498_a(p_76184_1_.getTagList("Teams", 10)); } } } protected void func_96498_a(NBTTagList p_96498_1_) { for (int var2 = 0; var2 < p_96498_1_.tagCount(); ++var2) { NBTTagCompound var3 = p_96498_1_.getCompoundTagAt(var2); ScorePlayerTeam var4 = this.theScoreboard.createTeam(var3.getString("Name")); var4.setTeamName(var3.getString("DisplayName")); var4.setNamePrefix(var3.getString("Prefix")); var4.setNameSuffix(var3.getString("Suffix")); if (var3.func_150297_b("AllowFriendlyFire", 99)) { var4.setAllowFriendlyFire(var3.getBoolean("AllowFriendlyFire")); } if (var3.func_150297_b("SeeFriendlyInvisibles", 99)) { var4.setSeeFriendlyInvisiblesEnabled(var3.getBoolean("SeeFriendlyInvisibles")); } this.func_96502_a(var4, var3.getTagList("Players", 8)); } } protected void func_96502_a(ScorePlayerTeam p_96502_1_, NBTTagList p_96502_2_) { for (int var3 = 0; var3 < p_96502_2_.tagCount(); ++var3) { this.theScoreboard.func_151392_a(p_96502_2_.getStringTagAt(var3), p_96502_1_.getRegisteredName()); } } protected void func_96504_c(NBTTagCompound p_96504_1_) { for (int var2 = 0; var2 < 3; ++var2) { if (p_96504_1_.func_150297_b("slot_" + var2, 8)) { String var3 = p_96504_1_.getString("slot_" + var2); ScoreObjective var4 = this.theScoreboard.getObjective(var3); this.theScoreboard.func_96530_a(var2, var4); } } } protected void func_96501_b(NBTTagList p_96501_1_) { for (int var2 = 0; var2 < p_96501_1_.tagCount(); ++var2) { NBTTagCompound var3 = p_96501_1_.getCompoundTagAt(var2); IScoreObjectiveCriteria var4 = (IScoreObjectiveCriteria)IScoreObjectiveCriteria.field_96643_a.get(var3.getString("CriteriaName")); ScoreObjective var5 = this.theScoreboard.addScoreObjective(var3.getString("Name"), var4); var5.setDisplayName(var3.getString("DisplayName")); } } protected void func_96500_c(NBTTagList p_96500_1_) { for (int var2 = 0; var2 < p_96500_1_.tagCount(); ++var2) { NBTTagCompound var3 = p_96500_1_.getCompoundTagAt(var2); ScoreObjective var4 = this.theScoreboard.getObjective(var3.getString("Objective")); Score var5 = this.theScoreboard.func_96529_a(var3.getString("Name"), var4); var5.func_96647_c(var3.getInteger("Score")); } } /** * write data to NBTTagCompound from this MapDataBase, similar to Entities and TileEntities */ public void writeToNBT(NBTTagCompound p_76187_1_) { if (this.theScoreboard == null) { logger.warn("Tried to save scoreboard without having a scoreboard..."); } else { p_76187_1_.setTag("Objectives", this.func_96505_b()); p_76187_1_.setTag("PlayerScores", this.func_96503_e()); p_76187_1_.setTag("Teams", this.func_96496_a()); this.func_96497_d(p_76187_1_); } } protected NBTTagList func_96496_a() { NBTTagList var1 = new NBTTagList(); Collection var2 = this.theScoreboard.getTeams(); Iterator var3 = var2.iterator(); while (var3.hasNext()) { ScorePlayerTeam var4 = (ScorePlayerTeam)var3.next(); NBTTagCompound var5 = new NBTTagCompound(); var5.setString("Name", var4.getRegisteredName()); var5.setString("DisplayName", var4.func_96669_c()); var5.setString("Prefix", var4.getColorPrefix()); var5.setString("Suffix", var4.getColorSuffix()); var5.setBoolean("AllowFriendlyFire", var4.getAllowFriendlyFire()); var5.setBoolean("SeeFriendlyInvisibles", var4.func_98297_h()); NBTTagList var6 = new NBTTagList(); Iterator var7 = var4.getMembershipCollection().iterator(); while (var7.hasNext()) { String var8 = (String)var7.next(); var6.appendTag(new NBTTagString(var8)); } var5.setTag("Players", var6); var1.appendTag(var5); } return var1; } protected void func_96497_d(NBTTagCompound p_96497_1_) { NBTTagCompound var2 = new NBTTagCompound(); boolean var3 = false; for (int var4 = 0; var4 < 3; ++var4) { ScoreObjective var5 = this.theScoreboard.func_96539_a(var4); if (var5 != null) { var2.setString("slot_" + var4, var5.getName()); var3 = true; } } if (var3) { p_96497_1_.setTag("DisplaySlots", var2); } } protected NBTTagList func_96505_b() { NBTTagList var1 = new NBTTagList(); Collection var2 = this.theScoreboard.getScoreObjectives(); Iterator var3 = var2.iterator(); while (var3.hasNext()) { ScoreObjective var4 = (ScoreObjective)var3.next(); NBTTagCompound var5 = new NBTTagCompound(); var5.setString("Name", var4.getName()); var5.setString("CriteriaName", var4.getCriteria().func_96636_a()); var5.setString("DisplayName", var4.getDisplayName()); var1.appendTag(var5); } return var1; } protected NBTTagList func_96503_e() { NBTTagList var1 = new NBTTagList(); Collection var2 = this.theScoreboard.func_96528_e(); Iterator var3 = var2.iterator(); while (var3.hasNext()) { Score var4 = (Score)var3.next(); NBTTagCompound var5 = new NBTTagCompound(); var5.setString("Name", var4.getPlayerName()); var5.setString("Objective", var4.func_96645_d().getName()); var5.setInteger("Score", var4.getScorePoints()); var1.appendTag(var5); } return var1; } }
[ "unknowlk@tuta.io" ]
unknowlk@tuta.io
45d5d709a885263fef12648551578f2803235c11
28f1dedfa55de3381f0e2124c7c819f582767e2a
/core/components/restlet/src/org/smartfrog/services/restlet/overrides/ExtendedResponse.java
8e0b29d9e0c0e278b33cc99f757d242984350b53
[]
no_license
rhusar/smartfrog
3bd0032888c03a8a04036945c2d857f72a89dba6
0b4db766fb1ec1e1c2e48cbf5f7bf6bfd2df4e89
refs/heads/master
2021-01-10T05:07:39.218946
2014-11-28T08:52:32
2014-11-28T08:52:32
47,347,494
0
1
null
null
null
null
UTF-8
Java
false
false
2,545
java
/* (C) Copyright 2008 Hewlett-Packard Development Company, LP This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA For more information: www.smartfrog.org */ package org.smartfrog.services.restlet.overrides; import org.restlet.data.Reference; import org.restlet.data.Request; import org.restlet.data.Response; import org.restlet.data.Status; /** * This is an extended response code. One thing we can do is detect forbidden response codes and fail early, not late * Created 28-Feb-2008 16:22:51 * */ public class ExtendedResponse extends Response { private int min=0, max=-1; public ExtendedResponse(Request request) { super(request); } public ExtendedResponse(Request request, int min, int max) { super(request); this.min = min; this.max = max; } /** * Fix redirection handling by setting the base reference to the host of the system * @param redirectUri URI to redirect to */ public void setRedirectRef(String redirectUri) { Reference baseRef=null; Reference resourceRef = getRequest().getResourceRef(); if (resourceRef != null) { if (resourceRef.getBaseRef() != null) { baseRef = resourceRef.getBaseRef(); } else { baseRef = resourceRef; } } setRedirectRef(new Reference(baseRef, redirectUri).getTargetRef()); } /** * Sets the status. * * @param status The status to set. * @throws RuntimeException if the status code is in the forbidden range */ public void setStatus(Status status) { super.setStatus(status); int code = status.getCode(); if ((max >= 0 && code > max) || (min > 0 && code < min)) { throw new RuntimeException("Status out of range " + status.toString() + " \n" + status.getDescription()); } } }
[ "steve_l@9868f95a-be1e-0410-b3e3-a02e98b909e6" ]
steve_l@9868f95a-be1e-0410-b3e3-a02e98b909e6
3922adb41783ee20f5bfcc0420ed9cf94fe2e867
83c877d9b2380a6bc049d8fcf0aa62ebb7d16647
/src/test/java/com/SpringBoot/RestCURD/SpringBootRestCurdApplicationTests.java
d3c8c9f9fbfdb6f4aaf87678d44f3d29a17e4ac1
[]
no_license
Fariha-Arifin/Springboot-Simple-REST-CURD
0ac973e98b9b5cc536843177ba7d316d36e8e671
694fa80d282140fab020ec92ee04c242a391e2b1
refs/heads/master
2023-04-20T23:09:37.215637
2021-05-08T08:51:24
2021-05-08T08:51:24
365,448,807
0
0
null
null
null
null
UTF-8
Java
false
false
227
java
package com.SpringBoot.RestCURD; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class SpringBootRestCurdApplicationTests { @Test void contextLoads() { } }
[ "farihaarifin@gmail.com" ]
farihaarifin@gmail.com
28c8eb0bda9a450f1a7d03ea5d5ed91e5f0a6f57
09649412e12bdc15cf61607e881203735cfafa50
/proxies/com/microsoft/bingads/v10/campaignmanagement/FixedBid.java
f55b7e018d3c4674f771cbf37d5fc92ed0f0ea9b
[ "MIT" ]
permissive
yosefarr/BingAds-Java-SDK
cec603b74a921e71c6173ce112caccdf7c1fdbc8
d1c333d0ba5b7e434c85a92c7a80dad0add0d634
refs/heads/master
2021-01-18T15:02:53.945816
2016-03-06T13:18:32
2016-03-06T13:18:32
51,738,651
0
1
null
2016-02-15T07:38:14
2016-02-15T07:38:13
null
UTF-8
Java
false
false
1,453
java
package com.microsoft.bingads.v10.campaignmanagement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for FixedBid complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="FixedBid"> * &lt;complexContent> * &lt;extension base="{https://bingads.microsoft.com/CampaignManagement/v10}CriterionBid"> * &lt;sequence> * &lt;element name="Bid" type="{https://bingads.microsoft.com/CampaignManagement/v10}Bid" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "FixedBid", propOrder = { "bid" }) public class FixedBid extends CriterionBid { @XmlElement(name = "Bid", nillable = true) protected Bid bid; /** * Gets the value of the bid property. * * @return * possible object is * {@link Bid } * */ public Bid getBid() { return bid; } /** * Sets the value of the bid property. * * @param value * allowed object is * {@link Bid } * */ public void setBid(Bid value) { this.bid = value; } }
[ "jiaj@microsoft.com" ]
jiaj@microsoft.com
6964a02f91561fe86e28ff70e1d82c95e51cc4ec
92f10c41bad09bee05acbcb952095c31ba41c57b
/app/src/main/java/io/github/alula/ohmygod/MainActivity771.java
ef65062fcd3198e0bb02b77bbbd6172973aa5a90
[]
no_license
alula/10000-activities
bb25be9aead3d3d2ea9f9ef8d1da4c8dff1a7c62
f7e8de658c3684035e566788693726f250170d98
refs/heads/master
2022-07-30T05:54:54.783531
2022-01-29T19:53:04
2022-01-29T19:53:04
453,501,018
16
0
null
null
null
null
UTF-8
Java
false
false
338
java
package io.github.alula.ohmygod; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; public class MainActivity771 extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }
[ "6276139+alula@users.noreply.github.com" ]
6276139+alula@users.noreply.github.com
de68c2f8dcf0ec10e5f71959b62be98d246b6812
47798511441d7b091a394986afd1f72e8f9ff7ab
/src/main/java/com/alipay/api/domain/AlipayOpenMiniDataPoiSyncModel.java
f17a995458fbff3a8bde756d59af8d2164d4e891
[ "Apache-2.0" ]
permissive
yihukurama/alipay-sdk-java-all
c53d898371032ed5f296b679fd62335511e4a310
0bf19c486251505b559863998b41636d53c13d41
refs/heads/master
2022-07-01T09:33:14.557065
2020-05-07T11:20:51
2020-05-07T11:20:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
605
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * ๅฐ็จ‹ๅบpoiๆ•ฐๆฎๅŒๆญฅ * * @author auto create * @since 1.0, 2019-07-29 16:33:16 */ public class AlipayOpenMiniDataPoiSyncModel extends AlipayObject { private static final long serialVersionUID = 3114574956572216527L; /** * poiๅ›žๆตๆ•ฐๆฎ */ @ApiField("poi_data") private PoiSyncData poiData; public PoiSyncData getPoiData() { return this.poiData; } public void setPoiData(PoiSyncData poiData) { this.poiData = poiData; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
f727c6f006dbb94457eb072c803cecbfec712a8f
e87f985fdd9177e92966f8b2e85b6e57662e7cf6
/jOOQ-test/src/org/jooq/test/access/generatedclasses/tables/records/TIdentityPkRecord.java
a56ece59403a67a3bf5e3f957aa9a7f892136cae
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
ben-manes/jOOQ
5ef43f8ea8c5c942dc0b2e0669cc927dca6f2ff7
9f160d5e869de1a9d66408d90718148f76c5e000
refs/heads/master
2023-09-05T03:27:56.109520
2013-08-26T09:48:14
2013-08-26T10:05:05
12,375,424
1
0
null
null
null
null
UTF-8
Java
false
false
2,729
java
/** * This class is generated by jOOQ */ package org.jooq.test.access.generatedclasses.tables.records; /** * This class is generated by jOOQ. */ @java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class TIdentityPkRecord extends org.jooq.impl.UpdatableRecordImpl<org.jooq.test.access.generatedclasses.tables.records.TIdentityPkRecord> implements org.jooq.Record2<java.lang.Integer, java.lang.Integer> { private static final long serialVersionUID = 1104657257; /** * Setter for <code>T_IDENTITY_PK.ID</code>. */ public void setId(java.lang.Integer value) { setValue(0, value); } /** * Getter for <code>T_IDENTITY_PK.ID</code>. */ public java.lang.Integer getId() { return (java.lang.Integer) getValue(0); } /** * Setter for <code>T_IDENTITY_PK.VAL</code>. */ public void setVal(java.lang.Integer value) { setValue(1, value); } /** * Getter for <code>T_IDENTITY_PK.VAL</code>. */ public java.lang.Integer getVal() { return (java.lang.Integer) getValue(1); } // ------------------------------------------------------------------------- // Primary key information // ------------------------------------------------------------------------- /** * {@inheritDoc} */ @Override public org.jooq.Record1<java.lang.Integer> key() { return (org.jooq.Record1) super.key(); } // ------------------------------------------------------------------------- // Record2 type implementation // ------------------------------------------------------------------------- /** * {@inheritDoc} */ @Override public org.jooq.Row2<java.lang.Integer, java.lang.Integer> fieldsRow() { return (org.jooq.Row2) super.fieldsRow(); } /** * {@inheritDoc} */ @Override public org.jooq.Row2<java.lang.Integer, java.lang.Integer> valuesRow() { return (org.jooq.Row2) super.valuesRow(); } /** * {@inheritDoc} */ @Override public org.jooq.Field<java.lang.Integer> field1() { return org.jooq.test.access.generatedclasses.tables.TIdentityPk.ID; } /** * {@inheritDoc} */ @Override public org.jooq.Field<java.lang.Integer> field2() { return org.jooq.test.access.generatedclasses.tables.TIdentityPk.VAL; } /** * {@inheritDoc} */ @Override public java.lang.Integer value1() { return getId(); } /** * {@inheritDoc} */ @Override public java.lang.Integer value2() { return getVal(); } // ------------------------------------------------------------------------- // Constructors // ------------------------------------------------------------------------- /** * Create a detached TIdentityPkRecord */ public TIdentityPkRecord() { super(org.jooq.test.access.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK); } }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
e957fd242a2cbe51f1d2219ea1dd8995916420b2
6839e7abfa2e354becd034ea46f14db3cbcc7488
/src/cn/com/sinosoft/action/admin/LogConfigAction.java
ed42010fc5ca3df9487ba5d59233fb9c99b0c584
[]
no_license
trigrass2/wj
aa2d310baa876f9e32a65238bcd36e7a2440b8c6
0d4da9d033c6fa2edb014e3a80715c9751a93cd5
refs/heads/master
2021-04-19T11:03:25.609807
2018-01-12T09:26:11
2018-01-12T09:26:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,208
java
package cn.com.sinosoft.action.admin; import java.lang.reflect.Method; import java.util.List; import java.util.Set; import javax.annotation.Resource; import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.StringUtils; import org.apache.struts2.convention.annotation.ParentPackage; import org.springframework.beans.BeanUtils; import cn.com.sinosoft.entity.LogConfig; import cn.com.sinosoft.service.LogConfigService; import cn.com.sinosoft.util.StrutsUtil; import com.opensymphony.xwork2.interceptor.annotations.InputConfig; import com.opensymphony.xwork2.validator.annotations.RequiredStringValidator; import com.opensymphony.xwork2.validator.annotations.Validations; /** * ๅŽๅฐAction็ฑป - ๆ—ฅๅฟ—่ฎพ็ฝฎ * ============================================================================ * * * * * * * KEY:SINOSOFT1F85E6BEB163D27BD7F7DC801AB8C0EE * ============================================================================ */ @ParentPackage("admin") public class LogConfigAction extends BaseAdminAction { private static final long serialVersionUID = 1294331179033448358L; private LogConfig logConfig; private Set<String> allActionClassName; @Resource private LogConfigService logConfigService; // ajax้ชŒ่ฏๆ“ไฝœๅ็งฐๆ˜ฏๅฆๅทฒๅญ˜ๅœจ public String checkOperationName() { String oldValue = getParameter("oldValue"); String newValue = logConfig.getOperationName(); if (logConfigService.isUnique("operationName", oldValue, newValue)) { return ajaxText("true"); } else { return ajaxText("false"); } } // ajaxๆ นๆฎAction็ฑปๅ็งฐ่Žทๅ–ๆ‰€ๆœ‰ๆ–นๆณ•ๅ็งฐ(ไธๅŒ…ๅซๅทฒไฝฟ็”จ็š„ๆ–นๆณ•) @SuppressWarnings("unchecked") public String getAllActionMethod() throws ClassNotFoundException { String actionClassName = logConfig.getActionClassName(); Set<String> allActionClassName = StrutsUtil.getAllActionClassName(); if (allActionClassName.contains(actionClassName)) { Class actionClass = Class.forName(actionClassName); Method[] methods = actionClass.getDeclaredMethods(); StringBuilder stringBuilder = new StringBuilder(); List<LogConfig> logConfigs = logConfigService.getLogConfigList(actionClassName); String[] methodNameArray = new String[logConfigs.size()]; for (int i = 0; i < logConfigs.size(); i++) { methodNameArray[i] = logConfigs.get(i).getActionMethodName(); } for (Method method : methods) { if (method.getReturnType() == String.class && !ArrayUtils.contains(methodNameArray, method.getName())) { stringBuilder.append("<option value=\"" + method.getName() + "\">" + method.getName() + "</option>"); } } if (stringBuilder.length() == 0) { stringBuilder.append("<option value=\"noValue\">ๆ— ๅฏ็”จๆ–นๆณ•</option>"); } return ajaxText(stringBuilder.toString()); } return null; } // ๅˆ—่กจ public String list() { pager = logConfigService.findByPager(pager); return LIST; } // ๅˆ ้™ค public String delete() { logConfigService.delete(ids); return ajaxJsonSuccessMessage("ๅˆ ้™คๆˆๅŠŸ๏ผ"); } // ๆทปๅŠ  public String add() { return INPUT; } // ็ผ–่พ‘ public String edit() { logConfig = logConfigService.load(id); return INPUT; } // ไฟๅญ˜ @SuppressWarnings("unchecked") @Validations( requiredStrings = { @RequiredStringValidator(fieldName = "logConfig.operationName", message = "ๆ“ไฝœๅ็งฐไธๅ…่ฎธไธบ็ฉบ!"), @RequiredStringValidator(fieldName = "logConfig.actionClassName", message = "Action็ฑปไธๅ…่ฎธไธบ็ฉบ!"), @RequiredStringValidator(fieldName = "logConfig.actionMethodName", message = "Actionๆ–นๆณ•ไธๅ…่ฎธไธบ็ฉบ!") } ) @InputConfig(resultName = "error") public String save() throws ClassNotFoundException { String actionClassName = logConfig.getActionClassName(); String actionMethodName = logConfig.getActionMethodName(); if (!StrutsUtil.getAllActionClassName().contains(actionClassName)) { addActionError("Action็ฑป้”™่ฏฏ!"); return ERROR; } Class actionClass = Class.forName(actionClassName); Method[] methods = actionClass.getDeclaredMethods(); boolean isMethod = false; for (Method method : methods) { if (StringUtils.equals(method.getName(), actionMethodName)) { isMethod = true; break; } } if (isMethod == false) { addActionError("Action็ฑป้”™่ฏฏ!"); return ERROR; } logConfigService.save(logConfig); redirectionUrl = "log_config!list.action"; return SUCCESS; } // ๆ›ดๆ–ฐ @SuppressWarnings("unchecked") @Validations( requiredStrings = { @RequiredStringValidator(fieldName = "logConfig.operationName", message = "ๆ“ไฝœๅ็งฐไธๅ…่ฎธไธบ็ฉบ!"), @RequiredStringValidator(fieldName = "logConfig.actionClassName", message = "Action็ฑปไธๅ…่ฎธไธบ็ฉบ!"), @RequiredStringValidator(fieldName = "logConfig.actionMethodName", message = "Actionๆ–นๆณ•ไธๅ…่ฎธไธบ็ฉบ!") } ) @InputConfig(resultName = "error") public String update() throws ClassNotFoundException { LogConfig persistent = logConfigService.load(id); String actionClassName = logConfig.getActionClassName(); String actionMethodName = logConfig.getActionMethodName(); if (!StrutsUtil.getAllActionClassName().contains(actionClassName)) { addActionError("Action็ฑป้”™่ฏฏ!"); return ERROR; } Class actionClass = Class.forName(actionClassName); Method[] methods = actionClass.getDeclaredMethods(); boolean isMethod = false; for (Method method : methods) { if (StringUtils.equals(method.getName(), actionMethodName)) { isMethod = true; break; } } if (isMethod == false) { addActionError("Action็ฑป้”™่ฏฏ!"); return ERROR; } BeanUtils.copyProperties(logConfig, persistent, new String[]{"id", "createDate", "modifyDate"}); logConfigService.update(persistent); redirectionUrl = "log_config!list.action"; return SUCCESS; } public Set<String> getAllActionClassName() { allActionClassName = StrutsUtil.getAllActionClassName(); return allActionClassName; } public void setAllActionClassName(Set<String> allActionClassName) { this.allActionClassName = allActionClassName; } public LogConfig getLogConfig() { return logConfig; } public void setLogConfig(LogConfig logConfig) { this.logConfig = logConfig; } }
[ "liyinfeng0520@163.com" ]
liyinfeng0520@163.com
02f6246a3a72c5b0aa7afcc16a77dedc6a33ba1d
1c6d3bb92f64bdc8eda7e287cf1cfbb0a5044684
/frameworkx/dubbo-cluster/src/main/java/net/jahhan/spi/LoadBalance.java
a202f2f04a458076eceba751311170ca2cf35854
[ "Apache-2.0" ]
permissive
zhaohq90/jahhan
59e36f7d7b353d64c777663b44109d2c3afd082b
370a1c090035ce19ec18bb8c5e13d35c33275e99
refs/heads/master
2020-03-23T19:43:10.462699
2018-04-08T13:11:53
2018-04-08T13:11:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,629
java
/* * Copyright 1999-2011 Alibaba Group. * * 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 net.jahhan.spi; import java.util.List; import com.alibaba.dubbo.common.URL; import com.alibaba.dubbo.rpc.Invocation; import com.alibaba.dubbo.rpc.Invoker; import com.alibaba.dubbo.rpc.cluster.Directory; import com.frameworkx.annotation.Adaptive; import net.jahhan.common.extension.annotation.SPI; import net.jahhan.exception.JahhanException; import net.jahhan.extension.loadBalance.RandomLoadBalance; /** * LoadBalance. (SPI, Singleton, ThreadSafe) * * <a href="http://en.wikipedia.org/wiki/Load_balancing_(computing)">Load-Balancing</a> * * @see net.jahhan.spi.Cluster#join(Directory) * @author qian.lei * @author william.liangf */ @SPI(RandomLoadBalance.NAME) public interface LoadBalance { /** * select one invoker in list. * * @param invokers invokers. * @param url refer url * @param invocation invocation. * @return selected invoker. */ @Adaptive("loadbalance") <T> Invoker<T> select(List<Invoker<T>> invokers, URL url, Invocation invocation) throws JahhanException; }
[ "41284688@qq.com" ]
41284688@qq.com
8258d3aaef6d2740223e8e18564c4aa38441bb4e
a0a0e4ea8dfe45b0d35194ddf020915e39ae3f24
/MyCismClient/src/test/java/org/mycmis/MyCismClient/AppTest.java
0a8a145060243682b7c28997016ff90820497b15
[]
no_license
msen2000/mycmis
0b67e2d55b0201e16782127cbd00286b17d85962
ecd0afe41deef83099f83beef3218d24c54ff5c9
refs/heads/master
2021-01-10T18:41:30.860617
2015-03-02T19:59:39
2015-03-02T19:59:39
31,040,041
0
0
null
null
null
null
UTF-8
Java
false
false
651
java
package org.mycmis.MyCismClient; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; /** * Unit test for simple App. */ public class AppTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ public AppTest( String testName ) { super( testName ); } /** * @return the suite of tests being tested */ public static Test suite() { return new TestSuite( AppTest.class ); } /** * Rigourous Test :-) */ public void testApp() { assertTrue( true ); } }
[ "msen2000@gmail.com" ]
msen2000@gmail.com
00ea4d625277727e575089c5c59c0419e50cc039
535e5d97d44fd42fca2a6fc68b3b566046ffa6c2
/com/google/android/gms/internal/zzqf.java
f8f8f77b818bfaf4c2d0e55066bafd730c878cb0
[]
no_license
eric-lanita/BigRoadTruckingLogbookApp_v21.0.12_source_from_JADX
47566c288bc89777184b73ef0eb199b61de39f82
fb84301d90ec083ce06c68a3828cf99d8855c007
refs/heads/master
2021-09-01T07:02:52.500068
2017-12-25T15:06:05
2017-12-25T15:06:05
115,346,008
0
3
null
null
null
null
UTF-8
Java
false
false
4,640
java
package com.google.android.gms.internal; import android.content.Context; import android.content.res.Resources; import android.text.TextUtils; import com.google.android.gms.C3176R; import com.google.android.gms.common.api.Status; import com.google.android.gms.common.internal.zzab; import com.google.android.gms.common.internal.zzai; import com.google.android.gms.common.internal.zzz; @Deprecated public final class zzqf { private static Object f11638a = new Object(); private static zzqf f11639b; private final String f11640c; private final String f11641d; private final Status f11642e; private final String f11643f; private final String f11644g; private final String f11645h; private final boolean f11646i; private final boolean f11647j; zzqf(Context context) { boolean z = true; Resources resources = context.getResources(); int identifier = resources.getIdentifier("google_app_measurement_enable", "integer", resources.getResourcePackageName(C3176R.string.common_google_play_services_unknown_issue)); if (identifier != 0) { boolean z2 = resources.getInteger(identifier) != 0; if (z2) { z = false; } this.f11647j = z; z = z2; } else { this.f11647j = false; } this.f11646i = z; zzai com_google_android_gms_common_internal_zzai = new zzai(context); this.f11643f = com_google_android_gms_common_internal_zzai.getString("firebase_database_url"); this.f11645h = com_google_android_gms_common_internal_zzai.getString("google_storage_bucket"); this.f11644g = com_google_android_gms_common_internal_zzai.getString("gcm_defaultSenderId"); this.f11641d = com_google_android_gms_common_internal_zzai.getString("google_api_key"); Object zzcf = zzz.zzcf(context); if (zzcf == null) { zzcf = com_google_android_gms_common_internal_zzai.getString("google_app_id"); } if (TextUtils.isEmpty(zzcf)) { this.f11642e = new Status(10, "Missing google app id value from from string resources with name google_app_id."); this.f11640c = null; return; } this.f11640c = zzcf; this.f11642e = Status.sq; } zzqf(String str, boolean z) { this(str, z, null, null, null); } zzqf(String str, boolean z, String str2, String str3, String str4) { this.f11640c = str; this.f11641d = null; this.f11642e = Status.sq; this.f11646i = z; this.f11647j = !z; this.f11643f = str2; this.f11644g = str4; this.f11645h = str3; } private static zzqf m17503b(String str) { zzqf com_google_android_gms_internal_zzqf; synchronized (f11638a) { if (f11639b == null) { throw new IllegalStateException(new StringBuilder(String.valueOf(str).length() + 34).append("Initialize must be called before ").append(str).append(".").toString()); } com_google_android_gms_internal_zzqf = f11639b; } return com_google_android_gms_internal_zzqf; } public static String zzaqo() { return m17503b("getGoogleAppId").f11640c; } public static boolean zzaqp() { return m17503b("isMeasurementExplicitlyDisabled").f11647j; } public static Status zzc(Context context, String str, boolean z) { Status a; zzab.zzb((Object) context, (Object) "Context must not be null."); zzab.zzh(str, "App ID must be nonempty."); synchronized (f11638a) { if (f11639b != null) { a = f11639b.m17504a(str); } else { f11639b = new zzqf(str, z); a = f11639b.f11642e; } } return a; } public static Status zzcb(Context context) { Status status; zzab.zzb((Object) context, (Object) "Context must not be null."); synchronized (f11638a) { if (f11639b == null) { f11639b = new zzqf(context); } status = f11639b.f11642e; } return status; } Status m17504a(String str) { if (this.f11640c == null || this.f11640c.equals(str)) { return Status.sq; } String str2 = this.f11640c; return new Status(10, new StringBuilder(String.valueOf(str2).length() + 97).append("Initialize was called with two different Google App IDs. Only the first app ID will be used: '").append(str2).append("'.").toString()); } }
[ "eric.lanita@gmail.com" ]
eric.lanita@gmail.com
36c0115b8cc0c7e61a676e4d8c9f36c6187bb664
ea80be7c916654b2da85977d4876132f1e0fcd8c
/imal_admin_portal/src/reporting_services_common_src/com/path/vo/reporting/IRP_REP_ARG_CONSTRAINTSCO.java
77187e4693884184dd51f707d33c2da9a4fb243f
[]
no_license
jenil-shah135/imal_admin_portal
1352b47aa38530d7ddcc56399f6f83b37d804d38
fa47f0f45d486999eb30d58e7da6c0a79c236b1b
refs/heads/master
2023-01-15T15:59:27.683025
2020-11-25T12:43:30
2020-11-25T12:43:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,522
java
package com.path.vo.reporting; import java.io.Serializable; import com.path.dbmaps.vo.IRP_REP_ARG_CONSTRAINTSVO; import com.path.lib.vo.BaseVO; public class IRP_REP_ARG_CONSTRAINTSCO extends BaseVO implements Serializable { private IRP_REP_ARG_CONSTRAINTSVO irpRepArgConstraintsVO = new IRP_REP_ARG_CONSTRAINTSVO(); private String CASE_SENSITIVITY; private String MAX_LENGTH; private String MAX_VAL; private String MIN_VAL; private String FORMAT; private String CONDITION; private String SHOW_EXPR; private String HIDE_EXPR; private String BTR_CONTROL_DISP; public String getBTR_CONTROL_DISP() { return BTR_CONTROL_DISP; } public void setBTR_CONTROL_DISP(String bTRCONTROLDISP) { BTR_CONTROL_DISP = bTRCONTROLDISP; } public String getCASE_SENSITIVITY() { return CASE_SENSITIVITY; } public void setCASE_SENSITIVITY(String cASESENSITIVITY) { CASE_SENSITIVITY = cASESENSITIVITY; } public String getMAX_LENGTH() { return MAX_LENGTH; } public void setMAX_LENGTH(String mAXLENGTH) { MAX_LENGTH = mAXLENGTH; } public String getMAX_VAL() { return MAX_VAL; } public void setMAX_VAL(String mAXVAL) { MAX_VAL = mAXVAL; } public String getMIN_VAL() { return MIN_VAL; } public void setMIN_VAL(String mINVAL) { MIN_VAL = mINVAL; } public String getFORMAT() { return FORMAT; } public void setFORMAT(String fORMAT) { FORMAT = fORMAT; } public String getCONDITION() { return CONDITION; } public void setCONDITION(String cONDITION) { CONDITION = cONDITION; } public String getSHOW_EXPR() { return SHOW_EXPR; } public void setSHOW_EXPR(String sHOWEXPR) { SHOW_EXPR = sHOWEXPR; } public String getHIDE_EXPR() { return HIDE_EXPR; } public void setHIDE_EXPR(String hIDEEXPR) { HIDE_EXPR = hIDEEXPR; } public IRP_REP_ARG_CONSTRAINTSVO getIrpRepArgConstraintsVO() { return irpRepArgConstraintsVO; } public void setIrpRepArgConstraintsVO(IRP_REP_ARG_CONSTRAINTSVO irpRepArgConstraintsVO) { this.irpRepArgConstraintsVO = irpRepArgConstraintsVO; } }
[ "aleem2k11@gmail.com" ]
aleem2k11@gmail.com
f312a54f2942c723be0a970d25239e2580a44888
b7bc39c604f7b83a7d7f0d750240fe86d8df7a5c
/java-basic/src/main/java/ch30/f/MyAdvice.java
4e83f7aa5e214ed1ec975889d3443a7730522eeb
[]
no_license
ppappikko/bitcamp-java-2018-12
e79e023a00c579519ae67ba9f997b615fb539e5c
bd2a0b87c20a716d2b1e8cafc2a9cd54f683a37f
refs/heads/master
2021-08-06T17:31:37.187323
2019-07-19T04:55:07
2019-07-19T04:55:07
163,650,729
0
0
null
2020-04-30T16:14:59
2018-12-31T08:01:24
Java
UTF-8
Java
false
false
2,494
java
package ch30.f; import org.aspectj.lang.annotation.After; import org.aspectj.lang.annotation.AfterReturning; import org.aspectj.lang.annotation.AfterThrowing; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.aspectj.lang.annotation.Pointcut; import org.springframework.stereotype.Component; // ์ง€์ •๋œ ๊ฐ์ฒด์˜ ๋ฉ”์„œ๋“œ๋ฅผ ํ˜ธ์ถœํ•  ๋•Œ, // ๋ฉ”์„œ๋“œ ํ˜ธ์ถœ ์ „์ด๋‚˜ ํ›„์— ์–ด๋–ค ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๋Š” ์ผ์„ ํ•œ๋‹ค. // XML ์„ค์ •์„ ์‚ฌ์šฉํ•  ๋•Œ๋Š” ์ด ํด๋ž˜์Šค์˜ ๊ฐ์ฒด ์ƒ์„ฑ์„ XML์—์„œ ํ–ˆ๊ธฐ ๋•Œ๋ฌธ์— // @Component ์• ๋…ธํ…Œ์ด์…˜์„ ๋ถ‡์ด์ง€ ์•Š์•˜๋‹ค. // ์ด์ œ๋Š” XML์—์„œ ์ด ํด๋ž˜์Šค์˜ ๊ฐ์ฒด๋ฅผ ๋งŒ๋“ค์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— ์ด ์• ๋…ธํ…Œ์ด์…˜์„ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค. @Component // ์ด ํด๋ž˜์Šค๊ฐ€ AOP ๊ธฐ๋Šฅ์„ ์ˆ˜ํ–‰ํ•˜๋Š” ํด๋ž˜์Šค์ž„์„ ํ‘œ์‹œํ•ด์•ผ ํ•œ๋‹ค. @Aspect public class MyAdvice { //Pointcut์„ ๋ฏธ๋ฆฌ ์ •์˜ํ•œ๋‹ค. // => ๋ฉ”์„œ๋“œ ์„ ์–ธ๋ถ€์— ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค. // => ๋ฉ”์„œ๋“œ์˜ ํŒŒ๋ผ๋ฏธํ„ฐ๋Š” ์—†๊ณ , ๊ตฌํ˜„์„ ๋น„์›Œ๋‘”๋‹ค. // => ์ด ๋ฉ”์„œ๋“œ๋Š” pointcut์„ ์ง€์ •ํ•˜๋Š” ์šฉ๋„๋กœ๋งŒ ์‚ฌ์šฉํ•œ๋‹ค. @Pointcut("execution(* ch30.f.X.*(..))") public void calculatorOperation() {} /* <aop:before pointcut="execution(* ch30.e.X.*(..)) and args(p2, p3, p1)" method="doBefore"/> */ @Before("calculatorOperation() and args(p2, p3, p1)") public void doBefore(String p1, int p2, int p3) { System.out.printf("%s.doBefore()\n", this.getClass().getName()); System.out.printf(" => %s %d %d\n", p1, p2, p3); } /* <aop:after pointcut-ref="pointcut1" method="doAfter"/> */ @After("calculatorOperation()") public void doAfter() { System.out.printf("%s.doAfter()\n", this.getClass().getName()); } /* <aop:after-returning pointcut-ref="pointcut1" returning="rv" method="doAfterReturning"/> */ @AfterReturning( pointcut="calculatorOperation()", returning="rv") public void doAfterReturning(Object rv) { System.out.printf("%s.doAfterReturning()\n", this.getClass().getName()); System.out.printf(" => %s\n", rv); } /* <aop:after-throwing pointcut-ref="pointcut1" throwing="err" method="doAfterThrowing"/> */ @AfterThrowing( pointcut="calculatorOperation()", throwing="err") public void doAfterThrowing(Exception err) { System.out.printf("%s.doAfterThrowing()\n", this.getClass().getName()); System.out.printf(" => %s\n", err.getMessage()); } }
[ "sanghyun.dev@gmail.com" ]
sanghyun.dev@gmail.com