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
3798b6034f5b8b95f1734d7a989cc32215d57cfb
be4a8376b4e8c994a79d117d9fe5ee5508a50fcc
/2.1 (2017-2018)/lostshard/src/main/java/com/lostshard/lostshard/DamageBalance/Enchantments/Armor/FireProtection.java
578e6daf08e095fb0eab9793042924ae5b75d1fc
[ "MIT" ]
permissive
BuntsFidleyBits/Lostshard-ARCHIVE
5b140d36c058421ce02ff12eaee143850a274db1
6094e3c12b181e86c313edc7ec2f13fd0907f716
refs/heads/master
2021-09-28T13:44:52.398297
2018-11-17T14:52:51
2018-11-17T14:52:51
157,993,584
0
2
MIT
2018-11-17T14:42:58
2018-11-17T14:42:58
null
UTF-8
Java
false
false
842
java
package com.lostshard.lostshard.DamageBalance.Enchantments.Armor; import org.bukkit.enchantments.Enchantment; public enum FireProtection { LEVEL1(Enchantment.DAMAGE_ALL, 1, 0), LEVEL2(Enchantment.DAMAGE_ALL, 2, 0), LEVEL3(Enchantment.DAMAGE_ALL, 3, 0), LEVEL4(Enchantment.DAMAGE_ALL, 4, 0), ; private final Enchantment enchantment; private final int level; private final double modifier; private FireProtection(Enchantment enchantment, int level, double modifier) { this.enchantment = enchantment; this.level = level; this.modifier = modifier; } /** * @return the enchantment */ public Enchantment getEnchantment() { return enchantment; } /** * @return the level */ public int getLevel() { return level; } /** * @return the modifier */ public double getModifier() { return modifier; } }
[ "mu@imi.co" ]
mu@imi.co
eb8a4edb4ed540e570cc3a1d2bdef56284f5d969
a84913743e8605b98a9f8590771a4d4582a76924
/app/src/main/java/com/example/nctai_trading/bithumb/bithumbConfigResponse.java
b51c52d2696f9501b74555d2d0c4c8db0125910f
[ "Apache-2.0" ]
permissive
marcellinamichie291/NCT-AndroidGUI
467f5ab22ad618e9f7c907d86312b6b12b0e368f
6466ccd9bf24697f24ea5652eeb4de83cc4b9191
refs/heads/master
2023-05-14T11:19:45.201708
2021-06-09T11:32:22
2021-06-09T11:32:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,220
java
package com.example.nctai_trading.bithumb; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import java.util.List; public class bithumbConfigResponse { @SerializedName("coinConfig") @Expose private List<bithumbConfigCoinConfig> coinConfig = null; @SerializedName("contractConfig") @Expose private List<bithumbConfigContractConfig> contractConfig = null; @SerializedName("spotConfig") @Expose private List<bithumbConfigResponseDetails> spotConfig = null; public List<bithumbConfigCoinConfig> getCoinConfig() { return coinConfig; } public void setCoinConfig(List<bithumbConfigCoinConfig> coinConfig) { this.coinConfig = coinConfig; } public List<bithumbConfigContractConfig> getContractConfig() { return contractConfig; } public void setContractConfig(List<bithumbConfigContractConfig> contractConfig) { this.contractConfig = contractConfig; } public List<bithumbConfigResponseDetails> getSpotConfig() { return spotConfig; } public void setSpotConfig(List<bithumbConfigResponseDetails> spotConfig) { this.spotConfig = spotConfig; } }
[ "cthacker@udel.edu" ]
cthacker@udel.edu
78c20fa474c406ff8f816e746f225c98f83c28da
61602d4b976db2084059453edeafe63865f96ec5
/org/greenrobot/greendao/rx/RxDao$7.java
fcbdb8d49f3c618dc4e0061e9f527d084ddf5382
[]
no_license
ZoranLi/thunder
9d18fd0a0ec0a5bb3b3f920f9413c1ace2beb4d0
0778679ef03ba1103b1d9d9a626c8449b19be14b
refs/heads/master
2020-03-20T23:29:27.131636
2018-06-19T06:43:26
2018-06-19T06:43:26
137,848,886
12
1
null
null
null
null
UTF-8
Java
false
false
458
java
package org.greenrobot.greendao.rx; import java.util.concurrent.Callable; class RxDao$7 implements Callable<T> { final /* synthetic */ RxDao this$0; final /* synthetic */ Object val$entity; RxDao$7(RxDao rxDao, Object obj) { this.this$0 = rxDao; this.val$entity = obj; } public T call() throws Exception { RxDao.access$000(this.this$0).insertOrReplace(this.val$entity); return this.val$entity; } }
[ "lizhangliao@xiaohongchun.com" ]
lizhangliao@xiaohongchun.com
8b1b5d23d6f259fed83a226245159a79cbcefef2
9b19b02129c18c946295e897bc99dd4b8778638f
/app/src/main/java/com/yjhh/ppwbusiness/views/cui/AlertDialogFactory.java
6055d2d08d901207c8b6fe5660f59557e738077d
[]
no_license
majian1234554321/ppwbusiness
253982cff2ecf1c0e98a51d9748de1040fbe2e32
3a93167bdcb0813a7db0f8e74bfbad1d7b4a6f37
refs/heads/master
2020-04-06T18:18:23.309190
2019-02-15T02:54:53
2019-02-15T02:54:53
157,693,463
0
0
null
null
null
null
UTF-8
Java
false
false
6,135
java
package com.yjhh.ppwbusiness.views.cui; import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.text.TextUtils; import android.view.ContextThemeWrapper; import android.view.View; import android.widget.Button; import android.widget.TextView; import com.yjhh.ppwbusiness.R; import java.util.List; /** * AlertDialogFactory * Created by D on 2017/4/29. */ public class AlertDialogFactory { private Context context; private AlertDialogFactory(Context context) { this.context = context; } public static AlertDialogFactory createFactory(Context context) { return new AlertDialogFactory(context); } /** * LoadingDialog */ public AlertDialog getLoadingDialog() { return getLoadingDialog(null); } /** * LoadingDialog */ public AlertDialog getLoadingDialog(String text) { final AlertDialog dlg = new AlertDialog .Builder(new ContextThemeWrapper(context, R.style.lib_pub_dialog_style)) .create(); if (context instanceof Activity && !((Activity) context).isFinishing()) { dlg.show(); } dlg.setContentView(R.layout.lib_pub_dialog_loading); TextView tips = (TextView) dlg.findViewById(R.id.tv_tips); if (text != null) { tips.setText(text); } return dlg; } public AlertDialog getAlertDialog(String title, String content, String btnOkText, String btnCancelText, final OnClickListener btnOkListener, final OnClickListener btnCancelListener) { final AlertDialog dlg = new AlertDialog .Builder(new ContextThemeWrapper(context, R.style.lib_pub_dialog_style)) .create(); if (context instanceof Activity && !((Activity) context).isFinishing()) { dlg.show(); } dlg.setContentView(R.layout.lib_pub_dialog); TextView tv_title = (TextView) dlg.findViewById(R.id.tv_title); tv_title.setVisibility(!TextUtils.isEmpty(title) ? View.VISIBLE : View.GONE); tv_title.setText(!TextUtils.isEmpty(title) ? title : ""); TextView tv_content = (TextView) dlg.findViewById(R.id.tv_content); tv_content.setVisibility(!TextUtils.isEmpty(content) ? View.VISIBLE : View.GONE); tv_content.setText(!TextUtils.isEmpty(content) ? content : ""); TextView btnOk = dlg.findViewById(R.id.btn_ok); btnOk.setText(!TextUtils.isEmpty(btnOkText) ? btnOkText : "确定"); TextView btnCancel = dlg.findViewById(R.id.btn_cancel); btnCancel.setText(!TextUtils.isEmpty(btnCancelText) ? btnCancelText : ""); btnCancel.setVisibility(!TextUtils.isEmpty(btnCancelText) ? View.VISIBLE : View.GONE); View lineBottom = dlg.findViewById(R.id.line_bottom); lineBottom.setVisibility(!TextUtils.isEmpty(btnCancelText) ? View.VISIBLE : View.GONE); btnOk.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dlg.dismiss(); if (btnOkListener != null) { btnOkListener.onClick(dlg, v); } } }); btnCancel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dlg.dismiss(); if (btnCancelListener != null) { btnCancelListener.onClick(dlg, v); } } }); return dlg; } public BottomVerSheetDialog getBottomVerDialog(List<BottomVerSheetDialog.Bean> datas, AbsSheetDialog.OnItemClickListener<BottomVerSheetDialog.Bean> listener) { return getBottomVerDialog(null, datas, listener); } public BottomVerSheetDialog getBottomVerDialog(String title, List<BottomVerSheetDialog.Bean> datas, AbsSheetDialog.OnItemClickListener<BottomVerSheetDialog.Bean> listener) { BottomVerSheetDialog dialog = new BottomVerSheetDialog(context, title, datas); dialog.setOnItemClickListener(listener); dialog.show(); return dialog; } /*public AlertSubDialog getAlertSubDialog(String title, String content, String subTips, boolean isChecked, AlertSubDialog.OnCheckListener listener) { AlertSubDialog dialog = new AlertSubDialog(context, title, content, subTips, isChecked); dialog.setOnCheckListener(listener); dialog.show(); return dialog; } public EditDialog getEditDialog(String title, String content, EditDialog.OnEditListener listener) { EditDialog dialog = new EditDialog(context, title, content); dialog.setOnEditListener(listener); dialog.show(); return dialog; } public InfoDialog getInfoDialog(String title, List<InfoDialog.Bean> datas) { InfoDialog dialog = new InfoDialog(context, title, datas); dialog.show(); return dialog; } public OperationDialog getOperationDialog(String title, List<OperationDialog.Bean> datas, AbsSheetDialog.OnItemClickListener listener) { OperationDialog dialog = new OperationDialog(context, title, datas); dialog.show(); return dialog; } public BottomHorSheetDialog getBottomHorDialog(String title, List<BottomHorSheetDialog.Bean> datas, AbsSheetDialog.OnItemClickListener<BottomHorSheetDialog.Bean> listener) { BottomHorSheetDialog dialog = new BottomHorSheetDialog(context, title, datas); dialog.setOnItemClickListener(listener); dialog.show(); return dialog; } public BottomShareSheetDialog getBottomShareDialog(String title, List<BottomShareSheetDialog.Bean> datas) { BottomShareSheetDialog dialog = new BottomShareSheetDialog(context, title, datas); dialog.show(); return dialog; }*/ public interface OnClickListener { void onClick(AlertDialog dlg, View v); } }
[ "99571202@qq.com" ]
99571202@qq.com
fae4153bcb414cd6538b05b84d28f2c39d19c088
6400224b2ff4797f0ad7283685056ff5e50004d4
/erwin-cloud-business/erwin-cloud-storage/src/main/java/com/fengwenyi/example/erwincloudstorage/config/MyBatisPlusConfiguration.java
9b416d9ddb482cb88245edfdb523a072caddd88a
[]
no_license
fengwenyi/erwin-cloud-example
c8d34ee36c9bede4cca8ebc598b2a401dc738307
bed01693c67174642b52a37b51c9e6a014a21b60
refs/heads/master
2023-03-19T18:09:16.672238
2021-03-10T06:25:22
2021-03-10T06:25:22
336,506,391
0
0
null
null
null
null
UTF-8
Java
false
false
1,081
java
package com.fengwenyi.example.erwincloudstorage.config; import com.baomidou.mybatisplus.annotation.DbType; import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; import org.mybatis.spring.annotation.MapperScan; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** * @author Erwin Feng * @since 2021-03-08 */ @Configuration @MapperScan("com.fengwenyi.example.erwincloudstorage.dao") public class MyBatisPlusConfiguration { /** * 新的分页插件,一缓和二缓遵循mybatis的规则,需要设置 MybatisConfiguration#useDeprecatedExecutor = false 避免缓存出现问题(该属性会在旧插件移除后一同移除) */ @Bean public MybatisPlusInterceptor mybatisPlusInterceptor() { MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); return interceptor; } }
[ "xfsy_2015@163.com" ]
xfsy_2015@163.com
8e57b696bab433611e40900d071279d4d1e8b453
9c65284a0069cf6d0e3bf19919fc229fd74789ba
/gt_front_api/src/main/java/com/gt/util/GoogleAuth.java
f1f75a3f47f9570542fa4b04483f9df47a25a2db
[]
no_license
moguli/powex
95aa2699b6fbf92aef6ab7b5203864148af29467
56348db54db9456234010e5a20f9f8a09d234c64
refs/heads/master
2022-12-28T03:52:59.442332
2019-09-08T10:04:25
2019-09-08T10:04:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,282
java
package com.gt.util; import java.util.HashMap; import java.util.Map; /* * Not really a unit test- but it shows usage */ public class GoogleAuth { //网站名称,可自定义 private static String webName = Constant.GoogleAuthName; /** * 注册GOOGLE认证,先传入用户登陆名,返回一个MAP,里面有两个KEY,一个是url(value为二维码地址),一个是secret(为此用户的地址,此地址用于校验) * * */ public static Map genSecret(String userName) { Map map = new HashMap(); String secret = GoogleAuthenticator.generateSecretKey(); String url = GoogleAuthenticator.getQRBarcodeURL(webName, userName, secret); map.put("secret", secret); map.put("url", url); return map; } /** * 校验GOOGLE认证是否成功 * **/ public static boolean auth(long code,String secret) { long t = System.currentTimeMillis(); GoogleAuthenticator ga = new GoogleAuthenticator(); ga.setWindowSize(5); //should give 5 * 30 seconds of grace... boolean r = ga.check_code(secret, code, t); return r; } public static void main(String args[]){ Map<String, String> map = GoogleAuth.genSecret("hanklee") ; for (Map.Entry<String, String> entry : map.entrySet()) { System.out.println(entry.getValue()); } } }
[ "185428479@qq.com" ]
185428479@qq.com
6c87d94140f61d78ff02006f802ef9e5085f03b5
4f2403f0c545a9ea500ad61cd01df313f865889c
/src/main/java/com/rainbow/tony/guice/robotproblem/Car.java
e70bb0a5ef6b0973612c1240c64c9bd4e89d33d8
[]
no_license
softPrisoner/tony-guice-netty
54ad978113de48af1ff3b9057c09819f3f9d683e
05bef03660a5c1c19643b9a01eeebdb43cf1d01a
refs/heads/master
2022-06-30T00:43:32.354483
2020-05-12T03:02:21
2020-05-12T03:02:21
261,941,406
0
0
null
null
null
null
UTF-8
Java
false
false
751
java
package com.rainbow.tony.guice.robotproblem; import com.google.inject.Inject; /** * @author wabslygzj@163.com (Tony Li) * @copyright rainbow * @description Car * @date 2020-05-11 */ class Car { private final Engine engine; private final Transmission transmission; private final Driveline driveline; @Inject public Car(Engine engine, Transmission transmission, Driveline driveline) { this.engine = engine; this.transmission = transmission; this.driveline = driveline; ; } public Driveline getDriveline() { return driveline; } public Engine getEngine() { return engine; } public Transmission getTransmission() { return transmission; } }
[ "wabslygzj@163.com" ]
wabslygzj@163.com
a61992de7cb588a5ccb9f58a3c80c67318ce1710
58558513bbd69fe99463b4895bc5078dbe09596a
/src/us/jaba/titaniumblocks/core/frames/effects/rectangular/NoEffect.java
e52c6c1807e5633c84ad92e6b918ecedd373c6b4
[]
no_license
tonybeckett/TitaniumBlocks
16fdd135b46cb2e4b534a7b5ea36c3ee7e2c7139
32354597255b007a67fed500a707538509c5bfb5
refs/heads/master
2020-05-21T13:43:54.732539
2016-12-08T23:21:09
2016-12-08T23:21:09
48,827,953
1
0
null
null
null
null
UTF-8
Java
false
false
1,998
java
/* * Copyright (c) 2015, Tony Beckett * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * The names of its contributors may not 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 HOLDER 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 us.jaba.titaniumblocks.core.frames.effects.rectangular; import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.geom.Area; import us.jaba.titaniumblocks.core.frames.RectangularFrameEffect; /** * * @author tbeckett */ public class NoEffect implements RectangularFrameEffect { @Override public void paint(Graphics2D graphics, Dimension dimensions, Area outerFrame) { //do nothing } }
[ "tonybeckett@yahoo.com" ]
tonybeckett@yahoo.com
4218b09e6a403416baf5e87532638c864adc9229
d8168756a8cbab57531b6d19d5f92c384257f5b5
/src/persistency/MySQLConnection.java
991e51d53d4c985f516b0b6e140e156d2c8d56ad
[]
no_license
kutayzorlu/invoicing
baf941e50d8379ff8ecb0c9c5d72629265e7ec48
8a1ff5ffdd31a824e556435192bf9083375b43e2
refs/heads/master
2020-06-27T23:50:32.193911
2019-03-04T09:24:33
2019-03-04T09:24:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
813
java
package persistency; import utilities.Constants; import utilities.LoadProperties; import java.io.File; import java.io.IOException; import java.util.Properties; public class MySQLConnection extends DBConnection { private LoadProperties props; public MySQLConnection() { super(); try { props = new LoadProperties(new File(Constants.SETTINGS_PATH + Constants.SETTINGS_FILE)); } catch (IOException e) { e.printStackTrace(); } setUrl(props.getProperty(Constants.URL)); Properties info = new Properties(); info.setProperty(Constants.USER, props.getProperty(Constants.USER)); info.setProperty(Constants.PASSWORD, props.getProperty(Constants.PASSWORD)); setInfo(info); } }
[ "mpaesen@gmail.com" ]
mpaesen@gmail.com
3b76b6a553b382da65ffb819d5ac4dc99d8d1ccd
9c726e47b90906f301e5e40ef4ee7379a57fe745
/app/src/main/java/pl/karol202/paintplus/options/OptionSave.java
b0a47e258fd436ae451a05ec8b070297af0bd248
[ "Apache-2.0" ]
permissive
veritas44/PaintPlusPlus
e4b1abf2db28edf5ca3eeaa2c94563311661d847
4d0029d6d355317f45f0d359ec4bf436e0ad992f
refs/heads/master
2021-04-27T09:46:05.099756
2017-12-03T22:17:57
2017-12-03T22:17:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,079
java
/* * Copyright 2017 karol-202 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package pl.karol202.paintplus.options; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Bitmap; import android.net.Uri; import android.os.ParcelFileDescriptor; import android.view.LayoutInflater; import android.view.View; import android.widget.Toast; import pl.karol202.paintplus.AsyncBlocker; import pl.karol202.paintplus.AsyncManager; import pl.karol202.paintplus.R; import pl.karol202.paintplus.activity.ActivityPaint; import pl.karol202.paintplus.activity.ActivityResultListener; import pl.karol202.paintplus.file.*; import pl.karol202.paintplus.file.BitmapSaveAsyncTask.OnBitmapSaveListener; import pl.karol202.paintplus.file.explorer.FileExplorer; import pl.karol202.paintplus.file.explorer.FileExplorerFactory; import pl.karol202.paintplus.image.Image; import pl.karol202.paintplus.recent.OnFileEditListener; import static android.app.Activity.RESULT_OK; abstract class OptionSave extends Option implements ActivityResultListener, AsyncBlocker, OnBitmapSaveListener { private ActivityPaint activity; private OnFileEditListener listener; private AsyncManager asyncManager; BitmapSaveAsyncTask asyncTask; Uri uri; BitmapSaveFormat format; ParcelFileDescriptor parcelFileDescriptor; OptionSave(ActivityPaint activity, Image image, AsyncManager asyncManager, OnFileEditListener listener) { super(activity, image); this.activity = activity; this.asyncManager = asyncManager; this.listener = listener; } abstract int getRequestId(); abstract Bitmap getBitmapToSave(); @Override public void execute() { activity.registerActivityResultListener(getRequestId(), this); FileExplorer explorer = FileExplorerFactory.createFileExplorer(activity); explorer.saveFile(getRequestId()); } public void execute(Uri uri, BitmapSaveFormat format) { this.uri = uri; this.format = format; if(format != null) saveBitmapAsynchronously(); else if(checkFileFormat() && !showSettingsDialog()) saveBitmapAsynchronously(); } @Override public void onActivityResult(int resultCode, Intent intent) { activity.unregisterActivityResultListener(getRequestId()); if(resultCode != RESULT_OK) return; uri = intent.getData(); if(checkFileFormat() && !showSettingsDialog()) saveBitmapAsynchronously(); } private boolean checkFileFormat() { UriMetadata metadata = new UriMetadata(getContext(), uri); format = ImageLoader.getFormat(metadata.getDisplayName()); if(format == null) unsupportedFormat(); return format != null; } private void unsupportedFormat() { UriUtils.deleteDocument(getContext(), uri); getAppContext().createSnackbar(R.string.message_unsupported_format, Toast.LENGTH_SHORT).show(); } private boolean showSettingsDialog() { if(!format.providesSettingsDialog()) return false; LayoutInflater inflater = LayoutInflater.from(getContext()); View view = inflater.inflate(format.getSettingsDialogLayout(), null); format.customizeSettingsDialog(view); AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); builder.setTitle(format.getSettingsDialogTitle()); builder.setView(view); builder.setPositiveButton(R.string.save, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { saveBitmapAsynchronously(); } }); builder.setNegativeButton(R.string.cancel, null); builder.show(); return true; } void saveBitmapAsynchronously() { asyncManager.block(this); parcelFileDescriptor = UriUtils.createFileSaveDescriptor(getContext(), uri); BitmapSaveParams params = new BitmapSaveParams(this, getBitmapToSave(), parcelFileDescriptor.getFileDescriptor(), format); asyncTask = new BitmapSaveAsyncTask(); asyncTask.execute(params); } @Override public void cancel() { asyncTask.cancel(true); asyncManager.unblock(this); } @Override public int getMessage() { return R.string.dialog_save_message; } @Override public void onBitmapSaved(BitmapSaveResult result) { asyncManager.unblock(this); UriUtils.closeFileDescriptor(parcelFileDescriptor); switch(result.getResult()) { case SUCCESSFUL: if(listener != null) listener.onFileEdited(uri, result.getBitmap()); break; case ERROR: UriUtils.deleteDocument(getContext(), uri); getAppContext().createSnackbar(R.string.message_cannot_save_file, Toast.LENGTH_SHORT).show(); break; } } }
[ "karoljurski1@gmail.com" ]
karoljurski1@gmail.com
95c243294885d0aeac614b4649225f49d7c74525
6c28eca2c33a275fb0008a51b8e5776a82f5904d
/Code/Hierarchy/src/net/unconventionalthinking/hierarchy/grammar/node/PDescriptorHeadSet.java
de8634bfb717b78c571c1265482718fa0a568999
[]
no_license
UnconventionalThinking/hierarchy
17dc9e224595f13702b9763829e12fbce2c48cfe
de8590a29c19202c01d1a6e62ca92e91aa9fc6ab
refs/heads/master
2021-01-19T21:28:29.793371
2014-12-19T03:16:24
2014-12-19T03:16:24
13,262,291
0
1
null
null
null
null
UTF-8
Java
false
false
927
java
/* Copyright 2012, 2013 Unconventional Thinking * * This file is part of Hierarchy. * * Hierarchy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * * Hierarchy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with Hierarchy. * If not, see <http://www.gnu.org/licenses/>. */ /* This file was generated by SableCC (http://www.sablecc.org/). */ package net.unconventionalthinking.hierarchy.grammar.node; public abstract class PDescriptorHeadSet extends Node { // Empty body }
[ "github@unconventionalthinking.com" ]
github@unconventionalthinking.com
a43d725966aecebd3df97acd6775f7ba7afb3ad6
99c7920038f551b8c16e472840c78afc3d567021
/aliyun-java-sdk-openanalytics-open-v5/src/main/java/com/aliyuncs/v5/openanalytics_open/model/v20180619/GetAllowIPResponse.java
4f59ffb882f102f688cf1670d754fa20a3e27f8e
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk-v5
9fa211e248b16c36d29b1a04662153a61a51ec88
0ece7a0ba3730796e7a7ce4970a23865cd11b57c
refs/heads/master
2023-03-13T01:32:07.260745
2021-10-18T08:07:02
2021-10-18T08:07:02
263,800,324
4
2
NOASSERTION
2022-05-20T22:01:22
2020-05-14T02:58:50
Java
UTF-8
Java
false
false
1,657
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.v5.openanalytics_open.model.v20180619; import com.aliyuncs.v5.AcsResponse; import com.aliyuncs.v5.openanalytics_open.transform.v20180619.GetAllowIPResponseUnmarshaller; import com.aliyuncs.v5.transform.UnmarshallerContext; /** * @author auto create * @version */ public class GetAllowIPResponse extends AcsResponse { private String requestId; private String regionId; private String allowIP; public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public String getRegionId() { return this.regionId; } public void setRegionId(String regionId) { this.regionId = regionId; } public String getAllowIP() { return this.allowIP; } public void setAllowIP(String allowIP) { this.allowIP = allowIP; } @Override public GetAllowIPResponse getInstance(UnmarshallerContext context) { return GetAllowIPResponseUnmarshaller.unmarshall(this, context); } @Override public boolean checkShowJsonItemName() { return false; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
acf908c9fd945c09d5ee8283a5019773d8bb5c3e
ff1c94519f9672fb26b31a97853774ba8c9016a8
/src/SplitAStringInBalancedStrings/Solution.java
c82dd9a4798fa4eeb40c1d919833e0a18cf4c934
[]
no_license
wangyao2221/LeetCode
0a796af620e9e6dfefb8c49f755b4f2b6ee8d6ba
9ec81a60dcda022cf17cda14c1d373ffd28d8a72
refs/heads/master
2021-01-20T02:53:08.629877
2020-07-29T05:53:39
2020-07-29T05:53:39
89,457,428
3
0
null
null
null
null
UTF-8
Java
false
false
981
java
package SplitAStringInBalancedStrings; import java.util.ArrayList; import java.util.List; /** * 算法不符合提议,但也可以出一道题,就是找最大数量的RRLL对称数量 */ class Solution { public int balancedStringSplit(String s) { int result = 0; int flag = 0; for (int i = 0; i < s.length(); i++) { char ch = s.charAt(i); if (ch == 'R') { flag++; } else { flag--; } if (flag == 0) { result++; } } return result; } public static void main(String[] args) { // System.out.println(new Solution().balancedStringSplit("RLRRLLRLRL")); // System.out.println(new Solution().balancedStringSplit("RLLLLRRRLR")); // System.out.println(new Solution().balancedStringSplit("LLLLRRRR")); System.out.println(new Solution().balancedStringSplit("RRLRRLRLLLRL")); } }
[ "wangyao2221@163.com" ]
wangyao2221@163.com
dea12cba621a85cf9ba7f4c6f79a168d252ebe29
2fa04f21cbb7203b468f7598df6696a88b05a286
/bus-gitlab/src/main/java/org/aoju/bus/gitlab/models/NotificationSettings.java
c095d0a70a950960f6b92188ff7ff4fc0f9df934
[ "MIT", "LicenseRef-scancode-proprietary-license" ]
permissive
jingshuai5213/bus
17bb475fd76592682123488608a559abec788f81
f3ec545617acffaf2668ea78e974a05be268cfd1
refs/heads/master
2022-11-16T00:35:46.037858
2020-07-02T09:35:10
2020-07-02T09:35:10
254,873,385
0
0
MIT
2020-07-02T09:35:11
2020-04-11T13:26:50
null
UTF-8
Java
false
false
6,737
java
/********************************************************************************* * * * The MIT License (MIT) * * * * Copyright (c) 2015-2020 aoju.org Greg Messner and other contributors. * * * * Permission is hereby granted, free of charge, to any person obtaining a copy * * of this software and associated documentation files (the "Software"), to deal * * in the Software without restriction, including without limitation the rights * * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * * copies of the Software, and to permit persons to whom the Software is * * furnished to do so, subject to the following conditions: * * * * The above copyright notice and this permission notice shall be included in * * all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * * THE SOFTWARE. * ********************************************************************************/ package org.aoju.bus.gitlab.models; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import org.aoju.bus.gitlab.JacksonJson; import org.aoju.bus.gitlab.JacksonJsonEnumHelper; /** * @author Kimi Liu * @version 6.0.1 * @since JDK 1.8+ */ public class NotificationSettings { private Level level; private String email; private Events events; public Level getLevel() { return level; } public void setLevel(Level level) { this.level = level; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public Events getEvents() { return events; } public void setEvents(Events events) { this.events = events; } @Override public String toString() { return (JacksonJson.toJsonString(this)); } /** * Notification level */ public static enum Level { DISABLED, PARTICIPATING, WATCH, GLOBAL, MENTION, CUSTOM; private static JacksonJsonEnumHelper<Level> enumHelper = new JacksonJsonEnumHelper<>(Level.class); @JsonCreator public static Level forValue(String value) { return enumHelper.forValue(value); } @JsonValue public String toValue() { return (enumHelper.toString(this)); } @Override public String toString() { return (enumHelper.toString(this)); } } public static class Events { private Boolean newNote; private Boolean newIssue; private Boolean reopenIssue; private Boolean closeIssue; private Boolean reassignIssue; private Boolean newMergeRequest; private Boolean reopenMergeRequest; private Boolean closeMergeRequest; private Boolean reassignMergeRequest; private Boolean mergeMergeRequest; private Boolean failedPipeline; private Boolean successPipeline; public Boolean getNewNote() { return newNote; } public void setNewNote(Boolean newNote) { this.newNote = newNote; } public Boolean getNewIssue() { return newIssue; } public void setNewIssue(Boolean newIssue) { this.newIssue = newIssue; } public Boolean getReopenIssue() { return reopenIssue; } public void setReopenIssue(Boolean reopenIssue) { this.reopenIssue = reopenIssue; } public Boolean getCloseIssue() { return closeIssue; } public void setCloseIssue(Boolean closeIssue) { this.closeIssue = closeIssue; } public Boolean getReassignIssue() { return reassignIssue; } public void setReassignIssue(Boolean reassignIssue) { this.reassignIssue = reassignIssue; } public Boolean getNewMergeRequest() { return newMergeRequest; } public void setNewMergeRequest(Boolean newMergeRequest) { this.newMergeRequest = newMergeRequest; } public Boolean getReopenMergeRequest() { return reopenMergeRequest; } public void setReopenMergeRequest(Boolean reopenMergeRequest) { this.reopenMergeRequest = reopenMergeRequest; } public Boolean getCloseMergeRequest() { return closeMergeRequest; } public void setCloseMergeRequest(Boolean closeMergeRequest) { this.closeMergeRequest = closeMergeRequest; } public Boolean getReassignMergeRequest() { return reassignMergeRequest; } public void setReassignMergeRequest(Boolean reassignMergeRequest) { this.reassignMergeRequest = reassignMergeRequest; } public Boolean getMergeMergeRequest() { return mergeMergeRequest; } public void setMergeMergeRequest(Boolean mergeMergeRequest) { this.mergeMergeRequest = mergeMergeRequest; } public Boolean getFailedPipeline() { return failedPipeline; } public void setFailedPipeline(Boolean failedPipeline) { this.failedPipeline = failedPipeline; } public Boolean getSuccessPipeline() { return successPipeline; } public void setSuccessPipeline(Boolean successPipeline) { this.successPipeline = successPipeline; } @Override public String toString() { return (JacksonJson.toJsonString(this)); } } }
[ "839536@qq.com" ]
839536@qq.com
cb922466779982ff5c4bbf690c4ad235ef2f26ed
327053e1007538aa4418abc3baf32c3ece901dee
/src/main/java/com/hanains/mysite/interceptor/AuthLoginInterceptor.java
54c84f75d785ad602b4e77d245505f11942d4a50
[]
no_license
801sanae/mysite3
8e9ea1ac07346e4ff63a8983054c34ec45232430
68c6f5a94388b8c2604aacf400831c5a0e42e182
refs/heads/master
2021-01-13T00:40:42.062654
2015-12-23T00:58:22
2015-12-23T00:58:22
47,959,742
0
0
null
null
null
null
UTF-8
Java
false
false
1,743
java
package com.hanains.mysite.interceptor; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.catalina.core.ApplicationContext; import org.springframework.beans.factory.BeanFactory; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; import com.hanains.mysite.service.UserService; import com.hanains.mysite.vo.UserVo; public class AuthLoginInterceptor extends HandlerInterceptorAdapter { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { String email = request.getParameter("email"); String password = request.getParameter("password"); UserVo vo = new UserVo(); vo.setEmail(email); vo.setPassword(password); //web application context에 이미 생성되있다.. //listener가 만드는 컨테이너(root web application Context) controller, service,등등 다들어잇다. WebApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(request.getServletContext()); UserService userService = applicationContext.getBean(UserService.class); UserVo authUser = userService.login(vo); if(authUser==null){ response.sendRedirect(request.getContextPath()+"/user/loginform"); return false; } //login 처리 HttpSession session = request.getSession(true); session.setAttribute("authUser", authUser); response.sendRedirect(request.getContextPath()); return false; } }
[ "bit-user@bit" ]
bit-user@bit
ff1ee693e629161b9d6bfe0b71011048590f19dd
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/14/14_acf882df6811d0653cb6c6bf4a5b640d34aa0885/ConsoleServlet/14_acf882df6811d0653cb6c6bf4a5b640d34aa0885_ConsoleServlet_t.java
5f1cd96e332df47e7ece6137c5fc236f9352c6ef
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,258
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.tomee.webapp.servlet; import org.apache.openejb.util.OpenEJBScripter; import org.apache.tomee.webapp.JsonExecutor; import org.apache.tomee.webapp.listener.UserSessionListener; import javax.script.Bindings; import javax.script.SimpleBindings; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.io.IOException; import java.util.Map; public class ConsoleServlet extends HttpServlet { public static final OpenEJBScripter SCRIPTER = new OpenEJBScripter(); @Override protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { JsonExecutor.execute(resp, new JsonExecutor.Executor() { @Override public void call(Map<String, Object> json) throws Exception { final String scriptCode = req.getParameter("scriptCode"); if (scriptCode == null || "".equals(scriptCode.trim())) { return; //nothing to do } final HttpSession session = req.getSession(); String engineName = req.getParameter("engineName"); if (engineName == null || "".equals(engineName.trim())) { engineName = "js"; } final Bindings bindings = new SimpleBindings(); bindings.put("req", req); bindings.put("resp", resp); bindings.put("util", new Utility() { @Override public void write(Object obj) throws Exception { resp.getWriter().write(String.valueOf(obj)); } @Override public void save(String key, Object obj) { UserSessionListener.getServiceContext(req.getSession()).getSaved().put(key, obj); } }); SCRIPTER.evaluate(engineName, scriptCode, bindings); } }); } private interface Utility { void write(Object obj) throws Exception; void save(String key, Object obj); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
ef3b85a5e413b4d61d275a688975750cbf80bf87
2481d8c57b43b95d70c6d1a28ee90dd4d6ae1372
/temp/src/minecraft/net/minecraft/src/Packet42RemoveEntityEffect.java
1b16a4e91139e11d2c0190a9d6f952f4219b44d4
[]
no_license
UserCake/Gallifrey
c20bc8c6e75dc3a6b61301458ba5704d2db5872a
2a55cb6106224b274f3326d7f5802540063bfa66
refs/heads/master
2021-01-20T21:53:10.901777
2012-03-28T05:58:35
2012-03-28T05:58:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,049
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode fieldsfirst package net.minecraft.src; import java.io.*; // Referenced classes of package net.minecraft.src: // Packet, NetHandler public class Packet42RemoveEntityEffect extends Packet { public int field_35253_a; public byte field_35252_b; public Packet42RemoveEntityEffect() { } public void func_327_a(DataInputStream p_327_1_) throws IOException { field_35253_a = p_327_1_.readInt(); field_35252_b = p_327_1_.readByte(); } public void func_322_a(DataOutputStream p_322_1_) throws IOException { p_322_1_.writeInt(field_35253_a); p_322_1_.writeByte(field_35252_b); } public void func_323_a(NetHandler p_323_1_) { p_323_1_.func_35783_a(this); } public int func_329_a() { return 5; } }
[ "eightbitme@me.com" ]
eightbitme@me.com
9daa78786d1057fec08dea48edb1d16476347578
ca0e9689023cc9998c7f24b9e0532261fd976e0e
/src/com/tencent/mm/ah/w.java
3a8f86602d2b42f437ff51cc8b4541815ef02e99
[]
no_license
honeyflyfish/com.tencent.mm
c7e992f51070f6ac5e9c05e9a2babd7b712cf713
ce6e605ff98164359a7073ab9a62a3f3101b8c34
refs/heads/master
2020-03-28T15:42:52.284117
2016-07-19T16:33:30
2016-07-19T16:33:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
271
java
package com.tencent.mm.ah; import com.tencent.mm.ar.g.b; final class w implements g.b { public final String[] lW() { return ac.aqU; } } /* Location: * Qualified Name: com.tencent.mm.ah.w * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
6bbbeb221ef138bf5ab3a19e5b2a040580789a64
7babc8d969e1e0878a1917901b10c1777c128b03
/ddl-concurrency/src/main/java/com/ddl/concurrency/designpattern/immutable/ImmutableTest.java
933f75b3fc33e1d50364ef43783171ff2a5b753c
[]
no_license
vigour0423/ddlall
430912dde1a3cd881d29b017f2952ec4b727d852
7915abf5f9e93391cefdbb8d75952b6755fcca48
refs/heads/master
2022-12-25T05:29:28.990336
2020-05-14T15:43:05
2020-05-14T15:43:05
154,122,468
0
2
null
2022-12-16T09:45:08
2018-10-22T10:05:15
Java
UTF-8
Java
false
false
610
java
package com.ddl.concurrency.designpattern.immutable; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class ImmutableTest { private final int age; private final String name; private final List<String> list; public ImmutableTest(int age, String name) { this.age = age; this.name = name; list = new ArrayList<>(); } public int getAge() { return age; } public String getName() { return name; } public List<String> getList() { return Collections.unmodifiableList(list); } }
[ "489582986@qq.com" ]
489582986@qq.com
2bd837b94f260f44989fa683c481f7f8fb73cc2d
a5026575cda665451bb6f42343bf443b77da1041
/app/src/main/java/com/zht/lazyload/LazyLoadFragmnet.java
7f0e520bf5724dd2f3316aa01c198bb782d196b7
[]
no_license
zhtoo/LazyLoad
d3c08e4373866a8cf51e648000712b4ef69ec7cb
79fca97fbd332901cee82d48501a59eab099df66
refs/heads/master
2021-05-02T15:19:11.788758
2018-02-11T09:07:09
2018-02-11T09:07:09
120,694,214
1
0
null
null
null
null
UTF-8
Java
false
false
1,900
java
package com.zht.lazyload; import android.support.v4.app.Fragment; /** * 作者:zhanghaitao on 2018/2/8 09:47 * 邮箱:820159571@qq.com * * @describe:懒加载模式的Fragment */ public abstract class LazyLoadFragmnet extends Fragment { // mark :to judge fragment if is init complete // 标志位 :用以判断"初始化"动作是否完成 protected boolean isPrepared; // mark : to judge fragment if is visible // 标志位 :用以判断当面是否可见 protected boolean isVisible; /** * en :to judge if is visible to user * zh :判断Fragment是否对用户显示 */ @Override public void setUserVisibleHint(boolean isVisibleToUser) { super.setUserVisibleHint(isVisibleToUser); if (getUserVisibleHint()) { this.isVisible = true; onVisible(); } else { this.isVisible = false; onInvisible(); } } /** * en : when the fragment is not visible to user * zh : 当Fragment不显示的时调用 */ protected void onInvisible() { } /** * en : when the fragment is visible to user lazyload * zh : 当Fragment显示的时候调用 */ protected void onVisible() { // 如果没初始化好或者不可见,则return if (isPrepared && isVisible) { lazyLoad(); } } /** * en : when the fragment init is complete * zh : 当Fragment初始化完成后调用 */ protected void ready() { isPrepared = true; if (isVisible) { lazyLoad(); } } /** * en : when fragment init is complete and is visible * zh : 初始化完成 且 页面可见,则执行本方法 */ protected abstract void lazyLoad(); }
[ "3108003368@qq.com" ]
3108003368@qq.com
e67399e706e708d5584b6bf2011c784b0f2e070f
5832504c187692c3410ab0754d647af1d191bec2
/bin/ext-accelerator/acceleratorcms/src/de/hybris/platform/acceleratorcms/setup/AcceleratorCmsSystemSetup.java
bc790d336b31e7b49c4ec079b0fe132064d92c6b
[]
no_license
ramamohan/Hybris_TEST
d8505769885edc66ed85831def9e2b9f93bf33a6
820654707f194feb785483f9bf9851a1381af9d0
refs/heads/master
2021-12-09T05:35:58.257789
2016-04-28T23:42:26
2016-04-28T23:42:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,333
java
/* * [y] hybris Platform * * Copyright (c) 2000-2015 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("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 hybris. * * */ package de.hybris.platform.acceleratorcms.setup; import java.util.Collections; import java.util.List; import de.hybris.platform.acceleratorcms.constants.AcceleratorCmsConstants; import de.hybris.platform.commerceservices.setup.AbstractSystemSetup; import de.hybris.platform.core.initialization.SystemSetup; import de.hybris.platform.core.initialization.SystemSetupContext; import de.hybris.platform.core.initialization.SystemSetupParameter; @SystemSetup(extension = AcceleratorCmsConstants.EXTENSIONNAME) public class AcceleratorCmsSystemSetup extends AbstractSystemSetup { @Override public List<SystemSetupParameter> getInitializationOptions() { return Collections.emptyList(); } @SystemSetup(type = SystemSetup.Type.ESSENTIAL, process = SystemSetup.Process.ALL) public void createEssentialData(final SystemSetupContext context) { importImpexFile(context, "/acceleratorcms/import/essential-data.impex", true); } }
[ "kevind@mail.ru" ]
kevind@mail.ru
bb8a4633ab465fd71087b6d2d3087ed723bc8b65
79ad64833f328397b1093779ef37bba5424de6ba
/app/src/main/java/vn/com/vnpt/vinaphone/vnptsoftware/vnptoffice/adapter/FileChiDaoAdapter.java
0ce0c8703e7a5dac880467d8ba05d4f029b027f3
[]
no_license
nguyenkiemhieu1/VNPT_01
75a047485b009b992ce8530acef4c18098a517c8
630612ff55049e6a68fa0aa0fb20f2d932f0b565
refs/heads/master
2023-02-01T00:40:09.029586
2020-12-18T08:27:30
2020-12-18T08:27:30
322,534,445
0
0
null
null
null
null
UTF-8
Java
false
false
5,779
java
package vn.com.vnpt.vinaphone.vnptsoftware.vnptoffice.adapter; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import java.util.List; import vn.com.vnpt.vinaphone.vnptsoftware.vnptoffice.R; import vn.com.vnpt.vinaphone.vnptsoftware.vnptoffice.common.Constants; import vn.com.vnpt.vinaphone.vnptsoftware.vnptoffice.configuration.Application; import vn.com.vnpt.vinaphone.vnptsoftware.vnptoffice.view.activity.EditchiDaoV2Activity; import vn.com.vnpt.vinaphone.vnptsoftware.vnptoffice.view.activity.ForwardChiDaoV2Activity; import vn.com.vnpt.vinaphone.vnptsoftware.vnptoffice.view.activity.ReplyChiDaoV2Activity; import vn.com.vnpt.vinaphone.vnptsoftware.vnptoffice.view.activity.SendChiDaoV2Activity; import vn.com.vnpt.vinaphone.vnptsoftware.vnptoffice.view.model.FileChiDao; /** * Created by LinhLK - 0948012236 on 8/31/2017. */ public class FileChiDaoAdapter extends ArrayAdapter<FileChiDao> { private Context context; private int resource; private List<FileChiDao> attachFileInfoList; private String type; public FileChiDaoAdapter(Context context, int resource, List<FileChiDao> attachFileInfoList, String type) { super(context, resource, attachFileInfoList); this.context = context; this.resource = resource; this.attachFileInfoList = attachFileInfoList; this.type = type; } public View getView(final int position, View convertView, ViewGroup parent) { LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); View view = inflater.inflate(this.resource, null); final LinearLayout itemAttackFile = (LinearLayout) view.findViewById(R.id.itemAttackFile); ImageView ic_file = (ImageView) view.findViewById(R.id.ic_file); ImageView ic_remove = (ImageView) view.findViewById(R.id.ic_remove); TextView filename = (TextView) view.findViewById(R.id.filename); filename.setTypeface(Application.getApp().getTypeface()); final FileChiDao attachFileInfo = attachFileInfoList.get(position); filename.setText(attachFileInfo.getName()); if (attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.DOC) || attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.DOCX)) { ic_file.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_doc)); } if (attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.XLS) || attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.XLSX)) { ic_file.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_xls)); } if (attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.PPT) || attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.PPTX)) { ic_file.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_ppt)); } if (attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.PDF)) { ic_file.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_pdf)); } if (attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.ZIP)) { ic_file.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_zip)); } if (attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.RAR)) { ic_file.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_rar)); } if (attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.TXT)) { ic_file.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_txt)); } if (attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.MPP)) { ic_file.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_mpp)); } if (attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.JPG) || attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.JPEG) || attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.PNG) || attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.GIF) || attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.TIFF) || attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.BMP)) { ic_file.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_image)); } ic_remove.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { itemAttackFile.setVisibility(View.GONE); if (type.equals("SEND")) { ((SendChiDaoV2Activity) context).removeFile(attachFileInfo.getName()); itemAttackFile.removeAllViews(); } if (type.equals("EDIT")) { ((EditchiDaoV2Activity) context).removeFile(attachFileInfo.getName()); itemAttackFile.removeAllViews(); } // if (type.equals("FW")) { // ((ForwardChiDaoV2Activity) context).removeFile(attachFileInfo.getName()); // itemAttackFile.removeAllViews(); // } if (type.equals("REPLY")) { ((ReplyChiDaoV2Activity) context).removeFile(attachFileInfo.getName()); itemAttackFile.removeAllViews(); } } }); return view; } }
[ "hieunguyen18021999@gmail.com" ]
hieunguyen18021999@gmail.com
f0b39f3ec33bbeea579091036b030733ab7d74b2
5ecd15baa833422572480fad3946e0e16a389000
/framework/MCS-Open/subsystems/eclipse-ab/main/api/java/com/volantis/mcs/eclipse/ab/editors/xml/XMLDocumentProvider.java
2f49a2d576109fa7ea6214a14e9f32e5dc703da1
[]
no_license
jabley/volmobserverce
4c5db36ef72c3bb7ef20fb81855e18e9b53823b9
6d760f27ac5917533eca6708f389ed9347c7016d
refs/heads/master
2021-01-01T05:31:21.902535
2009-02-04T02:29:06
2009-02-04T02:29:06
38,675,289
0
1
null
null
null
null
UTF-8
Java
false
false
5,222
java
/* This file is part of Volantis Mobility Server. Volantis Mobility Server is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Volantis Mobility Server is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Volantis Mobility Server.  If not, see <http://www.gnu.org/licenses/>. */ /* ---------------------------------------------------------------------------- * (c) Volantis Systems Ltd 2003. * ---------------------------------------------------------------------------- */ package com.volantis.mcs.eclipse.ab.editors.xml; import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IDocumentPartitioner; import org.eclipse.jface.text.rules.DefaultPartitioner; import org.eclipse.ui.editors.text.FileDocumentProvider; import java.io.InputStream; /** * A document provided for XML documents. * * DISCLAIMER: This class and its associated classes are a quick fix built to * provide the ability to edit themes and layouts without the Design * parts. As such there are more likely to be bugs, bits missing and * bits that could be better designed. */ public class XMLDocumentProvider extends FileDocumentProvider { // javadoc inherited protected IDocument createDocument(Object element) throws CoreException { IDocument document = super.createDocument(element); if (document != null) { establishPartitioner(document); } return document; } /** * Establish document partitioner for this document provider. * @param document The document for the partitioner. Must not be null. * @throws IllegalArgumentException If document is null. */ private void establishPartitioner(IDocument document) { if (document == null) { throw new IllegalArgumentException("Cannot be null: document"); //$NON-NLS-1$ } IDocumentPartitioner partitioner = new DefaultPartitioner( new XMLPartitionScanner(), new String[]{ XMLPartitionScanner.XML_TAG, XMLPartitionScanner.XML_COMMENT}); partitioner.connect(document); document.setDocumentPartitioner(partitioner); } /** * Set the document content. * @param element The element (e.g. IEditorInput) associciated with the * document. * @param contentStream The InputStream from which to derive the * content. The content is expected to be well-formed xml. * @throws CoreException If the contentStream cannot be read. */ public void setDocumentContent(Object element, InputStream contentStream, boolean isDirty) throws CoreException { setDocumentContent(getDocument(element), contentStream, getEncoding(element)); FileInfo info = (FileInfo) getElementInfo(element); if (info != null) { if (isDirty != info.fCanBeSaved && info.fCanBeSaved) { // This means that the document from which this content // has been set has been saved making it non dirty. // Because it has been saved the resource is now out // of sync with this document provided and an attempt // to save will therefore bring up a dialog asking the // user if they wish to override the changes. To avoid // this dialog we synchronize here. synchronize(element); } else { fireElementContentAboutToBeReplaced(element); info.fDocument.set(getDocument(element).get()); if (info.fCanBeSaved && !isDirty) { addUnchangedElementListeners(element, info); } fireElementContentReplaced(element); if (isDirty != info.fCanBeSaved) { info.fCanBeSaved = isDirty; fireElementDirtyStateChanged(element, isDirty); } } } } } /* =========================================================================== Change History =========================================================================== $Log$ 08-Dec-04 6416/3 ianw VBM:2004120703 New Build 08-Dec-04 6416/1 ianw VBM:2004120703 New Build 03-Feb-04 2820/1 doug VBM:2004013002 Used the eclipse 'externalize strings wizard' to identify language specific resources 06-Jan-04 2412/2 allan VBM:2004010407 Fixed dirty status handling when switching editor page. 04-Jan-04 2309/2 allan VBM:2003122202 Provide an MCS source editor for multi-page and stand-alone policy editing. =========================================================================== */
[ "iwilloug@b642a0b7-b348-0410-9912-e4a34d632523" ]
iwilloug@b642a0b7-b348-0410-9912-e4a34d632523
0b8320986a8504cc260d71a3b673673b006e5a05
24e94e79466b6761e26e838ba6cb393cb464115b
/src/main/java/com/kylin/electricassistsys/entity/facility/ZyxlEntity.java
f1c41a55e39ba7f3c35b18c5f2852d2703660d76
[ "Apache-2.0" ]
permissive
radtek/oldDlxt
da5d065bbd9972c76e823968145d0e8c837a8f21
7fc8cbf0db983fc8f04fa704995b4efd8e9e5255
refs/heads/master
2020-05-27T14:51:17.131055
2018-07-01T03:41:15
2018-07-01T03:41:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,341
java
package com.kylin.electricassistsys.entity.facility; /** * 设备-中压线路 */ public class ZyxlEntity { /** * 主键jgNf */ private String glid; /** * open3000设备编号 */ private String opensbid; /** * open3000设备名称 */ private String opensbname; /** * open3000厂站编号 */ private String id; /** * 设备类型 变压器,变电站 ,交流线路 , 中压线路 */ private String sbtype; /** * 关联设备 */ private String mysbid; /** * 关联设备 */ private String xlmc; /** * 关联日期 */ private String sbgltime; /** * 关联类型 手动,自动 */ private String gltype; /** * 备注 */ private String remark; public String getGlid() { return glid; } public void setGlid(String glid) { this.glid = glid; } public String getOpensbid() { return opensbid; } public void setOpensbid(String opensbid) { this.opensbid = opensbid; } public String getOpensbname() { return opensbname; } public void setOpensbname(String opensbname) { this.opensbname = opensbname; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getSbtype() { return sbtype; } public void setSbtype(String sbtype) { this.sbtype = sbtype; } public String getMysbid() { return mysbid; } public void setMysbid(String mysbid) { this.mysbid = mysbid; } public String getXlmc() { return xlmc; } public void setXlmc(String xlmc) { this.xlmc = xlmc; } public String getSbgltime() { return sbgltime; } public void setSbgltime(String sbgltime) { this.sbgltime = sbgltime; } public String getGltype() { return gltype; } public void setGltype(String gltype) { this.gltype = gltype; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } }
[ "609676374@qq.com" ]
609676374@qq.com
39c90e7719f1caccf32a7ec854c145f367efd58b
83a4e2fc957f9812dbc574eb0fe4ff6ba2f5b1b3
/logistics/src/main/java/com/cl/logistics/service/IGoodsBillService.java
bd2944814892dc0bf6922fea950cdbec2416331e
[]
no_license
TANGWO/code
8c82eaa55712d904f25caf4bdd92f0cedf0071f5
2dccc788e5e1b5a9ca4e1432d299bad2b91b3441
refs/heads/master
2020-04-15T02:29:27.086977
2019-01-04T09:33:16
2019-01-04T09:33:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,135
java
package com.cl.logistics.service; import java.util.List; import java.util.Map; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import com.cl.logistics.bean.CargoReceiptDetail; import com.cl.logistics.bean.GoodsBill; import com.cl.logistics.bean.GoodsBillEvent; public interface IGoodsBillService { public Map<?, ?> save(GoodsBill goodsBill); public boolean saveGoods(String goodsBillDetailId, CargoReceiptDetail cargoReceiptDetail); public Page<GoodsBillEvent> selectAllGoogsBillByPage(Pageable pageable); public Page<GoodsBillEvent> selectGoodsBillByEvent(String eventName, Pageable pageable); public GoodsBill selectByGoodsBillCode(String goodsBillCode); public boolean update(GoodsBill goodsBill); public boolean delete(String goodsBillCode); public List<GoodsBill> findDriverIdIsNull(); public List<GoodsBill> findWaitReceive(String customerCode); public Page<GoodsBill> findInformGet(String type, Pageable pageable); public Page<GoodsBill> findOldInform(String type, Pageable pageable); public Page<GoodsBill> findAllGot(Pageable pageable); }
[ "chenlingys@live.com" ]
chenlingys@live.com
17f4cb0d3b01f006f022679c46b44d786932e0b9
a8a556ba82bc3b1793ee4df924d78e2e4563d782
/StrategePattern/src/Cat.java
6ba24e31de5f78b6dfe91e4ffa8f854a3a4624b9
[]
no_license
icarus8050/DesignPattern-Practice
0b7eb8236dc16306a668b81d2c2cae581b0cdb63
ea7fa2bd2ac002af0343336b52696baa99bafb9f
refs/heads/master
2020-05-03T00:55:42.631969
2019-05-04T08:53:03
2019-05-04T08:53:03
178,323,480
3
0
null
null
null
null
UTF-8
Java
false
false
242
java
public class Cat extends Animal { @Override public void cry() { // TODO Auto-generated method stub System.out.println("Meow"); } @Override public void movePerform() { // TODO Auto-generated method stub getMove().move(); } }
[ "icarus8050@naver.com" ]
icarus8050@naver.com
84d9c80cd9238b271d26e79c91bc3e0c4d94b3d6
99db30cac9ad89c8fc8ffefa819135cebb01d7b1
/GluePS/src/org/coppercore/component/IntegerProperty.java
9613a55d6e4d21a5ffaf2dae3cf719817ea74ded
[]
no_license
METIS-Project/ILDE
b4bbf52c39fae24b7dafda7f0c3684cb3901f201
f6e87f7f08dbe251a26ac78302bc30288142a9dd
refs/heads/master
2021-01-01T16:30:40.596086
2015-02-06T16:45:17
2015-02-06T16:45:17
7,796,946
2
0
null
null
null
null
UTF-8
Java
false
false
4,080
java
/* * CopperCore, an IMS-LD level C engine * Copyright (C) 2003 Harrie Martens and Hubert Vogten * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (/license.txt); if not, * write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * * Contact information: * Open University of the Netherlands * Valkenburgerweg 177 Heerlen * PO Box 2960 6401 DL Heerlen * e-mail: hubert.vogten@ou.nl or * harrie.martens@ou.nl * * * Open Universiteit Nederland, hereby disclaims all copyright interest * in the program CopperCore written by * Harrie Martens and Hubert Vogten * * prof.dr. Rob Koper, * director of learning technologies research and development * */ package org.coppercore.component; import org.coppercore.business.Run; import org.coppercore.business.Uol; import org.coppercore.business.User; import org.coppercore.datatypes.LDDataType; import org.coppercore.datatypes.LDInteger; import org.coppercore.exceptions.PropertyException; import org.coppercore.exceptions.TypeCastException; /** * This Property represents an IMS LD integer Property. It extends * ExplicitProperty adding type cast and restriction checking to the standard * Property mechanism. * * @author Harrie Martens * @author Hubert Vogten * @version $Revision: 1.16 $, $Date: 2005/01/19 16:31:27 $ */ public class IntegerProperty extends ExplicitProperty { private static final long serialVersionUID = 42L; /** * Default constructor during run time. * * @param uol Uol the Uol in which this Property was declared * @param run Run the Run in which this Property was referenced * @param user User the User referring to this Property * @param propId String the identifier of this Property as defined in the IMS * LD instance * @throws PropertyException when the constructor fails to create this * Property * @throws TypeCastException when the stored value can not be type casted to * the type of the Property. This may occur especially after republication * of the IMS LD instance. */ public IntegerProperty(Uol uol, Run run, User user, String propId) throws PropertyException, TypeCastException { super(uol, run, user, propId); } /** * Returns the corresponding PropertyDefinition belonging to this component. * * @throws PropertyException when this operation fails * @return PropertyDef the PropertyDefinition for this component */ protected PropertyDef findPropertyDef() throws PropertyException { return new IntegerPropertyDef(uolId, propId); } /** * Creates the LDDataType object corresponding with the object and its String * value. * * @param aValue String the value of this object * @throws TypeCastException when the passed value can not be converted to * the required LDDataType * @return LDDataType the LDDataType object representing the value */ protected LDDataType createPropertyValue(String aValue) throws TypeCastException { LDInteger result = null; if (aValue != null) { result = new LDInteger(aValue); } return result; } /** * Returns the passed value in the correct LDDataType by casting it. * * @param aValue LDDataType the value to be type casted * @throws TypeCastException if type cast fails * @return LDDataType the type casted value */ public LDDataType typeCast(LDDataType aValue) throws TypeCastException { return aValue.toLDInteger(); } }
[ "javierht@gmail.com" ]
javierht@gmail.com
4d8a18266c9756e69a1e6a7fd6051eb5741b1101
509d496f1d4a37d1b56693d19cf96c528938baaa
/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigStereotypeDeclaration.java
8192729b0b85cc913997c65a361f09791563984e
[ "LicenseRef-scancode-other-permissive", "BSD-3-Clause" ]
permissive
SofienBoutaib/argouml
bb65203a680b6d2c977c0bb96637914fd30584b1
71809598cfc3793b14809c51c975ac305e9bea6a
refs/heads/master
2022-06-20T21:36:50.184555
2011-11-01T17:43:21
2011-11-01T17:43:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,698
java
/* $Id: FigStereotypeDeclaration.java 17735 2010-01-04 14:49:32Z bobtarling $ ******************************************************************************* * Copyright (c) 2010 Contributors - see below * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Tom Morris * Bob Tarling ******************************************************************************* * * Some portions of this file was previously release using the BSD License: */ // $Id: FigStereotypeDeclaration.java 17735 2010-01-04 14:49:32Z bobtarling $ // Copyright (c) 1996-2009 The Regents of the University of California. All // Rights Reserved. Permission to use, copy, modify, and distribute this // software and its documentation without fee, and without a written // agreement is hereby granted, provided that the above copyright notice // and this paragraph appear in all copies. This software program and // documentation are copyrighted by The Regents of the University of // California. The software program and documentation are supplied "AS // IS", without any accompanying services from The Regents. The Regents // does not warrant that the operation of the program will be // uninterrupted or error-free. The end-user understands that the program // was developed for research purposes and is advised not to rely // exclusively on the program for any reason. IN NO EVENT SHALL THE // UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, // SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE // PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF // CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. package org.argouml.uml.diagram.static_structure.ui; import java.awt.Rectangle; import java.awt.event.MouseEvent; import java.util.HashSet; import java.util.Set; import java.util.Vector; import javax.swing.Action; import org.argouml.model.Model; import org.argouml.ui.ArgoJMenu; import org.argouml.uml.diagram.DiagramSettings; import org.argouml.uml.diagram.ui.ActionAddNote; import org.argouml.uml.diagram.ui.ActionCompartmentDisplay; import org.argouml.uml.diagram.ui.ActionEdgesDisplay; import org.argouml.uml.diagram.ui.CompartmentFigText; import org.argouml.uml.diagram.ui.FigCompartmentBox; import org.argouml.uml.ui.foundation.extension_mechanisms.ActionNewTagDefinition; import org.tigris.gef.base.Selection; /** * Class to display a Stereotype declaration figure using * Classifier box notation.<p> * * TODO: This is just a place-holder right now! - tfm * This needs to show tags and constraints. */ public class FigStereotypeDeclaration extends FigCompartmentBox { private void constructFigs(Rectangle bounds) { // Put all the bits together, suppressing bounds calculations until // we're all done for efficiency. enableSizeChecking(false); setSuppressCalcBounds(true); getStereotypeFig().setKeyword("stereotype"); getStereotypeFig().setVisible(true); /* The next line is needed so that we have the right dimension * when drawing this Fig on the diagram by pressing down * the mouse button, even before releasing the mouse button: */ getNameFig().setTopMargin( getStereotypeFig().getMinimumSize().height); addFig(getBigPort()); addFig(getNameFig()); // stereotype fig covers the name fig: addFig(getStereotypeFig()); // TODO: Need named Tags and Constraints compartments here // addFig(tagsFig); // addFig(constraintsFig); // Make all the parts match the main fig setFilled(true); setFillColor(FILL_COLOR); setLineColor(LINE_COLOR); setLineWidth(LINE_WIDTH); /* Set the drop location in the case of D&D: */ if (bounds != null) { setLocation(bounds.x, bounds.y); } setSuppressCalcBounds(false); setBounds(getBounds()); } /** * Construct a Fig for a Stereotype on a diagram. * * @param owner owning stereotype * @param bounds position and size * @param settings render settings */ public FigStereotypeDeclaration(Object owner, Rectangle bounds, DiagramSettings settings) { super(owner, bounds, settings); constructFigs(bounds); enableSizeChecking(true); } @Override public Selection makeSelection() { return new SelectionStereotype(this); } /** * Build a collection of menu items relevant for a right-click * pop-up menu on a Stereotype. * {@inheritDoc} */ @Override public Vector getPopUpActions(MouseEvent me) { Vector popUpActions = super.getPopUpActions(me); // Add... ArgoJMenu addMenu = new ArgoJMenu("menu.popup.add"); // TODO: Add Tags & Constraints // addMenu.add(TargetManager.getInstance().getAddAttributeAction()); // addMenu.add(TargetManager.getInstance().getAddOperationAction()); addMenu.add(new ActionAddNote()); addMenu.add(new ActionNewTagDefinition()); addMenu.add(ActionEdgesDisplay.getShowEdges()); addMenu.add(ActionEdgesDisplay.getHideEdges()); popUpActions.add(popUpActions.size() - getPopupAddOffset(), addMenu); // Show ... ArgoJMenu showMenu = new ArgoJMenu("menu.popup.show"); for (Action action : ActionCompartmentDisplay.getActions()) { showMenu.add(action); } if (showMenu.getComponentCount() > 0) { popUpActions.add(popUpActions.size() - getPopupAddOffset(), showMenu); } // Modifiers ... popUpActions.add(popUpActions.size() - getPopupAddOffset(), buildModifierPopUp(ABSTRACT | LEAF | ROOT)); // Visibility ... popUpActions.add(popUpActions.size() - getPopupAddOffset(), buildVisibilityPopUp()); return popUpActions; } @Override protected CompartmentFigText unhighlight() { CompartmentFigText fc = super.unhighlight(); if (fc == null) { // TODO: Try unhighlighting our child compartments // fc = unhighlight(getAttributesFig()); } return fc; } @Override protected void updateListeners(Object oldOwner, Object newOwner) { Set<Object[]> listeners = new HashSet<Object[]>(); if (newOwner != null) { listeners.add(new Object[] {newOwner, null}); // register for tagDefinitions: for (Object td : Model.getFacade().getTagDefinitions(newOwner)) { listeners.add(new Object[] {td, new String[] {"name", "tagType", "multiplicity"}}); } /* TODO: constraints, ... */ } updateElementListeners(listeners); } }
[ "email@cs-ware.de" ]
email@cs-ware.de
fc6bf056cdebcf4f75b2a1fc653928c2dd525cad
8eb059ab34cb24751e9d9a04d49c4cd5d53d20ce
/remoting2/src/main/java/org/jboss/ejb3/remoting/endpoint/client/RemoteContextDataInterceptor.java
b9c98fc3af51f6cf59722daedabbae6b4c2c3a3f
[]
no_license
wolfc/jboss-ejb3.obsolete
0109c9f12100e0983333cb11803d18b073b0dbb5
4df1234e2f81312b3ff608f9965f9a6ad4191c92
refs/heads/master
2020-04-07T03:03:19.723537
2009-12-02T11:37:57
2009-12-02T11:37:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,616
java
/* * JBoss, Home of Professional Open Source. * Copyright 2009, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This 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 software 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 software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.ejb3.remoting.endpoint.client; import javax.interceptor.InvocationContext; import org.jboss.ejb3.sis.Interceptor; /** * @author <a href="mailto:cdewolf@redhat.com">Carlo de Wolf</a> * @version $Revision: $ */ public class RemoteContextDataInterceptor implements Interceptor { public Object invoke(InvocationContext context) throws Exception { RemoteContextData.setContextData(context.getContextData()); try { return context.proceed(); } finally { RemoteContextData.cleanContextData(); } } }
[ "cdewolf@redhat.com" ]
cdewolf@redhat.com
37788ab71f95b9e633dd15f77159bb3d1a7fbcd0
17fdc38df32efbd873302f699889f8b3e93690ff
/android/expoview/src/main/java/versioned/host/exp/exponent/modules/api/components/camera/CameraViewManager.java
2e892e89788027538cc276fd0012c81a095eed42
[ "MIT", "BSD-3-Clause", "CC-BY-4.0", "Apache-2.0" ]
permissive
mohebifar/expo
a83d51a1e2f886375aa6fb5c535719891dc3efdd
083f2254c65e71385054172e147765edfb676fe4
refs/heads/master
2021-01-15T21:24:31.714042
2017-08-09T23:02:36
2017-08-09T23:02:36
99,859,373
2
0
null
2017-08-09T22:58:22
2017-08-09T22:58:22
null
UTF-8
Java
false
false
2,981
java
package versioned.host.exp.exponent.modules.api.components.camera; import android.support.annotation.Nullable; import com.facebook.react.bridge.Promise; import com.facebook.react.common.MapBuilder; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; import com.facebook.react.uimanager.annotations.ReactProp; import com.google.android.cameraview.AspectRatio; import java.util.Map; import java.util.Set; public class CameraViewManager extends ViewGroupManager<ExpoCameraView> { public enum Events { EVENT_CAMERA_READY("onCameraReady"); private final String mName; Events(final String name) { mName = name; } @Override public String toString() { return mName; } } private static final String REACT_CLASS = "ExponentCamera"; private static CameraViewManager instance; private ExpoCameraView mCameraView; public CameraViewManager() { super(); instance = this; } public static CameraViewManager getInstance() { return instance; } @Override public String getName() { return REACT_CLASS; } @Override protected ExpoCameraView createViewInstance(ThemedReactContext themedReactContext) { mCameraView = new ExpoCameraView(themedReactContext); return mCameraView; } @Override @Nullable public Map<String, Object> getExportedCustomDirectEventTypeConstants() { MapBuilder.Builder<String, Object> builder = MapBuilder.builder(); for (Events event : Events.values()) { builder.put(event.toString(), MapBuilder.of("registrationName", event.toString())); } return builder.build(); } @ReactProp(name = "type") public void setType(ExpoCameraView view, int type) { view.setFacing(type); } @ReactProp(name = "ratio") public void setRatio(ExpoCameraView view, String ratio) { view.setAspectRatio(AspectRatio.parse(ratio)); } @ReactProp(name = "flashMode") public void setFlashMode(ExpoCameraView view, int torchMode) { view.setFlash(torchMode); } @ReactProp(name = "autoFocus") public void setAutoFocus(ExpoCameraView view, boolean autoFocus) { view.setAutoFocus(autoFocus); } @ReactProp(name = "focusDepth") public void setFocusDepth(ExpoCameraView view, float depth) { view.setFocusDepth(depth); } @ReactProp(name = "zoom") public void setZoom(ExpoCameraView view, float zoom) { view.setZoom(zoom); } @ReactProp(name = "whiteBalance") public void setWhiteBalance(ExpoCameraView view, int whiteBalance) { view.setWhiteBalance(whiteBalance); } public void takePicture(Promise promise) { if (mCameraView.isCameraOpened()) { mCameraView.takePicture(promise); } else { promise.reject("E_CAMERA_UNAVAILABLE", "Camera is not running"); } } public Set<AspectRatio> getSupportedRatios() { if (mCameraView.isCameraOpened()) { return mCameraView.getSupportedAspectRatios(); } return null; } }
[ "aurora@exp.host" ]
aurora@exp.host
9e6f01bc5ab8c337a540eb1cf625e2374817df7f
81b1cb8a87554af156ed7b84a21d24d0e074f25b
/src/main/java/com/creditharmony/core/common/type/SelectOptionType.java
a988b880bf1f153ef0aa949e9142e9ebb5653669
[]
no_license
sengeiou/chp-core
03e5abd12d242b04e0060372e0dcfad3ad52ccd2
bdc410a1682ba2983ed64cc8377b5e7707210819
refs/heads/master
2020-05-16T02:55:41.694666
2017-07-06T06:17:16
2017-07-06T06:17:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
618
java
package com.creditharmony.core.common.type; /** * 页面下拉列表框选项的类型常量 * @Class Name SelectOptionType * @author 张永生 * @Create In 2015年12月9日 */ public interface SelectOptionType { /** * 下拉列表默认被选中的选中项对应的String类型数值 */ public static final String STRING_DEFAULT_VALUE = "-1"; /** * 下拉列表默认被选中的选中项对应的Integer类型数值 */ public static final Integer INTEGER_DEFAULT_VALUE = -1; /** * -1转换成默认的null */ public static final String DEFAULT_NULL = null; }
[ "qiang.guo3@creditharmony.cn" ]
qiang.guo3@creditharmony.cn
7051626ade731d5cdf23022461d58ed8b3a1d339
4902adfb7a5b6347121b0ea8e46a87e32b453981
/app/src/main/java/com/weizhan/superlook/widget/banners/Transformer.java
249fe17d5f4f43bb9807c526cf74a8ce28ef0ec8
[]
no_license
cherry-cheng/PlayDemo
5098cd8f8062fc267e26858114bdf1440b9c62de
d3d1b55f8c96f7d2f4b9393fb261cd088b04920e
refs/heads/master
2020-04-06T09:58:49.223906
2018-11-19T10:51:25
2018-11-19T10:51:25
157,364,178
0
0
null
null
null
null
UTF-8
Java
false
false
3,064
java
package com.weizhan.superlook.widget.banners; import android.support.v4.view.ViewPager.PageTransformer; import com.weizhan.superlook.widget.banners.transformer.AccordionTransformer; import com.weizhan.superlook.widget.banners.transformer.BackgroundToForegroundTransformer; import com.weizhan.superlook.widget.banners.transformer.CubeInTransformer; import com.weizhan.superlook.widget.banners.transformer.CubeOutTransformer; import com.weizhan.superlook.widget.banners.transformer.DefaultTransformer; import com.weizhan.superlook.widget.banners.transformer.DepthPageTransformer; import com.weizhan.superlook.widget.banners.transformer.FlipHorizontalTransformer; import com.weizhan.superlook.widget.banners.transformer.FlipVerticalTransformer; import com.weizhan.superlook.widget.banners.transformer.ForegroundToBackgroundTransformer; import com.weizhan.superlook.widget.banners.transformer.RotateDownTransformer; import com.weizhan.superlook.widget.banners.transformer.RotateUpTransformer; import com.weizhan.superlook.widget.banners.transformer.ScaleInOutTransformer; import com.weizhan.superlook.widget.banners.transformer.StackTransformer; import com.weizhan.superlook.widget.banners.transformer.TabletTransformer; import com.weizhan.superlook.widget.banners.transformer.ZoomInTransformer; import com.weizhan.superlook.widget.banners.transformer.ZoomOutSlideTransformer; import com.weizhan.superlook.widget.banners.transformer.ZoomOutTranformer; public class Transformer { public static Class<? extends PageTransformer> Default = DefaultTransformer.class; public static Class<? extends PageTransformer> Accordion = AccordionTransformer.class; public static Class<? extends PageTransformer> BackgroundToForeground = BackgroundToForegroundTransformer.class; public static Class<? extends PageTransformer> ForegroundToBackground = ForegroundToBackgroundTransformer.class; public static Class<? extends PageTransformer> CubeIn = CubeInTransformer.class; public static Class<? extends PageTransformer> CubeOut = CubeOutTransformer.class; public static Class<? extends PageTransformer> DepthPage = DepthPageTransformer.class; public static Class<? extends PageTransformer> FlipHorizontal = FlipHorizontalTransformer.class; public static Class<? extends PageTransformer> FlipVertical = FlipVerticalTransformer.class; public static Class<? extends PageTransformer> RotateDown = RotateDownTransformer.class; public static Class<? extends PageTransformer> RotateUp = RotateUpTransformer.class; public static Class<? extends PageTransformer> ScaleInOut = ScaleInOutTransformer.class; public static Class<? extends PageTransformer> Stack = StackTransformer.class; public static Class<? extends PageTransformer> Tablet = TabletTransformer.class; public static Class<? extends PageTransformer> ZoomIn = ZoomInTransformer.class; public static Class<? extends PageTransformer> ZoomOut = ZoomOutTranformer.class; public static Class<? extends PageTransformer> ZoomOutSlide = ZoomOutSlideTransformer.class; }
[ "chengyonghui@yizhanit.com" ]
chengyonghui@yizhanit.com
eda3b842a7972f7348da6d88e470a26ee163387a
eb5af3e0f13a059749b179c988c4c2f5815feb0f
/eclipsecode/java_se/src/com/woniu/chapter12_Extends_workT_vhicle/Car.java
dc5feb980010d21c2337a0871efaeaaecc14cf55
[]
no_license
xiakai007/wokniuxcode
ae686753da5ec3dd607b0246ec45fb11cf6b8968
d9918fb349bc982f0ee9d3ea3bf7537e11d062a2
refs/heads/master
2023-04-13T02:54:15.675440
2021-05-02T05:09:47
2021-05-02T05:09:47
363,570,147
0
0
null
null
null
null
UTF-8
Java
false
false
488
java
package com.woniu.chapter12_Extends_workT_vhicle; public class Car extends MotoVehicle { private String type; public Car(String no,String brand,String type) { super(no,brand); this.type = type; } public String getType() { return type; } public void setType(String type) { this.type = type; } @Override public int calRent(int days) { if("1".equals(type)) { return days*500; }else if("2".equals(type)) { return days*600; }else { return days*300; } } }
[ "980385778@qq.com" ]
980385778@qq.com
219105134cf79ca6ed4b8f293a9d3769be1e2182
b2f07f3e27b2162b5ee6896814f96c59c2c17405
/java/security/spec/ECPoint.java
82ed7b317af6d0b02107b325f6b2935c3739f933
[]
no_license
weiju-xi/RT-JAR-CODE
e33d4ccd9306d9e63029ddb0c145e620921d2dbd
d5b2590518ffb83596a3aa3849249cf871ab6d4e
refs/heads/master
2021-09-08T02:36:06.675911
2018-03-06T05:27:49
2018-03-06T05:27:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,805
java
/* */ package java.security.spec; /* */ /* */ import java.math.BigInteger; /* */ /* */ public class ECPoint /* */ { /* */ private final BigInteger x; /* */ private final BigInteger y; /* 47 */ public static final ECPoint POINT_INFINITY = new ECPoint(); /* */ /* */ private ECPoint() /* */ { /* 51 */ this.x = null; /* 52 */ this.y = null; /* */ } /* */ /* */ public ECPoint(BigInteger paramBigInteger1, BigInteger paramBigInteger2) /* */ { /* 64 */ if ((paramBigInteger1 == null) || (paramBigInteger2 == null)) { /* 65 */ throw new NullPointerException("affine coordinate x or y is null"); /* */ } /* 67 */ this.x = paramBigInteger1; /* 68 */ this.y = paramBigInteger2; /* */ } /* */ /* */ public BigInteger getAffineX() /* */ { /* 77 */ return this.x; /* */ } /* */ /* */ public BigInteger getAffineY() /* */ { /* 86 */ return this.y; /* */ } /* */ /* */ public boolean equals(Object paramObject) /* */ { /* 97 */ if (this == paramObject) return true; /* 98 */ if (this == POINT_INFINITY) return false; /* 99 */ if ((paramObject instanceof ECPoint)) { /* 100 */ return (this.x.equals(((ECPoint)paramObject).x)) && (this.y.equals(((ECPoint)paramObject).y)); /* */ } /* */ /* 103 */ return false; /* */ } /* */ /* */ public int hashCode() /* */ { /* 111 */ if (this == POINT_INFINITY) return 0; /* 112 */ return this.x.hashCode() << 5 + this.y.hashCode(); /* */ } /* */ } /* Location: C:\Program Files\Java\jdk1.7.0_79\jre\lib\rt.jar * Qualified Name: java.security.spec.ECPoint * JD-Core Version: 0.6.2 */
[ "yuexiahandao@gmail.com" ]
yuexiahandao@gmail.com
1bb65e666b76b0c7844bcb8a8b8439c61d72db6b
b00c54389a95d81a22e361fa9f8bdf5a2edc93e3
/external/conscrypt/src/main/java/org/conscrypt/ClientSessionContext.java
d2e23c9a219dea7a0c0082756def851e087c5036
[]
no_license
mirek190/x86-android-5.0
9d1756fa7ff2f423887aa22694bd737eb634ef23
eb1029956682072bb7404192a80214189f0dc73b
refs/heads/master
2020-05-27T01:09:51.830208
2015-10-07T22:47:36
2015-10-07T22:47:36
41,942,802
15
20
null
2020-03-09T00:21:03
2015-09-05T00:11:19
null
UTF-8
Java
false
false
4,417
java
/* * Copyright (C) 2009 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 org.conscrypt; import java.util.HashMap; import java.util.Map; import javax.net.ssl.SSLSession; /** * Caches client sessions. Indexes by host and port. Users are typically * looking to reuse any session for a given host and port. */ public class ClientSessionContext extends AbstractSessionContext { /** * Sessions indexed by host and port. Protect from concurrent * access by holding a lock on sessionsByHostAndPort. */ final Map<HostAndPort, SSLSession> sessionsByHostAndPort = new HashMap<HostAndPort, SSLSession>(); private SSLClientSessionCache persistentCache; public ClientSessionContext() { super(10, 0); } public int size() { return sessionsByHostAndPort.size(); } public void setPersistentCache(SSLClientSessionCache persistentCache) { this.persistentCache = persistentCache; } @Override protected void sessionRemoved(SSLSession session) { String host = session.getPeerHost(); int port = session.getPeerPort(); if (host == null) { return; } HostAndPort hostAndPortKey = new HostAndPort(host, port); synchronized (sessionsByHostAndPort) { sessionsByHostAndPort.remove(hostAndPortKey); } } /** * Finds a cached session for the given host name and port. * * @param host of server * @param port of server * @return cached session or null if none found */ public SSLSession getSession(String host, int port) { if (host == null) { return null; } SSLSession session; HostAndPort hostAndPortKey = new HostAndPort(host, port); synchronized (sessionsByHostAndPort) { session = sessionsByHostAndPort.get(hostAndPortKey); } if (session != null && session.isValid()) { return session; } // Look in persistent cache. if (persistentCache != null) { byte[] data = persistentCache.getSessionData(host, port); if (data != null) { session = toSession(data, host, port); if (session != null && session.isValid()) { super.putSession(session); synchronized (sessionsByHostAndPort) { sessionsByHostAndPort.put(hostAndPortKey, session); } return session; } } } return null; } @Override public void putSession(SSLSession session) { super.putSession(session); String host = session.getPeerHost(); int port = session.getPeerPort(); if (host == null) { return; } HostAndPort hostAndPortKey = new HostAndPort(host, port); synchronized (sessionsByHostAndPort) { sessionsByHostAndPort.put(hostAndPortKey, session); } // TODO: This in a background thread. if (persistentCache != null) { byte[] data = toBytes(session); if (data != null) { persistentCache.putSessionData(session, data); } } } static class HostAndPort { final String host; final int port; HostAndPort(String host, int port) { this.host = host; this.port = port; } @Override public int hashCode() { return host.hashCode() * 31 + port; } @Override public boolean equals(Object o) { if (!(o instanceof HostAndPort)) { return false; } HostAndPort lhs = (HostAndPort) o; return host.equals(lhs.host) && port == lhs.port; } } }
[ "mirek190@gmail.com" ]
mirek190@gmail.com
4d31f9192da70fa4dcc63c18a3f3589ff656d2f1
ff6358a30f8068a5b30af5e119e26d3782cfeb62
/src/main/java/softuni/mobilelele/init/DataInit.java
423e3280d033d75e2f2a974f82367d227c951fbd
[]
no_license
yavor300/Mobilelele
ce919079f33ed456157f53f524b528b795c713d6
4d96813d396c8f3e3b360d2d91b5a976e38a413c
refs/heads/master
2023-03-06T14:06:04.346055
2021-02-13T16:38:07
2021-02-13T16:38:07
332,311,783
0
0
null
null
null
null
UTF-8
Java
false
false
3,257
java
package softuni.mobilelele.init; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Component; import softuni.mobilelele.domain.entities.Brand; import softuni.mobilelele.domain.entities.Model; import softuni.mobilelele.domain.entities.User; import softuni.mobilelele.domain.entities.enums.CategoryType; import softuni.mobilelele.repository.BrandRepository; import softuni.mobilelele.repository.ModelRepository; import softuni.mobilelele.repository.UserRepository; import java.time.LocalDateTime; @Component public class DataInit implements CommandLineRunner { private final BrandRepository brandRepository; private final ModelRepository modelRepository; private final PasswordEncoder passwordEncoder; private final UserRepository userRepository; @Autowired public DataInit(BrandRepository brandRepository, ModelRepository modelRepository, PasswordEncoder passwordEncoder, UserRepository userRepository) { this.brandRepository = brandRepository; this.modelRepository = modelRepository; this.passwordEncoder = passwordEncoder; this.userRepository = userRepository; } @Override public void run(String... args) throws Exception { if (brandRepository.count() == 0) { Brand tesla = new Brand(); tesla.setName("Tesla"); tesla.setCreated(LocalDateTime.now()); tesla.setModified(LocalDateTime.now()); brandRepository.saveAndFlush(tesla); Brand porsche = new Brand(); porsche.setName("Porsche"); porsche.setCreated(LocalDateTime.now()); porsche.setModified(LocalDateTime.now()); brandRepository.saveAndFlush(porsche); Model taycan = new Model(); taycan.setCategory(CategoryType.CAR); taycan.setCreated(LocalDateTime.now()); taycan.setEndYear(2021); taycan.setImageUrl("https://cdn.motor1.com/images/mgl/kJWEN/s1/2020-porsche-taycan.jpg"); taycan.setStartYear(2020); taycan.setModified(LocalDateTime.now()); taycan.setName("Taycan"); taycan.setBrand(porsche); modelRepository.saveAndFlush(taycan); Model modelX = new Model(); modelX.setCategory(CategoryType.CAR); modelX.setCreated(LocalDateTime.now()); modelX.setEndYear(2021); modelX.setImageUrl("https://www.tesla.com/sites/default/files/modelsx-new/social/model-x-social.jpg"); modelX.setStartYear(2017); modelX.setModified(LocalDateTime.now()); modelX.setName("Model X"); modelX.setBrand(tesla); modelRepository.saveAndFlush(modelX); } // if (userRepository.count() == 1) { // User admin = new User(); // admin.setFirstName("Peter"); // admin.setLastName("Dimitrov"); // admin.setUsername("admin"); // admin.setPassword(passwordEncoder.encode("topsecret")); // userRepository.saveAndFlush(admin); // } } }
[ "yavor300@gmail.com" ]
yavor300@gmail.com
70545ee5eefa849829294bd69836538d704d8832
e64c2201c1cf2adf9197c77aab2676670de9bf4c
/src/main/java/com/zxb/Concurrency/Executors/RejectedExecutionHandlerImpl.java
413b0049e7647c4617f35d8d9974ab849b24e416
[]
no_license
zengxianbing/JavaStudy
45016f3910606988403f16bd1b5f0e60d52de7b2
9a4593cf4b6f79ada4677bdd87a045ff04ee721a
refs/heads/master
2020-04-06T04:29:17.203382
2016-07-04T01:11:47
2016-07-04T01:11:47
62,491,476
0
0
null
null
null
null
UTF-8
Java
false
false
565
java
package com.zxb.Concurrency.Executors; import java.util.concurrent.RejectedExecutionHandler; import java.util.concurrent.ThreadPoolExecutor; /** * Title: <br> * <p> * Description: <br> * <p> * Created by zengxianbing on 2016/4/19. * * @author <a href=mailto:zengxianbing163@163.com>曾宪兵</a> */ public class RejectedExecutionHandlerImpl implements RejectedExecutionHandler { @Override public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) { System.out.println(r.toString()+" is rejected"); } }
[ "1121466030@qq.com" ]
1121466030@qq.com
fa8944d5a3cf4aa964e9160af77b89cfaaa69d79
ef5295e64ceea1d2b231501c7b542032a0450b8d
/src/main/java/aula20201112/modeloOOMercadoPersistente/produto/ProdutoRepository.java
9cfc24a8512a77d5a459ce15fb0b27ed51ec0898
[]
no_license
beatrizferraz/esoft4s2020
43422677cab5387658827cad812cf97926a789c1
494a12eff266ce5c539e19d33f00edbd1b7f2d61
refs/heads/master
2023-01-23T06:11:37.886021
2020-12-04T06:53:23
2020-12-04T06:53:23
286,868,982
0
0
null
2020-11-18T00:36:23
2020-08-11T23:26:39
Java
UTF-8
Java
false
false
203
java
package aula20201112.modeloOOMercadoPersistente.produto; import org.springframework.data.jpa.repository.JpaRepository; public interface ProdutoRepository extends JpaRepository<Produto, String>{ }
[ "aczavads@gmail.com" ]
aczavads@gmail.com
cf84dfde73b9bf85129281168c83d334f161a751
62257eb8aca473ec5d0b2a0bfe22f12e00e5c5a8
/Exam-6-final-jdbc-uml/UML..UML/AbdullahEvedence/Inventory/src/inventory/Main.java
58513f8f1ebd1321aaeca908d47ff807cb3847b5
[]
no_license
springapidev/uml
e29bacdbf67748adfa5eadba2cabbaebca4e369a
6f59f1c34dd35428f032faa006b9733138960c0a
refs/heads/master
2021-10-01T00:09:13.491179
2018-11-26T06:50:51
2018-11-26T06:50:51
112,941,252
0
1
null
null
null
null
UTF-8
Java
false
false
299
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package inventory; /** * * @author Administrator */ public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { } }
[ "springapidev@gmail.com" ]
springapidev@gmail.com
11bd1101a320ad275a3613f4d49988c6c70f07bc
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_3b6597eb4e921fc94856206f0ed786702f02fc25/StackingET/5_3b6597eb4e921fc94856206f0ed786702f02fc25_StackingET_s.java
2d1f35222609764df669b47048f78e2ffab2862f
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,792
java
package techniques; import java.util.List; import org.encog.ensemble.EnsembleAggregator; import org.encog.ensemble.EnsembleMLMethodFactory; import org.encog.ensemble.EnsembleTrainFactory; import org.encog.ensemble.bagging.Bagging; import org.encog.ensemble.stacking.Stacking; import org.encog.ml.data.MLData; import helpers.DataLoader; import helpers.ChainParams; public class StackingET extends EvaluationTechnique { private int dataSetSize; public StackingET(List<Integer> sizes, int dataSetSize, ChainParams fullLabel, EnsembleMLMethodFactory mlMethod, EnsembleTrainFactory trainFactory, EnsembleAggregator aggregator) { this.sizes = sizes; this.dataSetSize = dataSetSize; this.label = fullLabel; this.mlMethod = mlMethod; this.trainFactory = trainFactory; this.aggregator = aggregator; } @Override public void init(DataLoader dataLoader, int fold) { ensemble = new Stacking(sizes.get(currentSizeIndex),dataSetSize,mlMethod,trainFactory,aggregator); setTrainingSet(dataLoader.getTrainingSet(fold)); setSelectionSet(dataLoader.getTestSet(fold)); ensemble.setTrainingData(trainingSet); } @Override public void trainStep() { ((Bagging) ensemble).trainStep(); } @Override public MLData compute(MLData input) { return ensemble.compute(input); } @Override public void step(boolean verbose) { if (currentSizeIndex < sizes.size() -1) { for (int i = sizes.get(currentSizeIndex++); i < sizes.get(currentSizeIndex); i++) { ensemble.addNewMember(); ensemble.trainMember(i, trainToError, selectionError, selectionSet, verbose); } ensemble.getAggregator().train(); } else { this.hasStepsLeft = false; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
d922ce5b2f8afba5f8e92e21657461e93b901ca9
8823c96d433605e7c13679b027a697e6a647cf9c
/src/main/java/com/lzhlyle/leetcode/week/no76/MinimumWindowSubstring_TwoPoints.java
5868ca8075afd8098c817f8a4c375652253d3bfb
[ "MIT" ]
permissive
lzhlyle/leetcode
62278bf6e949f802da335e8de2d420440f578c2f
8f053128ed7917c231fd24cfe82552d9c599dc16
refs/heads/master
2022-07-14T02:28:11.082595
2020-11-16T14:28:20
2020-11-16T14:28:20
215,598,819
2
0
MIT
2022-06-17T02:55:41
2019-10-16T16:52:05
Java
UTF-8
Java
false
false
1,289
java
package com.lzhlyle.leetcode.week.no76; public class MinimumWindowSubstring_TwoPoints { // two points // O(n+m) public String minWindow(String s, String t) { char[] sarr = s.toCharArray(), tarr = t.toCharArray(); int slen = sarr.length, tlen = tarr.length; int[] need = new int[256], hire = new int[256]; for (char c : tarr) need[c] = ++hire[c]; int expected = tlen; int l = 0, r = l, len = 0, minL = l, minLen = slen + 1; // minLen: unreachable value while (l < slen - tlen + 1 && r < slen) { if (len < r - l + 1) { int hiring = sarr[r]; if (need[hiring] > 0 && hire[hiring] > 0) expected--; hire[hiring]--; } else { int leaving = sarr[l - 1]; hire[leaving]++; if (need[leaving] > 0 && hire[leaving] > 0) expected++; } len = r - l + 1; if (expected > 0) r++; else { if (len < minLen) { minLen = len; minL = l; } l++; } } return minLen == slen + 1 ? "" : new String(sarr, minL, minLen); } }
[ "lzhlyle@msn.cn" ]
lzhlyle@msn.cn
18e595c339601c91f68d10ec0876e0f721c04fb2
e21d3ae8e47b113a7c27524afd4525cc23130b71
/IWXXM-JAVA/aero/aixm/VORTimeSlicePropertyType.java
ebfcbf67664d2364ac66316e31c2613ead4bc5eb
[]
no_license
blchoy/iwxxm-java
dad020c19a9edb61ab3bc6b04def5579f6cbedca
7c1b6fb1d0b0e9935a10b8e870b159c86a4ef1bb
refs/heads/master
2023-05-25T12:14:10.205518
2023-05-22T08:40:56
2023-05-22T08:40:56
97,662,463
2
1
null
2021-11-17T03:40:50
2017-07-19T02:09:41
Java
UTF-8
Java
false
false
2,629
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0-SNAPSHOT // See <a href="https://jaxb.java.net/">https://jaxb.java.net/</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2023.05.22 at 02:50:00 PM HKT // package aero.aixm; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for VORTimeSlicePropertyType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="VORTimeSlicePropertyType"&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element ref="{http://www.aixm.aero/schema/5.1.1}VORTimeSlice"/&gt; * &lt;/sequence&gt; * &lt;attGroup ref="{http://www.opengis.net/gml/3.2}OwnershipAttributeGroup"/&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "VORTimeSlicePropertyType", propOrder = { "vorTimeSlice" }) public class VORTimeSlicePropertyType { @XmlElement(name = "VORTimeSlice", required = true) protected VORTimeSliceType vorTimeSlice; @XmlAttribute(name = "owns") protected Boolean owns; /** * Gets the value of the vorTimeSlice property. * * @return * possible object is * {@link VORTimeSliceType } * */ public VORTimeSliceType getVORTimeSlice() { return vorTimeSlice; } /** * Sets the value of the vorTimeSlice property. * * @param value * allowed object is * {@link VORTimeSliceType } * */ public void setVORTimeSlice(VORTimeSliceType value) { this.vorTimeSlice = value; } /** * Gets the value of the owns property. * * @return * possible object is * {@link Boolean } * */ public boolean isOwns() { if (owns == null) { return false; } else { return owns; } } /** * Sets the value of the owns property. * * @param value * allowed object is * {@link Boolean } * */ public void setOwns(Boolean value) { this.owns = value; } }
[ "blchoy.hko@gmail.com" ]
blchoy.hko@gmail.com
cf2dc87e216aaa5ff0e4a7dc206bc3a51a2eac71
8c2150d1fe5ca118bc65b618a421ac53d77e8962
/SWB4/swb/SWBPortlet-shared/src/org/semanticwb/portal/portlet/WBPortletContainer.java
51318161834dc13ed321cf5da8860c5e8bc90fe7
[]
no_license
haxdai/SemanticWebBuilder
b3d7b7d872e014a52bf493f613d145eb1e87b2e6
dad201959b3429adaf46caa2990cc5ca6bd448e7
refs/heads/master
2021-01-20T10:49:55.948762
2017-01-26T18:01:17
2017-01-26T18:01:17
62,407,043
0
0
null
null
null
null
UTF-8
Java
false
false
3,619
java
/* * SemanticWebBuilder es una plataforma para el desarrollo de portales y aplicaciones de integración, * colaboración y conocimiento, que gracias al uso de tecnología semántica puede generar contextos de * información alrededor de algún tema de interés o bien integrar información y aplicaciones de diferentes * fuentes, donde a la información se le asigna un significado, de forma que pueda ser interpretada y * procesada por personas y/o sistemas, es una creación original del Fondo de Información y Documentación * para la Industria INFOTEC, cuyo registro se encuentra actualmente en trámite. * * INFOTEC pone a su disposición la herramienta SemanticWebBuilder a través de su licenciamiento abierto al público (‘open source’), * en virtud del cual, usted podrá usarlo en las mismas condiciones con que INFOTEC lo ha diseñado y puesto a su disposición; * aprender de él; distribuirlo a terceros; acceder a su código fuente y modificarlo, y combinarlo o enlazarlo con otro software, * todo ello de conformidad con los términos y condiciones de la LICENCIA ABIERTA AL PÚBLICO que otorga INFOTEC para la utilización * del SemanticWebBuilder 4.0. * * INFOTEC no otorga garantía sobre SemanticWebBuilder, de ninguna especie y naturaleza, ni implícita ni explícita, * siendo usted completamente responsable de la utilización que le dé y asumiendo la totalidad de los riesgos que puedan derivar * de la misma. * * Si usted tiene cualquier duda o comentario sobre SemanticWebBuilder, INFOTEC pone a su disposición la siguiente * dirección electrónica: * http://www.semanticwebbuilder.org */ package org.semanticwb.portal.portlet; import java.io.IOException; import java.io.PrintWriter; import javax.portlet.Portlet; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.semanticwb.portal.api.SWBActionResponse; import org.semanticwb.portal.api.SWBParamRequest; /** * * @author Javier Solis Gonzalez */ public interface WBPortletContainer { final static String ATT_PORTLET_DEFINITION = "com.infotec.wb.portlet.PortletDefinition"; final static String ATT_PORTLET = "com.infotec.wb.portlet.Portlet"; final static String ATT_METHOD = "com.infotec.wb.portlet.Method"; final static String ATT_PORTLET_REQUEST = "javax.portlet.request"; final static String ATT_PORTLET_RESPONSE = "javax.portlet.response"; final static String ATT_PORTLET_CONFIG = "javax.portlet.config"; final static Integer VAL_METHOD_RENDER = new Integer(0); final static Integer VAL_METHOD_ACTION = new Integer(1); final static Integer VAL_METHOD_LOAD = new Integer(2); final static Integer VAL_METHOD_INIT = new Integer(3); public Portlet loadPortlet(WBPortletDefinition def, HttpServletRequest request); public WBPortletDefinition getPortletDefinition(String site, String id); public void removePortletDefinition(String site, String id); public void addPortletDefinition(WBPortletDefinition def); public void log(Throwable e); public void log(String msg); public void log(String msg, Throwable e); public void invoke_render(HttpServletRequest request, HttpServletResponse response, SWBParamRequest params, WBPortletDefinition def) throws ServletException, IOException; public void invoke_action(HttpServletRequest request, SWBActionResponse params, WBPortletDefinition def) throws ServletException, IOException; }
[ "softjei@gmail.com" ]
softjei@gmail.com
e3f61d3e38385b6bb5ae6eb590cfc9bd1d88de5f
548a1b731709a376e079e1f0417cc401cce70aaf
/src/main/java/debug/Company.java
654c38ae611e6645393f099f8debce74e67090d5
[]
no_license
egydGIT/javaBackend
0e96c6b2bab639ccdb4631b481b69a2205d3963c
be22a7148e10fb6da019a74e916dcd353fb53e70
refs/heads/master
2023-06-25T00:41:32.443210
2021-07-11T12:33:10
2021-07-11T12:33:10
309,369,092
0
0
null
null
null
null
UTF-8
Java
false
false
2,315
java
package debug; import java.util.ArrayList; import java.util.List; public class Company { // Employee employee = new Employee(); private List<Employee> employees; // employees nevű lista deklaráció public Company(List<Employee> employees) { // Konstruktor, paraméterben kapott listát this.employees = employees; // értékül adja a fent deklarált listának } public void addEmployee(Employee employee) { // addE metódus, ami a param-ben átadott nevet employees.add(employee); // add met-sal hozzáadja a listához } public Employee findEmployeeByName(String name) { // Metódus, ami adott nevet keres a listában for (Employee employee : employees) { // For-each ciklus, deklarál egy Emloyee tipusú változót, // ami végigiterál a lista minden elemén if (employee.getName().equals(name)) { // For-e c változójára meghívom getName met-t Visszaad: nevet // majd ezt a nevet összehasonlítom az equals met-sal // a findEBN met paraméterében megadott névvel. return employee; // Visszatér a f-e c változója. Visszat.érték: true, false } } return null; // ?? } public List<String> listEmployeeNames() { // Metódus, ami kiírja a listában lévő neveket List<String> names = new ArrayList<>(); // 2. lista deklaráció, amibe elmentem az első lista neveit for (Employee employee : employees) { // for-e ciklus, ami végig lépked az emloyye listán names.add(employee.getName()); // 2. listához add metódussal hozzáadom // employee vált. getName met-sal lekért aktuális értékét } return names; // miután lezajlott a f-e ciklus, téjen vissza a 2. listával } }
[ "egyd.eszter@gmail.com" ]
egyd.eszter@gmail.com
011dbeb599dd9a6abee87fd6b0069df38a5273d1
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/finder/live/plugin/bz$p.java
551d95538ea8c8652130bba949699e1a8b92f71f
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
904
java
package com.tencent.mm.plugin.finder.live.plugin; import com.tencent.mm.protocal.protobuf.bkd; import com.tencent.mm.ui.base.w; import kotlin.Metadata; import kotlin.ah; import kotlin.g.a.q; import kotlin.g.b.ah.f; import kotlin.g.b.u; import kotlinx.coroutines.cb; @Metadata(d1={""}, d2={"<anonymous>", "", "success", "", "errMsg", "", "<anonymous parameter 2>", "Lcom/tencent/mm/protocal/protobuf/FinderLiveModShopShelfResponse;"}, k=3, mv={1, 5, 1}, xi=48) final class bz$p extends u implements q<Boolean, String, bkd, ah> { bz$p(cb paramcb, ah.f<w> paramf, q<? super Boolean, ? super Integer, ? super Integer, ah> paramq, int paramInt1, int paramInt2) { super(3); } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes2.jar * Qualified Name: com.tencent.mm.plugin.finder.live.plugin.bz.p * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
162d27ab0e6cb4ed2ed1f9b1300e35c182677fc1
fe8f78d10e26fa7db781e76eb6f418853ae00e5d
/smallrye-reactive-messaging-vertx-eventbus/src/test/java/io/smallrye/reactive/messaging/eventbus/EventbusTestBase.java
9757f53a1ac105369c8b5f13ee0224e172f42cde
[ "Apache-2.0" ]
permissive
matzew/smallrye-reactive-messaging
8a4f9d1e64d50e7070986d2504399f0109cfe2da
993e322e5f43e3474b356b20d9397b2710c26277
refs/heads/master
2020-04-11T21:12:59.225985
2018-12-14T11:03:05
2018-12-14T11:03:05
162,098,656
0
0
Apache-2.0
2018-12-17T08:30:18
2018-12-17T08:30:17
null
UTF-8
Java
false
false
412
java
package io.smallrye.reactive.messaging.eventbus; import io.vertx.reactivex.core.Vertx; import org.junit.After; import org.junit.Before; public class EventbusTestBase { Vertx vertx; protected EventBusUsage usage; @Before public void setup() { vertx = Vertx.vertx(); usage = new EventBusUsage(vertx.eventBus().getDelegate()); } @After public void tearDown() { vertx.close(); } }
[ "clement.escoffier@gmail.com" ]
clement.escoffier@gmail.com
79ff019a70da67f625ec029e11f9ca6ae0f719f3
a3eacf1d95a204850e6a2913a4d2e01786bb4c35
/src/main/java/com/github/vaerys/pogos/Events.java
95e921f9f0835e88eb1a504aceebfc5e998b416a
[]
no_license
AndrielChaoti/DiscordSailv2
53e3a78492555958d0f6244b1dbaabbdbd352008
4a73090611909c86767a055675f6deb5a60d41f0
refs/heads/master
2021-01-19T20:44:11.139088
2018-03-18T04:50:13
2018-03-18T04:50:13
101,136,774
0
0
null
2017-08-23T04:12:49
2017-08-23T04:12:49
null
UTF-8
Java
false
false
439
java
package com.github.vaerys.pogos; import com.github.vaerys.objects.TimedEvent; import com.github.vaerys.templates.GlobalFile; import java.util.ArrayList; import java.util.List; public class Events extends GlobalFile { public static final String FILE_PATH = "Events.json"; List<TimedEvent> events = new ArrayList<>(); private double fileVersion = 1.0; public List<TimedEvent> getEvents() { return events; } }
[ "thelegotechhead@yahoo.com.au" ]
thelegotechhead@yahoo.com.au
498396835d319faf943813cd668f4e73cf9c71e7
fa55027e10c36977b4a50946d663e15f8fe0faf7
/src/org/wshuai/leetcode/AmbiguousCoordinates.java
f332da30aff8c65a77b98ad989dcfa37cb0c6f88
[]
no_license
relentlesscoder/Leetcode
773a207c15ea72f6027eade8565377f11a856672
6b3ecd82d01739f6adb1caf86a770fcff0d6a54b
refs/heads/master
2021-07-05T13:35:37.312910
2020-06-21T12:48:54
2020-06-21T12:48:54
40,448,524
0
0
null
null
null
null
UTF-8
Java
false
false
1,407
java
package org.wshuai.leetcode; import java.util.ArrayList; import java.util.List; /** * Created by Wei on 11/11/2019. * #0816 https://leetcode.com/problems/ambiguous-coordinates/ */ public class AmbiguousCoordinates { // time O(n^3), space O(n^2) public List<String> ambiguousCoordinates(String S) { S = S.substring(1, S.length() - 1); List<String> res = new ArrayList<>(); for(int i = 1; i < S.length(); i++){ String s1 = S.substring(0, i), s2 = S.substring(i); List<String> l1 = parse(s1), l2 = parse(s2); if(l1.size() > 0 && l2.size() > 0){ for(String v1 : l1){ for(String v2 : l2){ res.add("(" + v1 + ", " + v2 + ")"); } } } } return res; } private List<String> parse(String s){ int n = s.length(); List<String> result = new ArrayList<>(); // "0xxxx0" invalid unless a single "0" if (s.charAt(0) == '0' && s.charAt(n - 1) == '0') { if (n == 1) { result.add("0"); } return result; } // "0xxxxx" the only valid result is "0.xxxxx" if (s.charAt(0) == '0') { result.add("0." + s.substring(1)); return result; } // "xxxxx0" the only valid result is itself if (s.charAt(n - 1) == '0') { result.add(s); return result; } // add itself result.add(s); // "xxxx" -> "x.xxx", "xx.xx", "xxx.x" for (int i = 1; i < n; i++) { result.add(s.substring(0, i) + '.' + s.substring(i)); } return result; } }
[ "relentless.code@gmail.com" ]
relentless.code@gmail.com
4fef3f090588effd2c0ada4dd534d7e3c25a0d02
f35f4008d60bf04e6e3236a60514693cae296d42
/app/src/main/java/com/google/android/gms/fitness/request/z.java
82f1997113d081c6e13441f11448ec04c24e2874
[]
no_license
alsmwsk/golfmon
ef0c8e8c7ecaa13371deed40f7e20468b823b0e9
740132d47185bfe9ec9d6774efbde5404ea8cf6d
refs/heads/master
2020-03-22T11:16:01.438894
2018-07-06T09:47:10
2018-07-06T09:47:10
139,959,669
0
0
null
null
null
null
UTF-8
Java
false
false
1,665
java
package com.google.android.gms.fitness.request; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.a; import com.google.android.gms.common.internal.safeparcel.a.a; import com.google.android.gms.common.internal.safeparcel.b; public class z implements Parcelable.Creator<y> { static void a(y paramy, Parcel paramParcel, int paramInt) { int i = b.H(paramParcel); b.a(paramParcel, 1, paramy.getName(), false); b.c(paramParcel, 1000, paramy.getVersionCode()); b.a(paramParcel, 2, paramy.getIdentifier(), false); b.H(paramParcel, i); } public y bW(Parcel paramParcel) { String str1 = null; int i = a.G(paramParcel); int j = 0; String str2 = null; while (paramParcel.dataPosition() < i) { int k = a.F(paramParcel); switch (a.aH(k)) { default: a.b(paramParcel, k); break; case 1: str2 = a.o(paramParcel, k); break; case 1000: j = a.g(paramParcel, k); break; case 2: str1 = a.o(paramParcel, k); } } if (paramParcel.dataPosition() != i) { throw new a.a("Overread allowed size end=" + i, paramParcel); } return new y(j, str2, str1); } public y[] dr(int paramInt) { return new y[paramInt]; } } /* Location: C:\Users\TGKIM\Downloads\작업폴더\리버싱\androidReversetools\jd-gui-0.3.6.windows\com.appg.golfmon-1-dex2jar.jar * Qualified Name: com.google.android.gms.fitness.request.z * JD-Core Version: 0.7.0.1 */
[ "alsmwsk@naver.com" ]
alsmwsk@naver.com
674161e26c7010ca234f15ebe8583f29752bc2ea
589dcd422402477ce80e9c349bd483c2d36b80cd
/trunk/adhoc-solr/src/main/java/org/apache/lucene/util/cache/Cache.java
5261a53178b878fefaeb76c47cc879d561842e7f
[ "Apache-2.0", "LicenseRef-scancode-unicode-mappings", "BSD-3-Clause", "CDDL-1.0", "Python-2.0", "MIT", "ICU", "CPL-1.0" ]
permissive
baojiawei1230/mdrill
e3d92f4f1f85b34f0839f8463e7e5353145a9c78
edacdb4dc43ead6f14d83554c1f402aa1ffdec6a
refs/heads/master
2021-06-10T17:42:11.076927
2021-03-15T16:43:06
2021-03-15T16:43:06
95,193,877
0
0
Apache-2.0
2021-03-15T16:43:06
2017-06-23T07:15:00
Java
UTF-8
Java
false
false
3,323
java
package org.apache.lucene.util.cache; /** * 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. */ import java.io.Closeable; /** * Base class for cache implementations. */ public abstract class Cache<K,V> implements Closeable { /** * Simple Cache wrapper that synchronizes all * calls that access the cache. */ static class SynchronizedCache<K,V> extends Cache<K,V> { private Object mutex; private Cache<K,V> cache; SynchronizedCache(Cache<K,V> cache) { this.cache = cache; this.mutex = this; } SynchronizedCache(Cache<K,V> cache, Object mutex) { this.cache = cache; this.mutex = mutex; } @Override public void put(K key, V value) { synchronized(mutex) {cache.put(key, value);} } @Override public V get(Object key) { synchronized(mutex) {return cache.get(key);} } @Override public boolean containsKey(Object key) { synchronized(mutex) {return cache.containsKey(key);} } @Override public void close() { synchronized(mutex) {cache.close();} } @Override Cache<K,V> getSynchronizedCache() { return this; } @Override public V remove(Object key) { synchronized(mutex) {return cache.remove(key);} } @Override public int size() { synchronized(mutex) {return cache.size();} } } /** * Returns a thread-safe cache backed by the specified cache. * In order to guarantee thread-safety, all access to the backed cache must * be accomplished through the returned cache. */ public static <K,V> Cache<K,V> synchronizedCache(Cache<K,V> cache) { return cache.getSynchronizedCache(); } /** * Called by {@link #synchronizedCache(Cache)}. This method * returns a {@link SynchronizedCache} instance that wraps * this instance by default and can be overridden to return * e. g. subclasses of {@link SynchronizedCache} or this * in case this cache is already synchronized. */ Cache<K,V> getSynchronizedCache() { return new SynchronizedCache<K,V>(this); } /** * Puts a (key, value)-pair into the cache. */ public abstract void put(K key, V value); public abstract int size(); /** * Returns the value for the given key. */ public abstract V get(Object key); public abstract V remove(Object key); /** * Returns whether the given key is in this cache. */ public abstract boolean containsKey(Object key); /** * Closes the cache. */ public abstract void close(); }
[ "myn@163.com" ]
myn@163.com
d541dc021c640ab948e0a61bef89522954505816
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/commonsguy--cw-omnibus/517cd987692133bae30ed58fb60a43998ccd4f2f/before/StringConcatActivity.java
ecba08bce6ec7c10e564537e02cf6f3a0ef913f2
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
1,245
java
/*** Copyright (c) 2011 CommonsWare, LLC 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. From _Tuning Android Applications_ https://commonsware.com/AndTuning */ package com.commonsware.android.traceview; import android.view.View; import android.widget.TextView; public class StringConcatActivity extends BaseActivity { StringConcatTask createTask(TextView msg, View v) { return(new StringConcatTask(msg, v)); } class StringConcatTask extends BaseTask { StringConcatTask(TextView msg, View v) { super(msg, v); } protected String doTest() { String result="This is a string"; result+=" -- that varies --"; result+=" and also has "; result+=String.valueOf(4); result+=" hyphens in it"; return(result); } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
76a1b74454a3934a6110f434622258c8d6daa278
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_3/src/g/a/h/Calc_1_3_6078.java
8fb0dc1690a7ad5eece42bd3bee25e74f8f44435
[]
no_license
chalstrick/bigRepo1
ac7fd5785d475b3c38f1328e370ba9a85a751cff
dad1852eef66fcec200df10083959c674fdcc55d
refs/heads/master
2016-08-11T17:59:16.079541
2015-12-18T14:26:49
2015-12-18T14:26:49
48,244,030
0
0
null
null
null
null
UTF-8
Java
false
false
131
java
package g.a.h; public class Calc_1_3_6078 { /** @return the sum of a and b */ public int add(int a, int b) { return a+b; } }
[ "christian.halstrick@sap.com" ]
christian.halstrick@sap.com
66c232a66bb7b87150aa1bed9dab972be58cc8ac
68465e463a662b9ccd12525c02326aa359e912b6
/huboot-business-server/src/main/java/com/huboot/business/base_model/login/sso/client/exception/SsoException.java
b333e05d13969682c10309bc0ee89158ca236e67
[]
no_license
qiangli524/myproject
d868e94daca660275eaac456e2117075cd901d41
56a605367606f7d7259e49a74454d8cbcdef45ce
refs/heads/master
2020-07-02T03:45:13.010861
2019-03-25T02:04:43
2019-03-25T02:04:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,254
java
package com.huboot.business.base_model.login.sso.client.exception; public class SsoException extends RuntimeException{ private static final long serialVersionUID = -1827198664611457387L; private String code = "403"; private String msg; public SsoException() { super(); } public SsoException(String message, Throwable cause,boolean enableSuppression, boolean writableStackTrace) { super(message, cause, enableSuppression, writableStackTrace); } public SsoException(String errorCode, String message, Throwable cause,boolean enableSuppression, boolean writableStackTrace) { super(message, cause, enableSuppression, writableStackTrace); this.code = errorCode; } public SsoException(String message, Throwable cause) { super(message, cause); } public SsoException(String message) { super(message); } public SsoException(String errorCode, String message) { super(message); this.code = errorCode; } public SsoException(Throwable cause) { super(cause); } public String getErrorCode() { return code; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } }
[ "437954760@qq.com" ]
437954760@qq.com
c8ae33d37f724918680f86a92f033c6938167ff9
814169b683b88f1b7498f1edf530a8d1bec2971f
/mall-product/src/main/java/com/bootx/mall/product/controller/admin/plugin/PaypalPaymentController.java
8eb8c655c0315b5043bc6b40be994c6872211206
[]
no_license
springwindyike/mall-auth
fe7f216c7241d8fd9247344e40503f7bc79fe494
3995d258955ecc3efbccbb22ef4204d148ec3206
refs/heads/master
2022-10-20T15:12:19.329363
2020-07-05T13:04:29
2020-07-05T13:04:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,320
java
package com.bootx.mall.product.controller.admin.plugin; import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import javax.inject.Inject; import com.bootx.mall.product.common.Results; import com.bootx.mall.product.controller.admin.BaseController; import com.bootx.mall.product.entity.PluginConfig; import com.bootx.mall.product.plugin.PaymentPlugin; import com.bootx.mall.product.plugin.PaypalPaymentPlugin; import com.bootx.mall.product.service.PluginConfigService; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; /** * Controller - Paypal * * @author BOOTX Team * @version 6.1 */ @Controller("adminPluginPaypalPaymentController") @RequestMapping("/admin/plugin/paypal_payment") public class PaypalPaymentController extends BaseController { @Inject private PaypalPaymentPlugin paypalPaymentPlugin; @Inject private PluginConfigService pluginConfigService; /** * 安装 */ @PostMapping("/install") public ResponseEntity<?> install() { if (!paypalPaymentPlugin.getIsInstalled()) { PluginConfig pluginConfig = new PluginConfig(); pluginConfig.setPluginId(paypalPaymentPlugin.getId()); pluginConfig.setIsEnabled(false); pluginConfig.setAttributes(null); pluginConfigService.save(pluginConfig); } return Results.OK; } /** * 卸载 */ @PostMapping("/uninstall") public ResponseEntity<?> uninstall() { if (paypalPaymentPlugin.getIsInstalled()) { pluginConfigService.deleteByPluginId(paypalPaymentPlugin.getId()); } return Results.OK; } /** * 设置 */ @GetMapping("/setting") public String setting(ModelMap model) { PluginConfig pluginConfig = paypalPaymentPlugin.getPluginConfig(); model.addAttribute("currencies", PaypalPaymentPlugin.Currency.values()); model.addAttribute("feeTypes", PaymentPlugin.FeeType.values()); model.addAttribute("pluginConfig", pluginConfig); return "/admin/plugin/paypal_payment/setting"; } /** * 更新 */ @PostMapping("/update") public ResponseEntity<?> update(String displayName, String partner, PaypalPaymentPlugin.Currency currency, PaymentPlugin.FeeType feeType, BigDecimal fee, String logo, String description, @RequestParam(defaultValue = "false") Boolean isEnabled, Integer order) { PluginConfig pluginConfig = paypalPaymentPlugin.getPluginConfig(); Map<String, String> attributes = new HashMap<>(); attributes.put(PaymentPlugin.DISPLAY_NAME_ATTRIBUTE_NAME, displayName); attributes.put("partner", partner); attributes.put("currency", String.valueOf(currency)); attributes.put(PaymentPlugin.FEE_TYPE_ATTRIBUTE_NAME, String.valueOf(feeType)); attributes.put(PaymentPlugin.FEE_ATTRIBUTE_NAME, String.valueOf(fee)); attributes.put(PaymentPlugin.LOGO_ATTRIBUTE_NAME, logo); attributes.put(PaymentPlugin.DESCRIPTION_ATTRIBUTE_NAME, description); pluginConfig.setAttributes(attributes); pluginConfig.setIsEnabled(isEnabled); pluginConfig.setOrder(order); pluginConfigService.update(pluginConfig); return Results.OK; } }
[ "a12345678" ]
a12345678
b476132f743547edc4040a92d6c4d1f77e0446a3
bb9140f335d6dc44be5b7b848c4fe808b9189ba4
/Extra-DS/Corpus/class/aspectj/1466.java
0b60f7abf3acd6db1cf5f3cd8483ea7f4d198d48
[]
no_license
masud-technope/EMSE-2019-Replication-Package
4fc04b7cf1068093f1ccf064f9547634e6357893
202188873a350be51c4cdf3f43511caaeb778b1e
refs/heads/master
2023-01-12T21:32:46.279915
2022-12-30T03:22:15
2022-12-30T03:22:15
186,221,579
5
3
null
null
null
null
UTF-8
Java
false
false
1,089
java
/* ******************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * * Contributors: * Adrian Colyer Initial implementation * ******************************************************************/ package org.aspectj.weaver.reflect; import org.aspectj.weaver.tools.PointcutParameter; public class PointcutParameterImpl implements PointcutParameter { String name; Class type; Object binding; public PointcutParameterImpl(String name, Class type) { this.name = name; this.type = type; } public String getName() { return name; } public Class getType() { return type; } public Object getBinding() { return binding; } void setBinding(Object boundValue) { this.binding = boundValue; } }
[ "masudcseku@gmail.com" ]
masudcseku@gmail.com
60db935469efde31efe645205f7d0f44d8ea4f8e
0f232fc4da65ae4ca6f794d023637890758c56bf
/yeb-server/src/main/java/com/maple/server/pojo/PoliticsStatus.java
caab9c531b68962be0e3cb75a3c715b5614e8ed7
[]
no_license
ashilye/yeb
e53ab96d5ef9065457300485d1a17186f4f7cf7a
3a88baa1c50eff048d3a3711782ed6d013933172
refs/heads/master
2023-03-17T10:58:37.208446
2021-03-08T09:32:03
2021-03-08T09:32:03
340,890,222
0
0
null
null
null
null
UTF-8
Java
false
false
857
java
package com.maple.server.pojo; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import java.io.Serializable; /** * <p> * * </p> * * @author gaoguanqi * @since 2021-02-23 */ @Data @EqualsAndHashCode(callSuper = false) @TableName("t_politics_status") @ApiModel(value="PoliticsStatus对象", description="") public class PoliticsStatus implements Serializable { private static final long serialVersionUID = 1L; @ApiModelProperty(value = "id") @TableId(value = "id", type = IdType.AUTO) private Integer id; @ApiModelProperty(value = "政治面貌") private String name; }
[ "307590625@qq.com" ]
307590625@qq.com
e097c2cb39a0b1f28d3c2e03a7607df859747ec3
ad0300c29aa79d6b25e430efd128344f1c283369
/clojure/core_sorted_map.java
0892362ab10d84082fbb8c5540dfe5d184ec6db9
[]
no_license
galdolber/clojure-core-java
d7cedc6e68d3755f3ff446e9bbec988d8739c74d
1ef06a7ecd400fa9f91cb17f636ebcf308f3b320
refs/heads/master
2016-09-10T12:52:54.014593
2014-01-25T22:04:10
2014-01-25T22:04:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
410
java
package clojure; import clojure.lang.*; public final class core_sorted_map extends clojure.lang.RestFn { static { } public core_sorted_map() { super(); } public java.lang.Object doInvoke(java.lang.Object keyvals1) { return ((clojure.lang.PersistentTreeMap)clojure.lang.PersistentTreeMap.create((clojure.lang.ISeq)((clojure.lang.ISeq)keyvals1))); } public int getRequiredArity() { return 0; } }
[ "gal.dolber@gmail.com" ]
gal.dolber@gmail.com
7269e11efaa83c8bc3fb8bc51e732d99774f07c8
f6b90fae50ea0cd37c457994efadbd5560a5d663
/android/nut-dex2jar.src/com/google/android/gms/signin/internal/c.java
71a9850eb1f26eb17aef65ec19d8df333ee8be9f
[]
no_license
dykdykdyk/decompileTools
5925ae91f588fefa7c703925e4629c782174cd68
4de5c1a23f931008fa82b85046f733c1439f06cf
refs/heads/master
2020-01-27T09:56:48.099821
2016-09-14T02:47:11
2016-09-14T02:47:11
66,894,502
1
0
null
null
null
null
UTF-8
Java
false
false
1,016
java
package com.google.android.gms.signin.internal; import android.os.IInterface; import android.os.RemoteException; import com.google.android.gms.auth.api.signin.GoogleSignInAccount; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.api.Status; public abstract interface c extends IInterface { public abstract void a(ConnectionResult paramConnectionResult, AuthAccountResult paramAuthAccountResult) throws RemoteException; public abstract void a(Status paramStatus) throws RemoteException; public abstract void a(Status paramStatus, GoogleSignInAccount paramGoogleSignInAccount) throws RemoteException; public abstract void a(SignInResponse paramSignInResponse) throws RemoteException; public abstract void b(Status paramStatus) throws RemoteException; } /* Location: C:\crazyd\work\ustone\odm2016031702\baidu\android\nut-dex2jar.jar * Qualified Name: com.google.android.gms.signin.internal.c * JD-Core Version: 0.6.2 */
[ "819468107@qq.com" ]
819468107@qq.com
abf0b4cfe6d299fc72f9494cc5dabbef8039a240
b2b4a6bab187aaa35f5bfc324f0ef07d37c8914a
/tree/L426.java
25ed14cfd73d8726409c0d509d3a9b4a04b58251
[]
no_license
fyiyu091/Leetcode
7dd908a39bde4c019bda98038538ddcbfaf2e9c7
54c0a823cbf742f4693bb8c7824d9d67221fc5bb
refs/heads/master
2023-07-19T05:37:41.645801
2021-08-31T03:25:25
2021-08-31T03:25:25
275,048,455
0
0
null
null
null
null
UTF-8
Java
false
false
675
java
package tree; /* Convert binary search tree to sorted doubly linked list */ public class L426 { Node prev = null; Node head = null; public Node treeToDoublyList(Node root) { inOrder(root); if (prev != null && head != null) { prev.right = head; head.left = prev; } return head; } private void inOrder(Node root) { if (root == null) return; inOrder(root.left); if (prev == null) { head = root; } else { prev.right = root; } root.left = prev; prev = root; inOrder(root.right); return; } }
[ "yiyu091@gmail.com" ]
yiyu091@gmail.com
91cefd0c0328ffa4064cd0b190d767a6b08d5ae7
a94619fdc8770da90d0d307da64f19e95bcbbfc7
/java/com/google/i18n/phonenumbers/repackaged/com/google/protobuf/InvalidProtocolBufferException.java
24e970c1c73b22898f01039c87f026b72e9c3d34
[]
no_license
BeCandid/CFR
b95cf21629ced30fac290a61ff51d443057a5919
ab5019fb6196b6c8f8e2a3fe18f557b89831d690
refs/heads/master
2021-01-12T05:52:09.792333
2016-12-24T10:04:51
2016-12-24T10:04:51
77,222,002
3
0
null
null
null
null
UTF-8
Java
false
false
274
java
/* * Decompiled with CFR 0_110. * * Could not load the following classes: * java.io.IOException */ package com.google.i18n.phonenumbers.repackaged.com.google.protobuf; import java.io.IOException; public class InvalidProtocolBufferException extends IOException { }
[ "admin@timo.de.vc" ]
admin@timo.de.vc
8e64539d45c975413024b4099348c2cffce24e08
1fadc1383e6bb942729aa0de08fde13c86ea2ca1
/test/transform/resource/after-ecj/YieldInTryBlock.java
95b3177a83139f4ee9838124c7c70d898ffd36bb
[ "MIT" ]
permissive
abailly/lombok-pg
3d0650a5c0f9fb6a520f295ca3b74a5955123bcf
fcb65d1f0b7f2d2efa4392862c7a662564aa8f80
refs/heads/master
2021-01-21T00:56:36.602574
2012-05-12T13:02:11
2012-05-12T13:02:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,889
java
import java.lang.Iterable; class YieldTryBlock { YieldTryBlock() { super(); } public @java.lang.SuppressWarnings("all") Iterable<String> test() { class $YielderTest implements java.util.Iterator<String>, java.lang.Iterable<String>, java.io.Closeable { private boolean b; private @java.lang.SuppressWarnings("unused") RuntimeException e; private java.lang.Throwable $yieldException1; private int $state1; private int $state; private boolean $hasNext; private boolean $nextDefined; private String $next; private $YielderTest() { super(); } public java.util.Iterator<String> iterator() { if (($state == 0)) { $state = 1; return this; } else return new $YielderTest(); } public boolean hasNext() { if ((! $nextDefined)) { $hasNext = getNext(); $nextDefined = true; } return $hasNext; } public String next() { if ((! hasNext())) { throw new java.util.NoSuchElementException(); } $nextDefined = false; return $next; } public void remove() { throw new java.lang.UnsupportedOperationException(); } public void close() { do switch ($state) { case 5 : ; $state1 = 6; $state = 5; continue ; default : ; $state = 6; return ; } while (getNext()); } private boolean getNext() { java.lang.Throwable $yieldException; while (true) { try { switch ($state) { case 0 : ; $state = 1; case 1 : ; b = true; case 2 : ; $yieldException1 = null; $state1 = 2; $state = 3; case 3 : ; if (b) { throw new RuntimeException(); } $next = "bar"; $state = 5; return true; case 4 : ; $next = "foo"; $state = 5; return true; case 5 : ; { b = (! b); } if (($yieldException1 != null)) { $yieldException = $yieldException1; break ; } $state = $state1; continue ; case 6 : ; default : ; return false; } } catch (final java.lang.Throwable $yieldExceptionCaught) { $yieldException = $yieldExceptionCaught; } switch ($state) { case 3 : ; if (($yieldException instanceof RuntimeException)) { e = (RuntimeException) $yieldException; $state = 4; continue ; } case 4 : ; $yieldException1 = $yieldException; $state = 5; continue ; default : ; $state = 6; java.util.ConcurrentModificationException $yieldExceptionUnhandled = new java.util.ConcurrentModificationException(); $yieldExceptionUnhandled.initCause($yieldException); throw $yieldExceptionUnhandled; } } } } return new $YielderTest(); } }
[ "peichhor@web.de" ]
peichhor@web.de
4c0c9a98b06303d5117f822bb62720e9297ec880
b7e206810d2365e82fcac0f2b57210f06665e4c2
/interlok-core/src/main/java/com/adaptris/core/RequestReplyProducerBase.java
d16f7807e8273e6e4cec7669b613d3b223e05d6a
[ "Apache-2.0" ]
permissive
adaptris/interlok
33b829fb1979f6bbcb230a2f2592c48d0aecf680
5eeb78cfa620fb16a9827be862180118e777afc5
refs/heads/develop
2023-09-01T19:52:09.830345
2023-08-28T10:51:49
2023-08-28T11:08:15
44,253,783
28
11
Apache-2.0
2023-09-13T17:15:43
2015-10-14T14:37:52
Java
UTF-8
Java
false
false
2,330
java
/* * Copyright 2015 Adaptris 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 com.adaptris.core; import java.util.Optional; import org.apache.commons.lang3.BooleanUtils; import com.adaptris.annotation.AdvancedConfig; import com.adaptris.annotation.InputFieldDefault; import com.adaptris.core.util.ExceptionHelper; import com.adaptris.core.util.MessageHelper; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; /** * Abstract Request Reply enabled producer that may be extended by concrete sub-classes. * */ @NoArgsConstructor public abstract class RequestReplyProducerBase extends AdaptrisMessageProducerImp { @AdvancedConfig @InputFieldDefault(value = "false") @Getter @Setter private Boolean ignoreReplyMetadata; /** * The default timeout for request messages when not supplied. * * @return the default timeout. */ protected abstract long defaultTimeout(); protected void copyReplyContents(AdaptrisMessage reply, AdaptrisMessage original) throws ProduceException { try { MessageHelper.copyPayload(reply, original); } catch (Exception e) { throw ExceptionHelper.wrapProduceException(e); } } protected AdaptrisMessage mergeReply(AdaptrisMessage reply, AdaptrisMessage msg) throws ProduceException { if (reply == msg) { return msg; } copyReplyContents(reply, msg); if (!shouldIgnoreReplyMetadata()) { reply.getMetadata().forEach((e) -> msg.addMetadata(e)); msg.getObjectHeaders().putAll(reply.getObjectHeaders()); } Optional.ofNullable(reply.getContentEncoding()).ifPresent((s) -> msg.setContentEncoding(s)); return msg; } private boolean shouldIgnoreReplyMetadata() { return BooleanUtils.toBooleanDefaultIfNull(getIgnoreReplyMetadata(), false); } }
[ "lewin.chan@adaptris.com" ]
lewin.chan@adaptris.com
238edbb6814ca0f88c809c8e9ba6c5187edf3482
f695ffad9aacddd7628ec41bb8250890a36734c8
/ecp-coreservice/ecp-coreservice-common/src/main/java/com/everwing/coreservice/common/wy/entity/product/MyShoppingCartCommonService.java
6c8e0e7739ee299ab86b33a1ec0f445dd9318ba8
[]
no_license
zouyuanfa/Everwing-Cloud-Platform
9dea7e324f9447250b1b033509f17f7c8a0921be
f195dfe95f0addde56221d5c1b066290ad7ba62f
refs/heads/master
2020-04-13T18:22:36.731469
2018-12-28T06:18:37
2018-12-28T06:18:37
163,372,146
0
4
null
null
null
null
UTF-8
Java
false
false
4,462
java
package com.everwing.coreservice.common.wy.entity.product;/** * Created by wust on 2018/12/7. */ import com.alibaba.fastjson.JSONObject; import com.everwing.coreservice.common.wy.entity.common.select.asset.AssetSelectList; import com.everwing.coreservice.common.wy.entity.common.select.customer.CustomerSelectList; import com.everwing.coreservice.common.wy.entity.common.select.vehicle.VehicleSelectList; /** * * Function:普通服务购物车 * Reason: * Date:2018/12/7 * @author wusongti@lii.com.cn */ public class MyShoppingCartCommonService implements java.io.Serializable{ private static final long serialVersionUID = -5497968690786641155L; /** 产品类型 */ private String productType; /** 项目id */ private String projectId; /** 产品批号 */ private String batchNo; /** 产品编码 */ private String productCode; /** 购买数量 */ private Integer quantity; /** 开始计费时间 */ private String startTime; /** 购买到期时间 */ private String endTime; /** 关联客户:id */ private String customerId; /** 关联客户:名称 */ private String customerName; /** 关联客户 */ private CustomerSelectList customer; /** 关联资产 */ private AssetSelectList asset; /** 关联车辆 */ private VehicleSelectList vehicle; /** 单位 */ private String unit; /** 总价 */ private String totalPrice; /** 折扣 */ private String discountAmount; /** 产品JSON对象 */ private JSONObject productJSONObject; private String description; public String getProductType() { return productType; } public void setProductType(String productType) { this.productType = productType; } public String getProjectId() { return projectId; } public void setProjectId(String projectId) { this.projectId = projectId; } public String getBatchNo() { return batchNo; } public void setBatchNo(String batchNo) { this.batchNo = batchNo; } public String getProductCode() { return productCode; } public void setProductCode(String productCode) { this.productCode = productCode; } public Integer getQuantity() { return quantity; } public void setQuantity(Integer quantity) { this.quantity = quantity; } public String getStartTime() { return startTime; } public void setStartTime(String startTime) { this.startTime = startTime; } public String getEndTime() { return endTime; } public void setEndTime(String endTime) { this.endTime = endTime; } public String getCustomerId() { return customerId; } public void setCustomerId(String customerId) { this.customerId = customerId; } public String getCustomerName() { return customerName; } public void setCustomerName(String customerName) { this.customerName = customerName; } public CustomerSelectList getCustomer() { return customer; } public void setCustomer(CustomerSelectList customer) { this.customer = customer; } public AssetSelectList getAsset() { return asset; } public void setAsset(AssetSelectList asset) { this.asset = asset; } public VehicleSelectList getVehicle() { return vehicle; } public void setVehicle(VehicleSelectList vehicle) { this.vehicle = vehicle; } public String getUnit() { return unit; } public void setUnit(String unit) { this.unit = unit; } public String getTotalPrice() { return totalPrice; } public void setTotalPrice(String totalPrice) { this.totalPrice = totalPrice; } public String getDiscountAmount() { return discountAmount; } public void setDiscountAmount(String discountAmount) { this.discountAmount = discountAmount; } public JSONObject getProductJSONObject() { return productJSONObject; } public void setProductJSONObject(JSONObject productJSONObject) { this.productJSONObject = productJSONObject; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } }
[ "17711642361@163.com" ]
17711642361@163.com
9156591c12dff92f8658fc1f1cc665f41eb4eebe
798e3563930a7f5098a790d86cba09a53a9030bd
/src/com/uas/erp/service/oa/VacationService.java
070449963310a5495950fd6d527dab4543aed93c
[]
no_license
dreamvalley/6.0.0
c5cabed6f34cab783df16de9ff6ddfc118b7c4fe
12ed81bf7a46a649711bcf654bf9bcafe70054c2
refs/heads/master
2022-02-17T02:31:57.439726
2018-07-25T02:52:27
2018-07-25T02:52:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,087
java
package com.uas.erp.service.oa; import java.util.Map; public interface VacationService { void saveVacation(String formStore, String caller); void updateVacationById(String formStore, String caller); void deleteVacation(int va_id, String caller); void auditVacation(int va_id, String caller); void resAuditVacation(int va_id, String caller); void submitVacation(int va_id, String caller); void resSubmitVacation(int va_id, String caller); void updateEmployeeHoliday(String caller); String checkHoliday(int va_id,String caller); void updateEmployeeHavedays(String condition); void auditAsk4Leave(int va_id, String caller); void resAuditAsk4Leave(int va_id, String caller); void confirmAsk4Leave(int id, String caller); Map<String, Object> sickCheck(int va_id, String caller); void cleanEmpdays(int id, String caller); void checkTime(Map<Object, Object> formStore); void resEndVacation(int id, String caller); void endVacation(int id, String caller); int checkDuplicateTime(String emcode,String start,String end); }
[ "812669424@qq.com" ]
812669424@qq.com
6dc557551180dccc43d7031ff6e1813f3991213c
96726e8528eaf3d93d58fb3f0267de8dba7799f9
/src/argouml-app/src/org/argouml/configuration/IConfigurationFactory.java
fc279791ea548b5028951c002366d1ddf01ba06c
[ "BSD-3-Clause", "LicenseRef-scancode-other-permissive" ]
permissive
marcusvnac/argouml-spl
c84d556a98e1a04f01fba3a921db6cb62e519085
bcae37308b13b7ee62da0867a77d21a0141a0f18
refs/heads/master
2021-01-12T20:55:55.500881
2015-06-11T19:41:28
2015-06-11T19:41:28
37,139,993
4
2
null
null
null
null
UTF-8
Java
false
false
2,041
java
// $Id: IConfigurationFactory.java 40 2010-04-03 19:25:46Z marcusvnac $ // Copyright (c) 2006-2007 The Regents of the University of California. All // Rights Reserved. Permission to use, copy, modify, and distribute this // software and its documentation without fee, and without a written // agreement is hereby granted, provided that the above copyright notice // and this paragraph appear in all copies. This software program and // documentation are copyrighted by The Regents of the University of // California. The software program and documentation are supplied "AS // IS", without any accompanying services from The Regents. The Regents // does not warrant that the operation of the program will be // uninterrupted or error-free. The end-user understands that the program // was developed for research purposes and is advised not to rely // exclusively on the program for any reason. IN NO EVENT SHALL THE // UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, // SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE // PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF // CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. package org.argouml.configuration; /** * Configuration Factory interface. * * @author Tom Morris */ public interface IConfigurationFactory { /** * Returns the customized configuration for the user. * * @return a concrete class which extends ConfigurationHandler and * can be used to access and manipulate the configuration. */ public abstract ConfigurationHandler getConfigurationHandler(); }
[ "mtov@dcc.ufmg.br" ]
mtov@dcc.ufmg.br
0a35afb7da43b2b74e24cfcac5d73c42ab167203
46946342fed948e9f65e22328d14c8f13b857ae1
/mapsdk/src/main/java/com/unistrong/api/mapcore/IMapFragmentDelegate.java
871fb9ac447834cb4171a9d9f831b5283d64144f
[]
no_license
UersNOer/AllInLinkApp
a1805816198d12e9d491c8f8af1a58fcc091c4ff
1a75da52e53921060a934bdb653d29708cb1d87d
refs/heads/master
2023-07-09T22:48:05.180754
2021-08-13T06:59:17
2021-08-13T06:59:17
394,186,337
2
0
null
2021-08-13T06:59:18
2021-08-09T07:04:41
Java
UTF-8
Java
false
false
1,470
java
package com.unistrong.api.mapcore; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.os.RemoteException; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.unistrong.api.maps.UnistrongException; import com.unistrong.api.maps.MapOptions; public abstract interface IMapFragmentDelegate { public abstract IMapDelegate getMapDelegate() throws RemoteException, UnistrongException; public abstract void onInflate(Activity paramActivity, MapOptions mapOptions, Bundle paramBundle) throws RemoteException; public abstract void setContext(Context context); public abstract void setMapOptions(MapOptions mapOptions); public abstract void onCreate(Bundle paramBundle) throws RemoteException; public abstract View onCreateView(LayoutInflater paramLayoutInflater, ViewGroup paramViewGroup, Bundle paramBundle) throws RemoteException, UnistrongException; public abstract void onResume() throws RemoteException; public abstract void onPause() throws RemoteException; public abstract void onDestroyView() throws RemoteException; public abstract void onDestroy() throws RemoteException; public abstract void onLowMemory() throws RemoteException; public abstract void onSaveInstanceState(Bundle paramBundle) throws RemoteException; public abstract void setVisible(int visible); }
[ "782647832@qq.com" ]
782647832@qq.com
d5faba718c416a2289fd11f7eeb2cfeca205ee3d
7e977af5bb20217611259088747a5f60655e4138
/06-spring-mvc-recipe/src/main/java/com/mkejeiri/recipe/domain/UnitOfMeasure.java
2c43518404036bfa9dc3933f23b28d33bb3727e4
[]
no_license
mkejeiri/spring-boot-sample
19ab302caf0e4f94b531b0a6443bf84cf9266045
9925c37e97e69c104e9e51a023987795f36a43f1
refs/heads/master
2022-12-27T13:20:46.612415
2020-09-20T01:16:18
2020-09-20T01:17:51
287,903,745
0
0
null
null
null
null
UTF-8
Java
false
false
683
java
package com.mkejeiri.recipe.domain; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; @Entity public class UnitOfMeasure { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String description; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } @Override public String toString() { return "UnitOfMeasure [id=" + id + ", description=" + description + "]"; } }
[ "kejeiri@gmail.com" ]
kejeiri@gmail.com
957796cbc29ae16655131209900bd7e3f531dac3
6e10dc75f1fb1c08c5c69355b9335abd21e93662
/refrences/dex2jar.src/com/miui/tsmclientsdk/OperationCanceledException.java
9b433ea12fffca5ddde1379458dcd60813b18b5e
[]
no_license
heiliuer/XiaomiCard
d61e35a17c8e80e4dfaa8dfeeecb6d58906a2614
012a496a306469fec31dcd18cecef7bdb8dc9cc9
refs/heads/master
2020-05-30T19:10:49.072231
2017-05-10T04:14:47
2017-05-10T04:14:47
69,148,258
9
1
null
null
null
null
UTF-8
Java
false
false
636
java
package com.miui.tsmclientsdk; public class OperationCanceledException extends Exception { public OperationCanceledException() { } public OperationCanceledException(String paramString) { super(paramString); } public OperationCanceledException(String paramString, Throwable paramThrowable) { super(paramString, paramThrowable); } public OperationCanceledException(Throwable paramThrowable) { super(paramThrowable); } } /* Location: d:\Users\Administrator\Desktop\111111_dex2jar.jar * Qualified Name: com.miui.tsmclientsdk.OperationCanceledException * JD-Core Version: 0.6.0 */
[ "eee" ]
eee
ecb0a89a153a11305c8612153e7ff5809ebd2167
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/test/org/mapstruct/ap/test/nestedmethodcall/NestedMappingMethodInvocationTest.java
6c457e3afd4b89df27403a05e0ba2b13f9655960
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
2,689
java
/** * Copyright MapStruct Authors. * * Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ package org.mapstruct.ap.test.nestedmethodcall; import java.util.GregorianCalendar; import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.namespace.QName; import org.junit.Test; import org.junit.runner.RunWith; import org.mapstruct.ap.testutil.IssueKey; import org.mapstruct.ap.testutil.WithClasses; import org.mapstruct.ap.testutil.runner.AnnotationProcessorTestRunner; /** * Test for the nested invocation of mapping methods. * * @author Sjaak Derksen */ @IssueKey("134") @RunWith(AnnotationProcessorTestRunner.class) public class NestedMappingMethodInvocationTest { public static final QName QNAME = new QName("dont-care"); @Test @WithClasses({ OrderTypeToOrderDtoMapper.class, OrderDto.class, OrderDetailsDto.class, OrderDetailsType.class, OrderType.class }) public void shouldMapViaMethodAndMethod() throws DatatypeConfigurationException { OrderTypeToOrderDtoMapper instance = OrderTypeToOrderDtoMapper.INSTANCE; OrderDto target = instance.sourceToTarget(createOrderType()); assertThat(target).isNotNull(); assertThat(target.getOrderNumber()).isEqualTo(5L); assertThat(target.getDates()).containsExactly("02.03.1999", "28.07.2004"); assertThat(target.getOrderDetails()).isNotNull(); assertThat(target.getOrderDetails().getName()).isEqualTo("test"); assertThat(target.getOrderDetails().getDescription()).containsExactly("elem1", "elem2"); } @Test @WithClasses({ SourceTypeTargetDtoMapper.class, SourceType.class, ObjectFactory.class, TargetDto.class }) public void shouldMapViaMethodAndConversion() throws DatatypeConfigurationException { SourceTypeTargetDtoMapper instance = SourceTypeTargetDtoMapper.INSTANCE; TargetDto target = instance.sourceToTarget(createSource()); assertThat(target).isNotNull(); assertThat(target.getDate()).isEqualTo(new GregorianCalendar(2013, 6, 6).getTime()); } @Test @WithClasses({ SourceTypeTargetDtoMapper.class, SourceType.class, ObjectFactory.class, TargetDto.class }) public void shouldMapViaConversionAndMethod() throws DatatypeConfigurationException { SourceTypeTargetDtoMapper instance = SourceTypeTargetDtoMapper.INSTANCE; SourceType source = instance.targetToSource(createTarget()); assertThat(source).isNotNull(); assertThat(source.getDate().getValue()).isEqualTo("06.07.2013"); assertThat(source.getDate().getName()).isEqualTo(NestedMappingMethodInvocationTest.QNAME); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
82a0066f8a13591fd5c9070cd18d5ae0c79896ab
c5254a0b2d3ec92f32517f5fa3dc439c1a7a70ee
/old/command/Invoker.java
292052de41d5b7786f87e5a3e49c8dfd8f0fb79a
[]
no_license
Tralo/PatternStudy
af86ec3fafbaa431fc9e14fb84766a72e39c39dc
16d001620cbb40f136122e7c52d7fa68f9d9178f
refs/heads/master
2020-12-07T20:24:45.770237
2017-02-01T07:52:01
2017-02-01T07:52:01
66,948,570
0
0
null
null
null
null
UTF-8
Java
false
false
276
java
package command; public class Invoker { private Command command; public Command getCommand() { return command; } public void setCommand(Command command) { this.command = command; } // 执行客户的命令 public void action() { this.command.execute(); } }
[ "13580548169@163.com" ]
13580548169@163.com
08024c8a5a80ffce61d4c01e3fb6a6f21ccd12b8
157d2ef1f40203d1e446f096e820185ae6e4f106
/beige-uml-swing/src/main/java/org/beigesoft/uml/factory/awt/FactoryAsmInteractionUse.java
fc5430bbd6e1bb42577a01b5f883c5044dd892b9
[ "Apache-2.0", "LicenseRef-scancode-free-unknown" ]
permissive
demidenko05/beige-uml
e87b922140d207740ea8f01daf201a3410fcc18e
48bfbe5b100853815032af639b32da30957305af
refs/heads/master
2023-03-17T00:37:17.463163
2020-10-13T11:05:30
2020-10-13T11:05:30
47,434,951
1
1
Apache-2.0
2020-10-13T07:23:41
2015-12-05T00:01:40
Java
UTF-8
Java
false
false
3,946
java
package org.beigesoft.uml.factory.awt; import java.awt.Frame; import java.awt.Graphics2D; import java.awt.Image; import org.beigesoft.graphic.pojo.SettingsDraw; import org.beigesoft.graphic.pojo.Point2D; import org.beigesoft.graphic.service.ISrvDraw; import org.beigesoft.service.ISrvI18n; import org.beigesoft.ui.service.ISrvDialog; import org.beigesoft.uml.app.model.SettingsGraphicUml; import org.beigesoft.uml.assembly.AsmElementUmlInteractive; import org.beigesoft.uml.assembly.IAsmElementUmlInteractive; import org.beigesoft.uml.factory.IFactoryAsmElementUml; import org.beigesoft.uml.factory.swing.FactoryEditorInteractionUse; import org.beigesoft.uml.pojo.InteractionUse; import org.beigesoft.uml.service.graphic.SrvGraphicInteractionUse; import org.beigesoft.uml.service.interactive.SrvInteractiveFragment; import org.beigesoft.uml.service.persist.xmllight.FileAndWriter; import org.beigesoft.uml.service.persist.xmllight.SrvPersistLightXmlInteractionUse; public class FactoryAsmInteractionUse implements IFactoryAsmElementUml<IAsmElementUmlInteractive<InteractionUse, Graphics2D, SettingsDraw, FileAndWriter>, Graphics2D, SettingsDraw, FileAndWriter, InteractionUse> { private final ISrvDraw<Graphics2D, SettingsDraw, Image> drawSrv; private final SettingsGraphicUml graphicSettings; private final FactoryEditorInteractionUse factoryEditorInteractionUse; private SrvGraphicInteractionUse<InteractionUse, Graphics2D, SettingsDraw> graphicInteractionUseumlSrv; private SrvPersistLightXmlInteractionUse<InteractionUse> persistXmlInteractionUseSrv; private SrvInteractiveFragment<InteractionUse, Graphics2D, SettingsDraw, Frame> interactiveInteractionUseSrv; public FactoryAsmInteractionUse(ISrvDraw<Graphics2D, SettingsDraw, Image> drawSrv, ISrvI18n i18nSrv, ISrvDialog<Frame> dialogSrv, SettingsGraphicUml graphicSettings, Frame frameMain) { this.drawSrv = drawSrv; this.graphicSettings = graphicSettings; this.factoryEditorInteractionUse = new FactoryEditorInteractionUse(i18nSrv, dialogSrv, graphicSettings, frameMain); } @Override public synchronized AsmElementUmlInteractive<InteractionUse, Graphics2D, SettingsDraw, FileAndWriter> createAsmElementUml() { InteractionUse intUse = new InteractionUse(); intUse.setPointStart(new Point2D(1, 1)); SettingsDraw drawSettings = new SettingsDraw(); AsmElementUmlInteractive<InteractionUse, Graphics2D, SettingsDraw, FileAndWriter> asmInteractionUse = new AsmElementUmlInteractive<InteractionUse, Graphics2D, SettingsDraw, FileAndWriter>(intUse, drawSettings, lazyGetGraphicInteractionUseSrv(), lazyGetPersistXmlInteractionUseSrv(), lazyGetInteractiveInteractionUseSrv()); return asmInteractionUse; } public synchronized SrvInteractiveFragment<InteractionUse, Graphics2D, SettingsDraw, Frame> lazyGetInteractiveInteractionUseSrv() { if(interactiveInteractionUseSrv == null) { interactiveInteractionUseSrv = new SrvInteractiveFragment<InteractionUse, Graphics2D, SettingsDraw, Frame> (lazyGetGraphicInteractionUseSrv(), factoryEditorInteractionUse); } return interactiveInteractionUseSrv; } public synchronized SrvPersistLightXmlInteractionUse<InteractionUse> lazyGetPersistXmlInteractionUseSrv() { if(persistXmlInteractionUseSrv == null) { persistXmlInteractionUseSrv = new SrvPersistLightXmlInteractionUse<InteractionUse>(); } return persistXmlInteractionUseSrv; } public synchronized SrvGraphicInteractionUse<InteractionUse, Graphics2D, SettingsDraw> lazyGetGraphicInteractionUseSrv() { if(graphicInteractionUseumlSrv == null) { graphicInteractionUseumlSrv = new SrvGraphicInteractionUse<InteractionUse, Graphics2D, SettingsDraw>(drawSrv, graphicSettings); } return graphicInteractionUseumlSrv; } public FactoryEditorInteractionUse getFactoryEditorInteractionUse() { return factoryEditorInteractionUse; } }
[ "demidenko05@gmail.com" ]
demidenko05@gmail.com
40782348fb75e81bf5c89138f284a7f06f9b33b7
62774e6de56acf8c4d4d014f1f5ee709feef6502
/resident-evil/src/main/java/com/mkolongo/residentEvil/domain/entities/BaseEntity.java
49afa1b6ac19f5ba3277bdbd8c2373657149b104
[]
no_license
Chris-Mk/Hibernate
35a9c42679ad6d20925c96d6d3929ad86649f700
eb338734c0136d5292e06f7ab2688e4fda31d93c
refs/heads/master
2023-07-24T00:20:36.222180
2023-07-19T19:29:16
2023-07-19T19:29:16
205,900,454
0
0
null
2023-07-19T19:29:18
2019-09-02T16:56:37
Java
UTF-8
Java
false
false
400
java
package com.mkolongo.residentEvil.domain.entities; import lombok.Getter; import lombok.Setter; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.MappedSuperclass; @Getter @Setter @MappedSuperclass public class BaseEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; }
[ "chrismks23@gmail.com" ]
chrismks23@gmail.com
a900c4795476ad9a09d80bcd6ccfdbc122a78b65
10be02b852c57f5d865c184dc75bd88e2397d067
/src/main/java/com/sc/kanak/config/DatabaseConfiguration.java
36c11033c3c02b2af6b064dcfb07d43480f39588
[]
no_license
saumikonline/kanak
3fa1f2614e1d5f1157e58c66c2c422eb3a6f0ec4
e96bde6ed7582c27d980e2932d7d0e7142ed1243
refs/heads/master
2020-03-21T21:07:39.249383
2018-06-28T17:10:36
2018-06-28T17:10:36
139,047,458
0
0
null
2018-06-28T17:22:11
2018-06-28T17:10:30
Java
UTF-8
Java
false
false
2,606
java
package com.sc.kanak.config; import io.github.jhipster.config.JHipsterConstants; import io.github.jhipster.config.liquibase.AsyncSpringLiquibase; import liquibase.integration.spring.SpringLiquibase; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; import org.springframework.cache.CacheManager; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories; import org.springframework.core.task.TaskExecutor; import org.springframework.data.jpa.repository.config.EnableJpaAuditing; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.transaction.annotation.EnableTransactionManagement; import javax.sql.DataSource; @Configuration @EnableJpaRepositories("com.sc.kanak.repository") @EnableJpaAuditing(auditorAwareRef = "springSecurityAuditorAware") @EnableTransactionManagement @EnableElasticsearchRepositories("com.sc.kanak.repository.search") public class DatabaseConfiguration { private final Logger log = LoggerFactory.getLogger(DatabaseConfiguration.class); private final Environment env; private final CacheManager cacheManager; public DatabaseConfiguration(Environment env, CacheManager cacheManager) { this.env = env; this.cacheManager = cacheManager; } @Bean public SpringLiquibase liquibase(@Qualifier("taskExecutor") TaskExecutor taskExecutor, DataSource dataSource, LiquibaseProperties liquibaseProperties) { // Use liquibase.integration.spring.SpringLiquibase if you don't want Liquibase to start asynchronously SpringLiquibase liquibase = new AsyncSpringLiquibase(taskExecutor, env); liquibase.setDataSource(dataSource); liquibase.setChangeLog("classpath:config/liquibase/master.xml"); liquibase.setContexts(liquibaseProperties.getContexts()); liquibase.setDefaultSchema(liquibaseProperties.getDefaultSchema()); liquibase.setDropFirst(liquibaseProperties.isDropFirst()); if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_NO_LIQUIBASE)) { liquibase.setShouldRun(false); } else { liquibase.setShouldRun(liquibaseProperties.isEnabled()); log.debug("Configuring Liquibase"); } return liquibase; } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
c205967148ddc05d6ccd93d7d3ed32a5560085f7
941cb164c35d531de510e4aa95872711d3405e39
/app/src/main/java/sinia/com/baihangeducation/minecompany/presenter/CompanyUCenterEditTrainingPresenter.java
e000bfd8c244e0a0c2804618b156c13d4723e853
[]
no_license
lenka123123/jy
f81220d6f80cca4fde5872b4e3cb992abb5171b8
2a2fc5d675ec01fd45a3950f1adeb9bcea081c7a
refs/heads/master
2020-03-28T00:50:19.854060
2018-11-30T06:15:47
2018-11-30T06:15:47
147,453,961
1
0
null
null
null
null
UTF-8
Java
false
false
1,608
java
package sinia.com.baihangeducation.minecompany.presenter; import android.app.Activity; import android.util.Log; import com.example.framwork.base.BasePresenter; import com.example.framwork.noHttp.Bean.BaseResponseBean; import com.example.framwork.noHttp.OnRequestListener; import java.util.HashMap; import com.mcxtzhang.swipemenulib.info.TraingDetailInfo; import sinia.com.baihangeducation.home.view.TraingDetailView; import sinia.com.baihangeducation.supplement.tool.BaseRequestInfo; public class CompanyUCenterEditTrainingPresenter extends BasePresenter { private Activity activity; private TraingDetailView view; public CompanyUCenterEditTrainingPresenter(Activity activity, TraingDetailView view) { super(activity); this.activity = activity; this.view = view; } public void getMyReleaseTrainingDetailInfo(){ HashMap info = BaseRequestInfo.getInstance().getRequestInfo(activity,"getTrainInfo","home",true); info.put("train_id",view.getTrainId()); view.showLoading(); post(info, new OnRequestListener() { @Override public void requestSuccess(BaseResponseBean bean) { Log.i("培训详情",bean.toString()); TraingDetailInfo mTraingDetailInfo = bean.parseObject(TraingDetailInfo.class); view.getMyReleaseTraingDetailInfoSuccess(mTraingDetailInfo); } @Override public void requestFailed(String error) { } @Override public void requestFinish() { } }); } }
[ "13902276741@163.com" ]
13902276741@163.com
d1981d01a4c829dfc3c1c8f7079716eaccfd3303
c2fa04760594de051e51eb1b7102b827424951ae
/YiXin/src/com/yxst/epic/yixin/activity/ContactSearchActivity.java
a533b8f489f0f13eca29ff93f3ac217542592af4
[ "Apache-2.0" ]
permissive
glustful/mika
c3d9c7b61f02ac94a7e750ebf84391464054e2a3
300c9e921fbefd00734882466819e5987cfc058b
refs/heads/master
2021-01-10T10:50:44.125499
2016-04-06T01:45:26
2016-04-06T01:45:26
55,567,241
0
0
null
null
null
null
UTF-8
Java
false
false
5,868
java
package com.yxst.epic.yixin.activity; import org.androidannotations.annotations.AfterInject; import org.androidannotations.annotations.AfterViews; import org.androidannotations.annotations.Background; import org.androidannotations.annotations.Bean; import org.androidannotations.annotations.Click; import org.androidannotations.annotations.EActivity; import org.androidannotations.annotations.ItemClick; import org.androidannotations.annotations.UiThread; import org.androidannotations.annotations.ViewById; import org.androidannotations.api.rest.RestErrorHandler; import org.springframework.web.client.RestClientException; import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBarActivity; import android.text.TextUtils; import android.util.Log; import android.view.View; import android.widget.AbsListView; import android.widget.AbsListView.OnScrollListener; import android.widget.EditText; import android.widget.ImageButton; import android.widget.ListView; import android.widget.Toast; import com.miicaa.home.R; import com.yxst.epic.yixin.adapter.ContactSearchAdapter; import com.yxst.epic.yixin.data.dto.model.Member; import com.yxst.epic.yixin.data.dto.request.BaseRequest; import com.yxst.epic.yixin.data.dto.request.SearchRequest; import com.yxst.epic.yixin.data.dto.response.BaseResponse; import com.yxst.epic.yixin.data.dto.response.SearchResponse; import com.yxst.epic.yixin.data.rest.IMInterface; import com.yxst.epic.yixin.rest.IMInterfaceProxy; import com.yxst.epic.yixin.utils.CacheUtils; import com.yxst.epic.yixin.view.ContactItemFooterView; import com.yxst.epic.yixin.view.ContactItemFooterView_; @EActivity(R.layout.activity_contact_search) public class ContactSearchActivity extends ActionBarActivity implements OnScrollListener, RestErrorHandler { private static final String TAG = "ContactSearchActivity"; @ViewById EditText etSearch; @ViewById ImageButton btnSearch; @ViewById(android.R.id.list) ListView mListView; @Bean ContactSearchAdapter mAdapter; private ContactItemFooterView mFooterView; IMInterface mIMInterfaceProxy; @AfterInject void afterInject() { mIMInterfaceProxy = IMInterfaceProxy.create(); mIMInterfaceProxy.setRestErrorHandler(this); } @AfterViews void afterViews() { final ActionBar bar = getSupportActionBar(); bar.setTitle("搜索联系人"); int flags = ActionBar.DISPLAY_HOME_AS_UP; int change = bar.getDisplayOptions() ^ flags; bar.setDisplayOptions(change, flags); mListView.setOnScrollListener(this); ContactItemFooterView footerView = ContactItemFooterView_.build(this); mFooterView = footerView; setAdapter(); mFooterView.hide(); } @Override public boolean onSupportNavigateUp() { finish(); return true; } private void setAdapter() { mListView.addFooterView(mFooterView); mListView.setAdapter(mAdapter); } private String searchKey; @Click(R.id.btnSearch) void onClickBtnSearch(View v) { searchKey = etSearch.getText().toString(); if (!TextUtils.isEmpty(searchKey)) { mAdapter.clear(); setAdapter(); mFooterView.show(); doInBackground(searchKey, 0); } } int lastVisibleItem = 0; @Override public void onScrollStateChanged(AbsListView view, int scrollState) { Log.d(TAG, "onScrollStateChanged()"); Log.d(TAG, "onScrollStateChanged() lastVisibleItem:" + lastVisibleItem); Log.d(TAG, "onScrollStateChanged() mAdapter.getCount():" + mAdapter.getCount()); if (scrollState == OnScrollListener.SCROLL_STATE_IDLE && lastVisibleItem == mAdapter.getCount()) { doInBackground(searchKey, mAdapter.getCount()); } } private int Count; @Override public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { Log.d(TAG, "onScroll()"); Log.d(TAG, "onScroll() totalItemCount:" + totalItemCount); Log.d(TAG, "onScroll() Count:" + Count); // 计算最后可见条目的索引 lastVisibleItem = firstVisibleItem + visibleItemCount - 1; // 所有的条目已经和最大条数相等,则移除底部的View // if (totalItemCount == Count + 1) { // mListView.removeFooterView(mFooterView); // } } @Background void doInBackground(String searchKey, int offset) { onPreExecute(); BaseRequest baseRequest = CacheUtils.getBaseRequest(this); SearchRequest request = new SearchRequest(); request.BaseRequest = baseRequest; // request.SearchKey = ""; request.SearchKey = searchKey; request.Offset = offset; request.Limit = 20; request.SearchType = SearchRequest.SEARCH_TYPE_USER; Log.d(TAG, "doInBackground() request:" + request); SearchResponse response = mIMInterfaceProxy.search(request); onPostExecute(response); } @UiThread void onPreExecute() { mFooterView.setVisibility(View.VISIBLE); } @UiThread void onPostExecute(SearchResponse response) { Log.d(TAG, "onPostExecute() response:" + response); if (response == null) { return; } if (response.BaseResponse.Ret != BaseResponse.RET_SUCCESS) { Toast.makeText(this, response.BaseResponse.ErrMsg, Toast.LENGTH_SHORT).show(); return; } Count = response.Count; mAdapter.addMembers(response.MemberList); if (mAdapter.getCount() == Count) { mListView.removeFooterView(mFooterView); } if (Count > 0 && mAdapter.getCount() == Count) { mListView.removeFooterView(mFooterView); Toast.makeText(this, "数据全部加载完成,没有更多数据!", Toast.LENGTH_SHORT).show(); } } @UiThread @Override public void onRestClientExceptionThrown(RestClientException e) { Toast.makeText(this, "访问失败", Toast.LENGTH_SHORT).show(); if (mAdapter.getCount() == 0) { mListView.removeFooterView(mFooterView); } } @ItemClick(android.R.id.list) void onItemClick(Member member) { ContactDetailActivity_.intent(this).member(member) .userName(member.UserName).start(); } }
[ "852411097@qq.com" ]
852411097@qq.com
d98594cb61c2781f7fb92fbed2b053c80b4105d3
1c6d47856e1c6969ea5028b07ac23b967e42b69d
/Byte/code/learn-byte/src/main/java/lsieun/bit/c_use/C_Port.java
ebd201eb144658faca81ea8ce2eaab83900512f9
[ "MIT" ]
permissive
Silentsoul04/learn-java
439f82ff387ae1fc6fdd1e58a8066c313453d0c5
03bdac6fa970051de305db40300fae228810aaf3
refs/heads/master
2022-12-30T04:01:13.922338
2020-08-01T10:57:38
2020-08-01T10:57:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,023
java
package lsieun.bit.c_use; import java.nio.ByteBuffer; import java.util.Random; public class C_Port { public static void main(String[] args) { Random rand = new Random(); for (int i = 0; i < 1000; i++) { byte b1 = (byte) rand.nextInt(256); byte b2 = (byte) rand.nextInt(256); int result1 = toInt1(b1, b2); int result2 = toInt2(b1, b2); if (result1 != result2) { System.out.println(b1 + ", " + b2 + ": " + result1 + ", " + result2); } } } public static int toInt1(byte b1, byte b2) { return (b1 & 0xFF) << 8 | (b2 & 0xFF); } public static int toInt2(byte b1, byte b2) { byte[] bytes = new byte[Integer.BYTES]; bytes[0] = 0; bytes[1] = 0; bytes[2] = b1; bytes[3] = b2; ByteBuffer byteBuffer = ByteBuffer.allocate(Integer.BYTES); byteBuffer.put(bytes); byteBuffer.flip(); return byteBuffer.getInt(); } }
[ "331505785@qq.com" ]
331505785@qq.com
d38886ebd48bc57680bd1fc16085269ea2608d31
71030943c40106ef167227ab8192f0eb8a59335d
/src/test/java/net/wendal/nutzbook/DyDataSorce.java
64b6a99fe2f72656bf90f65c2bf4df7007f1497f
[ "Apache-2.0", "MIT" ]
permissive
vincent109/nutz-book-project
be2e21384044253d88e58cf4a1cf2bc049895c5d
e6423e4682ae89f374c7ff012560117a4a943791
refs/heads/master
2023-04-15T18:35:30.125944
2021-04-28T04:01:01
2021-04-28T04:01:01
74,447,410
0
0
Apache-2.0
2021-04-28T04:01:02
2016-11-22T07:44:30
JavaScript
UTF-8
Java
false
false
1,362
java
package net.wendal.nutzbook; import java.io.PrintWriter; import java.sql.Connection; import java.sql.SQLException; import java.sql.SQLFeatureNotSupportedException; import java.util.logging.Logger; import javax.sql.DataSource; import org.nutz.lang.Lang; public class DyDataSorce implements DataSource{ public static ThreadLocal<DataSource> th = new ThreadLocal<>(); public Connection getConnection() throws SQLException { return th.get().getConnection(); } // --------------------------------- // ---- 其他方法没用 // --------------------------------- public PrintWriter getLogWriter() throws SQLException { throw Lang.noImplement(); } public void setLogWriter(PrintWriter out) throws SQLException { throw Lang.noImplement(); } public void setLoginTimeout(int seconds) throws SQLException { throw Lang.noImplement(); } public int getLoginTimeout() throws SQLException { throw Lang.noImplement(); } public Logger getParentLogger() throws SQLFeatureNotSupportedException { throw Lang.noImplement(); } public <T> T unwrap(Class<T> iface) throws SQLException { throw Lang.noImplement(); } public boolean isWrapperFor(Class<?> iface) throws SQLException { throw Lang.noImplement(); } public Connection getConnection(String username, String password) throws SQLException { throw Lang.noImplement(); } }
[ "wendal1985@gmail.com" ]
wendal1985@gmail.com
622513442b162a0eb6262b64ffcbe4d269ce1e4d
444e0e1a702526e0cb1e47384e40dd65713d7103
/Tic-Tac-Toe/Problems/Initializing an array of integers/src/Matrix.java
f3b3b48b590c2d6e389a3ad922c0e062561ab51c
[]
no_license
emaphis/Hyperskill
4aec16a43f1edeba7882714bbf3e61c4046002d5
6f22981a532d43756ea1da2238d059fb0c32f1da
refs/heads/master
2022-12-06T18:00:29.457772
2020-08-30T01:51:49
2020-08-30T01:51:49
284,158,423
0
0
null
null
null
null
UTF-8
Java
false
false
919
java
import java.util.Arrays; import java.util.Scanner; public class Matrix { public static void main(String[] args) { // put your code here System.out.println("Matrix a"); Scanner scan = new Scanner(System.in); String line = scan.nextLine(); String[] pieces = line.split(" "); int[] a = new int[pieces.length]; for (int i = 0; i < pieces.length; i++) { a[i] = Integer.parseInt(pieces[i]); } int num = scan.nextInt(); // num %= pieces.length; for (int k = 0; k < num; k++) { int temp = a[a.length - 1]; for (int i = a.length - 1; i > 0; i--) { a[i] = a[i - 1]; } a[0] = temp; System.out.print(Arrays.toString(a)); System.out.println(); } for (int n: a) { System.out.print(n + " "); } } }
[ "emaphis85@gmail.com" ]
emaphis85@gmail.com
a81b64eccf495f4aae9d7dcc449bf834cba70916
fee07509619ca10be0b08059720886f9a1f2048d
/bdnav-provider/task-provider/src/main/java/com/bdxh/task/TaskProviderApplication.java
195e00dffe665fc71df5c9ef6fcd671bc17252be
[ "Apache-2.0" ]
permissive
jiageh08/tea-springboot
70a68c7518f2470268ad8fa03ea7dfa48dff948c
91892209a70b93e90eaee0a01a4f71e188f4a61a
refs/heads/master
2022-12-05T13:10:06.654077
2020-08-07T01:29:56
2020-08-07T01:29:56
285,574,085
0
0
null
null
null
null
UTF-8
Java
false
false
1,238
java
package com.bdxh.task; import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration; import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.cloud.netflix.eureka.EnableEurekaClient; import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.context.annotation.ComponentScan; import org.springframework.scheduling.annotation.EnableScheduling; /** * @Description: 定时任务启动类 (此处 basePackages用到哪个服务再去扫描某成服务 不可 com.bdxh) * @Author: Kang * @Date: 2019/4/29 14:13 */ @SpringBootApplication @EnableScheduling @EnableApolloConfig @ServletComponentScan @ComponentScan(basePackages = {"com.bdxh.user","com.bdxh.school","com.bdxh.servicepermit","com.bdxh.task"}) @EnableFeignClients(basePackages = {"com.bdxh.user","com.bdxh.school","com.bdxh.servicepermit"}) public class TaskProviderApplication { public static void main(String[] args) { SpringApplication.run(TaskProviderApplication.class, args); } }
[ "wangjp@wehgc.com" ]
wangjp@wehgc.com
87a4de993cd97e9b80efd016023d8f1953ed9e2e
2c1bd6718f37c3d0b0d63aa9ca0acf4a2f891326
/java-eight-streams/src/com/training/model/Application.java
52908e842d3511f2046140b19d888887d0635278
[]
no_license
storm-zeus31/freshers_batch_july_2021
c6b7110fd84be2a9e66f4fd64d6396ba4dac4274
d32661b2946f35dc3adffcefa34c099f1590b92c
refs/heads/master
2023-07-05T21:38:29.672273
2021-07-29T04:50:55
2021-07-29T04:50:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
655
java
package com.training.model; import java.util.stream.*; import static java.util.stream.Collectors.*; import java.util.*; public class Application { public static void print(List<?> list) { list.forEach(System.out::println); } public static void main(String[] args) { Book headFirst = new Book(101,"Head first java", 45.00); Book spring = new Book(102,"Professional Spring", 145.00); Book html = new Book(201,"HTML for dummies", 345.00); List<Book> bookList = Arrays.asList(headFirst,spring,html); bookList.stream().filter(e -> e.getRatePerUnit()>300).forEach(System.out::println); } } // max
[ "vatsank@gmail.com" ]
vatsank@gmail.com
a031db0b7ea4ac3c7e76984c6cab25047b2f869c
fa7e1dc7b491f4b8b5eaa0b19f5b6500bae6296f
/core/src/com/gempukku/libgdx/graph/ui/graph/property/PropertyBoxImpl.java
56c7d114fe9fe21945de08add7267314d5fddc81
[ "MIT" ]
permissive
gamethapcam/libgdx-graph
6e2327caeda003d2246b23bc75d018631f0546dc
a4d4dda0397e3bf4cf2cceb65ef3c1be17167585
refs/heads/master
2023-03-01T01:25:01.734619
2021-02-05T11:05:17
2021-02-05T11:05:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,282
java
package com.gempukku.libgdx.graph.ui.graph.property; import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.scenes.scene2d.ui.Label; import com.badlogic.gdx.scenes.scene2d.ui.Skin; import com.badlogic.gdx.scenes.scene2d.ui.Table; import com.badlogic.gdx.scenes.scene2d.ui.TextField; import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; import com.badlogic.gdx.utils.JsonValue; import com.gempukku.libgdx.graph.config.PropertyNodeConfiguration; import com.gempukku.libgdx.graph.data.FieldType; import com.gempukku.libgdx.graph.ui.graph.GraphBox; import com.gempukku.libgdx.graph.ui.graph.GraphBoxImpl; import com.gempukku.libgdx.graph.ui.graph.GraphChangedEvent; import com.gempukku.libgdx.graph.ui.producer.ValueGraphNodeOutput; public class PropertyBoxImpl<T extends FieldType> extends Table implements PropertyBox<T> { private T propertyType; private PropertyDefaultBox propertyDefaultBox; private TextField textField; public PropertyBoxImpl(Skin skin, String name, T propertyType, PropertyDefaultBox propertyDefaultBox) { super(skin); this.propertyType = propertyType; this.propertyDefaultBox = propertyDefaultBox; textField = new TextField(name, skin); Table headerTable = new Table(skin); headerTable.add(new Label("Name: ", skin)); headerTable.add(textField).growX(); textField.addListener( new ChangeListener() { @Override public void changed(ChangeEvent event, Actor actor) { fire(new GraphChangedEvent(true, true)); } }); headerTable.row(); add(headerTable).growX().row(); if (propertyDefaultBox != null) add(propertyDefaultBox.getActor()).growX().row(); } @Override public T getType() { return propertyType; } @Override public String getName() { return textField.getText(); } @Override public JsonValue getData() { if (propertyDefaultBox != null) { JsonValue data = propertyDefaultBox.serializeData(); if (data == null) return null; return data; } else { return null; } } @Override public Actor getActor() { return this; } @Override public GraphBox<T> createPropertyBox(Skin skin, String id, float x, float y) { final String name = getName(); GraphBoxImpl<T> result = new GraphBoxImpl<T>(id, new PropertyNodeConfiguration<T>(name, propertyType), skin) { @Override public JsonValue getData() { JsonValue result = new JsonValue(JsonValue.ValueType.object); result.addChild("name", new JsonValue(name)); result.addChild("type", new JsonValue(propertyType.getName())); return result; } }; result.addOutputGraphPart(skin, new ValueGraphNodeOutput<T>(name, propertyType)); if (propertyType.isTexture()) { result.addGraphBoxPart(new TextureSettingsGraphBoxPart<T>(skin)); } return result; } @Override public void dispose() { } }
[ "marcin.sciesinski" ]
marcin.sciesinski
0cfae083d6f665cb6c8bf57b5f406e3f4045c560
be11b479da93a8b293550240582a55b4d60dd9a8
/src/main/java/com/pri/entity/Page.java
d0cd843ad283eb02e7c73b9c768224f3858dffc1
[]
no_license
1163646727/project
6921eeb4939cb63676f8c7756378a4b1afd7dd2a
3ffc2b1d57d9179ae7bf963870f2585c424c4f0f
refs/heads/master
2022-07-03T20:01:27.039962
2021-10-18T09:49:11
2021-10-18T09:49:15
183,396,460
0
0
null
null
null
null
UTF-8
Java
false
false
2,152
java
package com.pri.entity; import java.util.HashMap; import java.util.Map; /** * @ClassName: Page * @Description: 分页实体 * @author: ChenQi * @CreateDate: 2019/5/6 11:43 */ public class Page { private int showCount; //每页显示记录数 private int totalPage; //总页数 private int totalResult; //总记录数 private int currentPage; //当前页 private int currentResult; //当前记录起始索引 private Map<String, Object> params = new HashMap<String, Object>();// 传入查询参数 public Map<String, Object> getParams() { return params; } public void setParams(Map<String, Object> params) { this.params = params; } public Page() { try { this.showCount = 10; } catch (Exception e) { this.showCount = 20; } } public int getTotalPage() { if (totalResult % showCount == 0) totalPage = totalResult / showCount; else totalPage = totalResult / showCount + 1; return totalPage; } public void setTotalPage(int totalPage) { this.totalPage = totalPage; } public int getTotalResult() { return totalResult; } public void setTotalResult(int totalResult) { this.totalResult = totalResult; } public int getCurrentPage() { if (currentPage <= 0) currentPage = 1; if (currentPage > getTotalPage()) currentPage = getTotalPage(); return currentPage; } public void setCurrentPage(int currentPage) { this.currentPage = currentPage; } public int getShowCount() { return showCount; } public void setShowCount(int showCount) { this.showCount = showCount; } public int getCurrentResult() { currentResult = (getCurrentPage() - 1) * getShowCount(); if (currentResult < 0) currentResult = 0; return currentResult; } public void setCurrentResult(int currentResult) { this.currentResult = currentResult; } }
[ "1163646727@qq.com" ]
1163646727@qq.com
1afe0ca64fb13e23b839ac1c072b5478324a01d7
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
/aliyun-java-sdk-emr/src/main/java/com/aliyuncs/emr/transform/v20160408/DescribeScalingConfigItemV2ResponseUnmarshaller.java
16bbfac36eca5263aef950dc95245e449a7e5ea6
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk
a263fa08e261f12d45586d1b3ad8a6609bba0e91
e19239808ad2298d32dda77db29a6d809e4f7add
refs/heads/master
2023-09-03T12:28:09.765286
2023-09-01T09:03:00
2023-09-01T09:03:00
39,555,898
1,542
1,317
NOASSERTION
2023-09-14T07:27:05
2015-07-23T08:41:13
Java
UTF-8
Java
false
false
1,697
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.emr.transform.v20160408; import com.aliyuncs.emr.model.v20160408.DescribeScalingConfigItemV2Response; import com.aliyuncs.transform.UnmarshallerContext; public class DescribeScalingConfigItemV2ResponseUnmarshaller { public static DescribeScalingConfigItemV2Response unmarshall(DescribeScalingConfigItemV2Response describeScalingConfigItemV2Response, UnmarshallerContext _ctx) { describeScalingConfigItemV2Response.setRequestId(_ctx.stringValue("DescribeScalingConfigItemV2Response.RequestId")); describeScalingConfigItemV2Response.setConfigItemType(_ctx.stringValue("DescribeScalingConfigItemV2Response.ConfigItemType")); describeScalingConfigItemV2Response.setScalingGroupBizId(_ctx.stringValue("DescribeScalingConfigItemV2Response.ScalingGroupBizId")); describeScalingConfigItemV2Response.setScalingConfigItemBizId(_ctx.stringValue("DescribeScalingConfigItemV2Response.ScalingConfigItemBizId")); describeScalingConfigItemV2Response.setConfigItemInformation(_ctx.stringValue("DescribeScalingConfigItemV2Response.ConfigItemInformation")); return describeScalingConfigItemV2Response; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
fa27b84b4b73efdd43d94616bb09149d853d4ca9
fa3893cd5593cb0475e5a2308931a356c9bcab26
/src/org.xtuml.bp.ui.graphics/src/org/xtuml/bp/ui/graphics/layout/FixedTextLocator.java
4ece2602c04f37278fcf75cf7e2ba0cdbbc3fd8c
[ "Apache-2.0", "EPL-1.0" ]
permissive
leviathan747/bridgepoint
a2c13d615ff255eb64c8a4e21fcf1824f9eff3d5
cf7deed47d20290d422d4b4636e7486784d17c34
refs/heads/master
2023-08-04T11:05:10.679674
2023-07-06T19:10:37
2023-07-06T19:10:37
28,143,415
0
1
Apache-2.0
2023-05-08T13:26:39
2014-12-17T15:40:25
HTML
UTF-8
Java
false
false
3,450
java
//======================================================================== // //File: $RCSfile: FixedTextLocator.java,v $ //Version: $Revision: 1.5 $ //Modified: $Date: 2013/01/10 23:06:00 $ // //(c) Copyright 2005-2014 by Mentor Graphics 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 org.xtuml.bp.ui.graphics.layout; import org.eclipse.draw2d.Connection; import org.eclipse.draw2d.FigureUtilities; import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.Label; import org.eclipse.draw2d.Locator; import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.draw2d.geometry.Point; import org.xtuml.bp.ui.canvas.Direction_c; import org.xtuml.bp.ui.canvas.Gr_c; public class FixedTextLocator implements Locator { private boolean fIsEnd; private Connection fConnection; public FixedTextLocator(Connection connection, boolean isEnd) { fConnection = connection; fIsEnd = isEnd; } @Override public void relocate(IFigure target) { float angle = 0f; int text_x = 0; int text_y = 0; if (fIsEnd) { text_x = fConnection.getPoints().getLastPoint().x; text_y = fConnection.getPoints().getLastPoint().y; angle = Gr_c.Getangle(fConnection.getPoints().getLastPoint().x, fConnection.getPoints().getPoint( fConnection.getPoints().size() - 2).x, fConnection .getPoints().getLastPoint().y, fConnection .getPoints().getPoint( fConnection.getPoints().size() - 2).y); } else { text_x = fConnection.getPoints().getFirstPoint().x; text_y = fConnection.getPoints().getFirstPoint().y; angle = Gr_c.Getangle(fConnection.getPoints().getFirstPoint().x, fConnection.getPoints().getPoint(1).x, fConnection .getPoints().getFirstPoint().y, fConnection .getPoints().getPoint(1).y); } int direction = Gr_c.Getdirection(angle); int spacing = Gr_c.Getgraphicspacing() + 3; Label label = (Label) target; Dimension stringExtents = FigureUtilities.getStringExtents(label .getText(), label.getFont()); switch (direction) { case Direction_c.East: text_x = text_x + spacing; text_y = text_y - spacing - stringExtents.height; break; case Direction_c.South: text_x = text_x - spacing - stringExtents.width; text_y = text_y + spacing; break; case Direction_c.North: text_x = text_x - spacing - stringExtents.width; text_y = text_y - spacing - stringExtents.height; break; case Direction_c.West: text_x = text_x - spacing - stringExtents.width; text_y = text_y - spacing - stringExtents.height; break; default: break; } target.setSize(stringExtents); target.setLocation(new Point(text_x, text_y)); } }
[ "s.keith.brown@gmail.com" ]
s.keith.brown@gmail.com
bb5c1d7d71bb7c87dcd096d31a33668e3bea00fc
c885ef92397be9d54b87741f01557f61d3f794f3
/tests-without-trycatch/Gson-17/com.google.gson.DefaultDateTypeAdapter/BBC-F0-opt-70/8/com/google/gson/DefaultDateTypeAdapter_ESTest_scaffolding.java
45c24216a52b16e7f24bf7d2dfa4ad1f29d14e81
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
8,085
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Thu Oct 14 01:15:47 GMT 2021 */ package com.google.gson; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.junit.AfterClass; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class DefaultDateTypeAdapter_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "com.google.gson.DefaultDateTypeAdapter"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @AfterClass public static void clearEvoSuiteFramework(){ Sandbox.resetDefaultSecurityManager(); java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); setSystemProperties(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); java.lang.System.setProperty("user.dir", "/experiment"); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(DefaultDateTypeAdapter_ESTest_scaffolding.class.getClassLoader() , "com.google.gson.JsonParseException", "com.google.gson.stream.JsonReader$1", "com.google.gson.JsonObject", "com.google.gson.internal.bind.JsonTreeReader$1", "com.google.gson.TypeAdapter$1", "com.google.gson.internal.$Gson$Preconditions", "com.google.gson.JsonSyntaxException", "com.google.gson.TypeAdapter", "com.google.gson.internal.bind.JsonTreeWriter", "com.google.gson.stream.JsonReader", "com.google.gson.internal.bind.util.ISO8601Utils", "com.google.gson.JsonElement", "com.google.gson.stream.MalformedJsonException", "com.google.gson.stream.JsonToken", "com.google.gson.JsonArray", "com.google.gson.internal.bind.JsonTreeReader", "com.google.gson.internal.bind.JsonTreeWriter$1", "com.google.gson.internal.JsonReaderInternalAccess", "com.google.gson.JsonNull", "com.google.gson.JsonIOException", "com.google.gson.DefaultDateTypeAdapter", "com.google.gson.JsonPrimitive", "com.google.gson.stream.JsonWriter", "com.google.gson.internal.LazilyParsedNumber" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(DefaultDateTypeAdapter_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "com.google.gson.TypeAdapter", "com.google.gson.DefaultDateTypeAdapter", "com.google.gson.stream.JsonToken", "com.google.gson.internal.bind.util.ISO8601Utils", "com.google.gson.internal.JsonReaderInternalAccess", "com.google.gson.stream.JsonReader$1", "com.google.gson.stream.JsonReader", "com.google.gson.stream.JsonWriter", "com.google.gson.TypeAdapter$1", "com.google.gson.internal.bind.JsonTreeWriter$1", "com.google.gson.JsonElement", "com.google.gson.JsonPrimitive", "com.google.gson.internal.$Gson$Preconditions", "com.google.gson.internal.bind.JsonTreeWriter", "com.google.gson.JsonNull", "com.google.gson.stream.MalformedJsonException", "com.google.gson.internal.bind.JsonTreeReader$1", "com.google.gson.internal.bind.JsonTreeReader", "com.google.gson.JsonParseException", "com.google.gson.JsonArray", "com.google.gson.internal.Streams", "com.google.gson.internal.bind.TypeAdapters$6", "com.google.gson.internal.bind.TypeAdapters$32", "com.google.gson.internal.bind.TypeAdapters$5", "com.google.gson.internal.bind.TypeAdapters$7", "com.google.gson.internal.bind.TypeAdapters$8", "com.google.gson.internal.bind.TypeAdapters$33", "com.google.gson.internal.bind.TypeAdapters$9", "com.google.gson.internal.bind.TypeAdapters$10", "com.google.gson.internal.bind.TypeAdapters$11", "com.google.gson.internal.bind.TypeAdapters$1", "com.google.gson.internal.bind.TypeAdapters$2", "com.google.gson.internal.bind.TypeAdapters$3", "com.google.gson.internal.bind.TypeAdapters$12", "com.google.gson.internal.bind.TypeAdapters$13", "com.google.gson.internal.bind.TypeAdapters$14", "com.google.gson.internal.bind.TypeAdapters$15", "com.google.gson.internal.bind.TypeAdapters$16", "com.google.gson.internal.bind.TypeAdapters$17", "com.google.gson.internal.bind.TypeAdapters$18", "com.google.gson.internal.bind.TypeAdapters$19", "com.google.gson.internal.bind.TypeAdapters$20", "com.google.gson.internal.bind.TypeAdapters$21", "com.google.gson.internal.bind.TypeAdapters$22", "com.google.gson.internal.bind.TypeAdapters$23", "com.google.gson.internal.bind.TypeAdapters$24", "com.google.gson.internal.bind.TypeAdapters$35", "com.google.gson.internal.bind.TypeAdapters$25", "com.google.gson.internal.bind.TypeAdapters$4", "com.google.gson.internal.bind.TypeAdapters$26", "com.google.gson.internal.bind.TypeAdapters$27", "com.google.gson.internal.bind.TypeAdapters$34", "com.google.gson.internal.bind.TypeAdapters$28", "com.google.gson.internal.bind.TypeAdapters$29", "com.google.gson.internal.bind.TypeAdapters$30", "com.google.gson.internal.bind.TypeAdapters", "com.google.gson.JsonObject", "com.google.gson.internal.LinkedTreeMap$1", "com.google.gson.internal.LinkedTreeMap", "com.google.gson.internal.LinkedTreeMap$Node", "com.google.gson.internal.LinkedTreeMap$EntrySet", "com.google.gson.internal.LinkedTreeMap$LinkedTreeMapIterator", "com.google.gson.internal.LinkedTreeMap$EntrySet$1", "com.google.gson.JsonSyntaxException", "com.google.gson.internal.LazilyParsedNumber" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
6a8ffd0aaa87d491c707ced0fd61fc7344e2c27a
2bb0ab75288031a14a0494379e668c1c20d11540
/src/com/massivecraft/factions/entity/BoardColls.java
8ce013b6d6a2d78dd19fcf58e0a4d8ba970a9a36
[]
no_license
crazyskink25/Factions
9fbf6d2b42f229aef3a3c6e011d6131b95640650
cf03bd5b8a8bf65a0829a1c37421501ca74b2150
refs/heads/master
2021-01-16T17:48:31.178179
2013-04-29T14:29:10
2013-04-29T14:29:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,347
java
package com.massivecraft.factions.entity; import java.io.File; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.Map.Entry; import com.massivecraft.factions.Const; import com.massivecraft.factions.Factions; import com.massivecraft.factions.RelationParticipator; import com.massivecraft.factions.TerritoryAccess; import com.massivecraft.mcore.ps.PS; import com.massivecraft.mcore.ps.PSBuilder; import com.massivecraft.mcore.usys.Aspect; import com.massivecraft.mcore.util.DiscUtil; import com.massivecraft.mcore.xlib.gson.reflect.TypeToken; public class BoardColls extends XColls<BoardColl, Board> implements BoardInterface { // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // private static BoardColls i = new BoardColls(); public static BoardColls get() { return i; } // -------------------------------------------- // // OVERRIDE: COLLS // -------------------------------------------- // @Override public BoardColl createColl(String collName) { return new BoardColl(collName); } @Override public Aspect getAspect() { return Factions.get().getAspect(); } @Override public String getBasename() { return Const.COLLECTION_BASENAME_BOARD; } @Override public void init() { super.init(); this.migrate(); } // This method is for the 1.8.X --> 2.0.0 migration public void migrate() { // Create file objects File oldFile = new File(Factions.get().getDataFolder(), "board.json"); File newFile = new File(Factions.get().getDataFolder(), "board.json.migrated"); // Already migrated? if ( ! oldFile.exists()) return; // Read the file content through GSON. Type type = new TypeToken<Map<String,Map<String,TerritoryAccess>>>(){}.getType(); Map<String,Map<String,TerritoryAccess>> worldCoordIds = Factions.get().gson.fromJson(DiscUtil.readCatch(oldFile), type); // Set the data for (Entry<String,Map<String,TerritoryAccess>> entry : worldCoordIds.entrySet()) { String worldName = entry.getKey(); BoardColl boardColl = this.getForWorld(worldName); Board board = boardColl.get(worldName); for (Entry<String,TerritoryAccess> entry2 : entry.getValue().entrySet()) { String[] ChunkCoordParts = entry2.getKey().trim().split("[,\\s]+"); int chunkX = Integer.parseInt(ChunkCoordParts[0]); int chunkZ = Integer.parseInt(ChunkCoordParts[1]); PS ps = new PSBuilder().chunkX(chunkX).chunkZ(chunkZ).build(); TerritoryAccess territoryAccess = entry2.getValue(); board.setTerritoryAccessAt(ps, territoryAccess); } } // Mark as migrated oldFile.renameTo(newFile); } // -------------------------------------------- // // OVERRIDE: BOARD // -------------------------------------------- // @Override public TerritoryAccess getTerritoryAccessAt(PS ps) { BoardColl coll = this.getForWorld(ps.getWorld()); if (coll == null) return null; return coll.getTerritoryAccessAt(ps); } @Override public Faction getFactionAt(PS ps) { BoardColl coll = this.getForWorld(ps.getWorld()); if (coll == null) return null; return coll.getFactionAt(ps); } // SET @Override public void setTerritoryAccessAt(PS ps, TerritoryAccess territoryAccess) { BoardColl coll = this.getForWorld(ps.getWorld()); if (coll == null) return; coll.setTerritoryAccessAt(ps, territoryAccess); } @Override public void setFactionAt(PS ps, Faction faction) { BoardColl coll = this.getForWorld(ps.getWorld()); if (coll == null) return; coll.setFactionAt(ps, faction); } // REMOVE @Override public void removeAt(PS ps) { BoardColl coll = this.getForWorld(ps.getWorld()); if (coll == null) return; coll.removeAt(ps); } @Override public void removeAll(Faction faction) { for (BoardColl coll : this.getColls()) { coll.removeAll(faction); } } @Override public void clean() { for (BoardColl coll : this.getColls()) { coll.clean(); } } // CHUNKS @Override public Set<PS> getChunks(Faction faction) { Set<PS> ret = new HashSet<PS>(); for (BoardColl coll : this.getColls()) { ret.addAll(coll.getChunks(faction)); } return ret; } // COUNT @Override public int getCount(Faction faction) { int ret = 0; for (BoardColl coll : this.getColls()) { ret += coll.getCount(faction); } return ret; } // NEARBY DETECTION @Override public boolean isBorderPs(PS ps) { BoardColl coll = this.getForWorld(ps.getWorld()); if (coll == null) return false; return coll.isBorderPs(ps); } @Override public boolean isConnectedPs(PS ps, Faction faction) { BoardColl coll = this.getForWorld(ps.getWorld()); if (coll == null) return false; return coll.isConnectedPs(ps, faction); } // MAP GENERATION @Override public ArrayList<String> getMap(RelationParticipator observer, PS centerPs, double inDegrees) { BoardColl coll = this.getForWorld(centerPs.getWorld()); if (coll == null) return null; return coll.getMap(observer, centerPs, inDegrees); } }
[ "olof@sylt.nu" ]
olof@sylt.nu
ef2f276685d60eca89aab458b80190ddc6a5526c
78a9a4aadf6758d38754c0a398fe0c3659731a76
/src/main/java/com/nirav/demo/ApplicationWebXml.java
c80cde367da6d8df1577df3dd1aa19b3d95a4613
[]
no_license
nrvmodi/jhipster-sample-application
ff44d97f6096709ce909ccec0bfa2c094d0d3c8e
0daa12e9a4ed6a260d5045275af99041f5c7a6b4
refs/heads/main
2023-02-07T10:29:58.233552
2021-01-01T11:24:26
2021-01-01T11:24:26
325,965,600
0
0
null
null
null
null
UTF-8
Java
false
false
813
java
package com.nirav.demo; import io.github.jhipster.config.DefaultProfileUtil; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; /** * This is a helper Java class that provides an alternative to creating a {@code web.xml}. * This will be invoked only when the application is deployed to a Servlet container like Tomcat, JBoss etc. */ public class ApplicationWebXml extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { // set a default to use when no profile is configured. DefaultProfileUtil.addDefaultProfile(application.application()); return application.sources(SpringJibDemoApp.class); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
c531b982e733aaf7dbd2a7002a96de73a3fb69d4
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.browser-base/sources/org/chromium/chrome/browser/notifications/settings/NotificationSettings.java
7a4d95d23132d716c3e7f55a8ace9f2bcf5631f9
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
1,856
java
package org.chromium.chrome.browser.notifications.settings; import J.N; import android.os.Bundle; import androidx.preference.Preference; import com.oculus.browser.R; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.components.browser_ui.settings.ChromeSwitchPreference; /* compiled from: chromium-OculusBrowser.apk-stable-281887347 */ public class NotificationSettings extends AbstractC2324eF0 { public static final /* synthetic */ int G0 = 0; public Preference H0; public ChromeSwitchPreference I0; @Override // defpackage.AbstractComponentCallbacksC3550lS public void B0() { boolean z = true; this.i0 = true; if (this.I0 != null) { boolean a2 = AbstractC5056uF0.a(); boolean d = NU0.f8549a.d("prefetch_notification_enabled", true); ChromeSwitchPreference chromeSwitchPreference = this.I0; if (!a2 || !d) { z = false; } chromeSwitchPreference.a0(z); this.I0.K(a2); this.I0.S(a2 ? R.string.f56240_resource_name_obfuscated_RES_2131952941 : R.string.f56250_resource_name_obfuscated_RES_2131952942); } this.H0.S(AbstractC1154Sy.b(6, N.MJSt3Ocq(Profile.b(), 6))); } @Override // defpackage.AbstractC2324eF0 public void g1(Bundle bundle, String str) { AbstractC2870hT0.a(this, R.xml.f76310_resource_name_obfuscated_RES_2132213787); u().setTitle(R.string.f59140_resource_name_obfuscated_RES_2131953231); ChromeSwitchPreference chromeSwitchPreference = (ChromeSwitchPreference) f1("content_suggestions"); this.I0 = chromeSwitchPreference; chromeSwitchPreference.f9480J = new C1381Wp0(); Preference f1 = f1("from_websites"); this.H0 = f1; f1.j().putString("category", QX0.p(14)); } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
6f27817a844cbc79d1ca4358658a123538d5f109
9db3b3baec2fdc7b93bd268595d127996b28e44b
/src/main/java/org/web3j/protocol/http/HttpService.java
a48d3186d4697556003366140e9d8b849de1768f
[ "Apache-2.0" ]
permissive
h2mch/web3j
9f2831f15ca0f499e9401976619036e1ffd38efd
3c6f609c7ce43c3c8655fac436ed487aa787e5b5
refs/heads/master
2023-08-06T21:19:38.756059
2017-05-14T22:30:43
2017-05-14T22:30:43
75,410,621
0
0
NOASSERTION
2023-08-01T22:44:27
2016-12-02T16:08:05
Java
UTF-8
Java
false
false
2,900
java
package org.web3j.protocol.http; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.http.Header; import org.apache.http.HttpEntity; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.ResponseHandler; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.ByteArrayEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.message.BasicHeader; import org.web3j.protocol.Service; import org.web3j.protocol.core.Request; import org.web3j.protocol.core.Response; /** * HTTP implementation of our services API. */ public class HttpService extends Service { public static final String DEFAULT_URL = "http://localhost:8545/"; private CloseableHttpClient httpClient; private final String url; public HttpService(String url, CloseableHttpClient httpClient) { this.url = url; this.httpClient = httpClient; } public HttpService(String url) { this(url, HttpClients.custom().setConnectionManagerShared(true).build()); } public HttpService() { this(DEFAULT_URL); } protected void setHttpClient(CloseableHttpClient httpClient) { this.httpClient = httpClient; } @Override public <T extends Response> T send( Request request, Class<T> responseType) throws IOException { byte[] payload = objectMapper.writeValueAsBytes(request); HttpPost httpPost = new HttpPost(this.url); httpPost.setEntity(new ByteArrayEntity(payload)); Header[] headers = buildHeaders(); httpPost.setHeaders(headers); ResponseHandler<T> responseHandler = getResponseHandler(responseType); try { return httpClient.execute(httpPost, responseHandler); } finally { httpClient.close(); } } private Header[] buildHeaders() { List<Header> headers = new ArrayList<>(); headers.add(new BasicHeader("Content-Type", "application/json; charset=UTF-8")); addHeaders(headers); return headers.toArray(new Header[0]); } protected void addHeaders(List<Header> headers) { } public <T extends Response> ResponseHandler<T> getResponseHandler(Class<T> type) { return response -> { int status = response.getStatusLine().getStatusCode(); if (status >= 200 && status < 300) { HttpEntity entity = response.getEntity(); if (entity != null) { return objectMapper.readValue(response.getEntity().getContent(), type); } else { return null; } } else { throw new ClientProtocolException("Unexpected response status: " + status); } }; } }
[ "conor10@gmail.com" ]
conor10@gmail.com
3ba2d2ae714fd2ace48b425f1cbf0e54c969196c
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/iRobot_com.irobot.home/javafiles/com/irobot/core/PushNotificationPayloadUtils.java
1d20cb50f8f5b77a57ddb84c7a1d18c907d2f180
[ "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
3,112
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 com.irobot.core; import java.util.concurrent.atomic.AtomicBoolean; // Referenced classes of package com.irobot.core: // AssetId public abstract class PushNotificationPayloadUtils { private static final class CppProxy extends PushNotificationPayloadUtils { private native void nativeDestroy(long l); public void destroy() { if(!destroyed.getAndSet(true)) //* 0 0:aload_0 //* 1 1:getfield #21 <Field AtomicBoolean destroyed> //* 2 4:iconst_1 //* 3 5:invokevirtual #37 <Method boolean AtomicBoolean.getAndSet(boolean)> //* 4 8:ifne 19 nativeDestroy(nativeRef); // 5 11:aload_0 // 6 12:aload_0 // 7 13:getfield #30 <Field long nativeRef> // 8 16:invokespecial #39 <Method void nativeDestroy(long)> // 9 19:return } protected void finalize() { destroy(); // 0 0:aload_0 // 1 1:invokevirtual #42 <Method void destroy()> ((Object)this).finalize(); // 2 4:aload_0 // 3 5:invokespecial #46 <Method void Object.finalize()> // 4 8:return } private final AtomicBoolean destroyed = new AtomicBoolean(false); private final long nativeRef; private CppProxy(long l) { // 0 0:aload_0 // 1 1:invokespecial #14 <Method void PushNotificationPayloadUtils()> // 2 4:aload_0 // 3 5:new #16 <Class AtomicBoolean> // 4 8:dup // 5 9:iconst_0 // 6 10:invokespecial #19 <Method void AtomicBoolean(boolean)> // 7 13:putfield #21 <Field AtomicBoolean destroyed> if(l == 0L) //* 8 16:lload_1 //* 9 17:lconst_0 //* 10 18:lcmp //* 11 19:ifne 32 { throw new RuntimeException("nativeRef is zero"); // 12 22:new #23 <Class RuntimeException> // 13 25:dup // 14 26:ldc1 #25 <String "nativeRef is zero"> // 15 28:invokespecial #28 <Method void RuntimeException(String)> // 16 31:athrow } else { nativeRef = l; // 17 32:aload_0 // 18 33:lload_1 // 19 34:putfield #30 <Field long nativeRef> return; // 20 37:return } } } public PushNotificationPayloadUtils() { // 0 0:aload_0 // 1 1:invokespecial #11 <Method void Object()> // 2 4:return } public static native AssetId assetId(String s); public static native int errorCode(String s); public static native int missionId(String s); public static native String persistentMapId(String s); public static native String persistentMapVersionId(String s); public static native String sku(String s); public static native int stateCode(String s); }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
5702aedd39fd0c66178a24a04480a807b943da4c
73308ecf567af9e5f4ef8d5ff10f5e9a71e81709
/jaso83310/src/main/java/com/example/jaso83310/UserService.java
30450c55ff1d7045434e3b2cb0996ef4410037ff
[]
no_license
yukihane/stackoverflow-qa
bfaf371e3c61919492e2084ed4c65f33323d7231
ba5e6a0d51f5ecfa80bb149456adea49de1bf6fb
refs/heads/main
2023-08-03T06:54:32.086724
2023-07-26T20:02:07
2023-07-26T20:02:07
194,699,870
3
3
null
2023-03-02T23:37:45
2019-07-01T15:34:08
Java
UTF-8
Java
false
false
1,116
java
package com.example.jaso83310; import java.util.List; import java.util.Optional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @Service @Transactional public class UserService { @Autowired UserRepository userRepository; public List<User> findBynameLike(String name){ return userRepository.findBynameLike(name + "%"); } public List<User> findAll() { return userRepository.findAll(); } public void insert(User user) { userRepository.save(user); } public void update(User user) { userRepository.save(user); } public void delete(String id) { userRepository.deleteById(id); } public Optional<User> selectById(String id) { return userRepository.findById(id); } public User Login(String id,String pass) { User u = userRepository.getById(id); if (null != u) { if (u.getPass().equals(pass)) { return u; } } else { } return null; } }
[ "yukihane.feather@gmail.com" ]
yukihane.feather@gmail.com
175e90d0cf6d30b0f67415a5dddfc81b6d5086fb
b9bea8ffd1cbe88fe3d84cfd8b0c4dae6faf43e5
/graphql-maven-plugin-logic/src/main/resources/templates/server_WebSocketConfig.vm.java
559c517de55bba6640468fe6ad8dc1a652172d74
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
graphql-java-generator/graphql-maven-plugin-project
5638a108449461fe5a9f0bc72b1b8f84c271388e
5d33ccc266383be06bd4455406f6032b42926f6f
refs/heads/master_2.x
2023-08-25T10:14:13.419820
2023-08-19T16:13:55
2023-08-19T17:15:32
176,287,522
107
49
MIT
2023-08-15T17:45:36
2019-03-18T13:05:23
Java
UTF-8
Java
false
false
2,198
java
/** Generated by the default template from graphql-java-generator */ package ${packageUtilName}; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.socket.config.annotation.EnableWebSocket; import org.springframework.web.socket.config.annotation.WebSocketConfigurer; import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry; import org.springframework.web.socket.server.standard.ServletServerContainerFactoryBean; import com.graphql_java_generator.server.util.GraphQlWebSocketHandler; import graphql.schema.GraphQLSchema; @Configuration @EnableWebSocket @SuppressWarnings("unused") public class WebSocketConfig implements WebSocketConfigurer { protected Logger logger = LoggerFactory.getLogger(WebSocketConfig.class); private final GraphQLSchema graphQLSchema; private final GraphQLWiring graphQLWiring; // This will search to the graphql.url property, in the application.properties or application.yml file. // IT defaults to "graphql" @Value("/${dollar}{graphql.url:graphql}") private String url; @Autowired public WebSocketConfig(GraphQLWiring graphQLWiring, GraphQLSchema graphQLSchema) { this.graphQLWiring = graphQLWiring; this.graphQLSchema = graphQLSchema; } @Bean public ServletServerContainerFactoryBean createWebSocketContainer() { logger.trace("Creating ServletServerContainerFactoryBean"); ServletServerContainerFactoryBean container = new ServletServerContainerFactoryBean(); // container.setMaxTextMessageBufferSize(8192); // container.setMaxBinaryMessageBufferSize(8192); return container; } @Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { logger.debug("Registering WebSocketHandler for URL {}", url); // registry.addHandler(new WebSocketHandler(graphQLWiring, graphQLSchema), url).setAllowedOrigins("*"); registry.addHandler(new GraphQlWebSocketHandler(graphQLSchema), url).setAllowedOrigins("*"); } }
[ "etienne_sf@users.sf.net" ]
etienne_sf@users.sf.net
5c2bc0736dac8c9daa78ac1ff01f3e5fcb6bd532
287dbb340765a05fac6047e4fa9e7d6277696596
/src/main/java/me/twister915/punishments/model/storage/mongodb/MongoConnection.java
d4237e5bd532c2bf4bd1c6e2c1794d7b24ef64b8
[ "Apache-2.0" ]
permissive
Twister915/TwistedPunishments
d807329eb0213f433257266f44b1c3d31464e041
048757098c75d44c6da48fc51d5bd38ee87d7121
refs/heads/master
2021-01-20T09:12:51.766304
2014-07-25T22:04:44
2014-07-25T22:04:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,989
java
/****************************************************************************** Copyright 2014 Joey Sacchini * * 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 me.twister915.punishments.model.storage.mongodb; import com.mongodb.DB; import lombok.Data; import me.twister915.punishments.model.PunishException; import me.twister915.punishments.model.Punishment; import me.twister915.punishments.model.PunishmentFactory; import me.twister915.punishments.model.manager.BaseStorage; import me.twister915.punishments.model.storage.DBConnection; @Data public final class MongoConnection implements DBConnection { final String prefix; final DB database; @Override public <P extends Punishment> BaseStorage<P> getStorageFor(Class<P> punishmentType, PunishmentFactory<P> factory) throws PunishException { return new MongoStorage<>(punishmentType, factory, this); } @Override public void onDisable() { } }
[ "joey.sacchini264@gmail.com" ]
joey.sacchini264@gmail.com
d588d57b2b41a9ac5afbe1ece88843bbeb173be9
83e81c25b1f74f88ed0f723afc5d3f83e7d05da8
/core/java/android/text/style/StrikethroughSpan.java
94560065c3bbfafc42a0f39591d618a11c2ede3b
[ "Apache-2.0", "LicenseRef-scancode-unicode" ]
permissive
Ankits-lab/frameworks_base
8a63f39a79965c87a84e80550926327dcafb40b7
150a9240e5a11cd5ebc9bb0832ce30e9c23f376a
refs/heads/main
2023-02-06T03:57:44.893590
2020-11-14T09:13:40
2020-11-14T09:13:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,310
java
/* * Copyright (C) 2006 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.text.style; import android.annotation.NonNull; import android.os.Parcel; import android.text.ParcelableSpan; import android.text.TextPaint; import android.text.TextUtils; /** * A span that strikes through the text it's attached to. * <p> * The span can be used like this: * <pre>{@code * SpannableString string = new SpannableString("Text with strikethrough span"); *string.setSpan(new StrikethroughSpan(), 10, 23, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);}</pre> * <img src="{@docRoot}reference/android/images/text/style/strikethroughspan.png" /> * <figcaption>Strikethrough text.</figcaption> */ public class StrikethroughSpan extends CharacterStyle implements UpdateAppearance, ParcelableSpan { /** * Creates a {@link StrikethroughSpan}. */ public StrikethroughSpan() { } /** * Creates a {@link StrikethroughSpan} from a parcel. */ public StrikethroughSpan(@NonNull Parcel src) { } @Override public int getSpanTypeId() { return getSpanTypeIdInternal(); } /** @hide */ @Override public int getSpanTypeIdInternal() { return TextUtils.STRIKETHROUGH_SPAN; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(@NonNull Parcel dest, int flags) { writeToParcelInternal(dest, flags); } /** @hide */ @Override public void writeToParcelInternal(@NonNull Parcel dest, int flags) { } @Override public void updateDrawState(@NonNull TextPaint ds) { ds.setStrikeThruText(true); } }
[ "keneankit01@gmail.com" ]
keneankit01@gmail.com
aad13afc53e72d847cf1038150655a176bf621bd
d5f09c7b0e954cd20dd613af600afd91b039c48a
/sources/com/amap/api/mapcore2d/bx.java
d1061737c6c230ebda0d382630863ffd784f2659
[]
no_license
t0HiiBwn/CoolapkRelease
af5e00c701bf82c4e90b1033f5c5f9dc8526f4b3
a6a2b03e32cde0e5163016e0078391271a8d33ab
refs/heads/main
2022-07-29T23:28:35.867734
2021-03-26T11:41:18
2021-03-26T11:41:18
345,290,891
5
2
null
null
null
null
UTF-8
Java
false
false
339
java
package com.amap.api.mapcore2d; import android.graphics.PointF; import java.util.ArrayList; import java.util.List; /* compiled from: TrafSegment */ class bx { private int a; private List<PointF> b = new ArrayList(); public List<PointF> a() { return this.b; } public int b() { return this.a; } }
[ "test@gmail.com" ]
test@gmail.com
71a63087ead793a48a740a9f512303418d71f1e8
b2b5185631ddf3f582f78065247caa8ff85919c9
/tags/release-2.1/src/DVN-EJB/src/java/edu/harvard/iq/dvn/core/study/StudyServiceLocal.java
2338f6023fa34e10cfe120384c90e0b70900b1b4
[]
no_license
dvn/dvn-svn-import-test5
bd606b663c8a061278b4164b9b21078667c1675e
09ef67d666fbd8860b8c233bedf2529f39c59bbd
refs/heads/master
2016-09-06T14:43:08.202121
2013-01-04T20:00:13
2013-01-04T20:00:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,792
java
/* * Dataverse Network - A web application to distribute, share and analyze quantitative data. * Copyright (C) 2007 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program; if not, see http://www.gnu.org/licenses * or write to the Free Software Foundation,Inc., 51 Franklin Street, * Fifth Floor, Boston, MA 02110-1301 USA */ package edu.harvard.iq.dvn.core.study; import edu.harvard.iq.dvn.core.admin.VDCUser; import edu.harvard.iq.dvn.core.vdc.VDC; import java.io.File; import java.io.IOException; import java.sql.Timestamp; import java.util.Date; import java.util.List; import java.util.Map; import javax.ejb.Local; import javax.xml.bind.JAXBException; /** * This is the business interface for NewSession enterprise bean. */ @Local public interface StudyServiceLocal extends java.io.Serializable { /** * Add given Study to persistent storage. */ // Comments for breaking this into multiple classes // // 1= Retrieval // 2= Update // 3= Import/Export // 4= File related // ?= not sure if this is needed // x= no longer needed //? public void exportStudyFilesToLegacySystem(String lastUpdateTime, String authority) throws IOException, JAXBException; // comment out - not used public void addStudy(Study study); // 1 public Study getStudy(Long studyId); // 1 public Study getStudyByGlobalId(String globalId); // 1 (new to this version) public StudyVersion getStudyVersion(String globalId, Long versionNumber); public StudyVersion getStudyVersion(Long studyId, Long versionNumber); public StudyVersion getStudyVersionById(Long versionId); //1 public Study getStudyByHarvestInfo(VDC vdc, String harvestIdentifier); //1 public Study getStudyForSearch(Long studyId, Map studyFields); //2 public void updateStudy(Study study); public void updateStudyVersion(StudyVersion studyVersion); //2 public void deleteStudy(Long studyId); //2 public void deleteStudyInNewTransaction(Long studyId, boolean deleteFromIndex); //2 public void deleteStudyList(List<Long> studyIds); //? public List getStudies(); //1 public List<Long> getAllNonHarvestedStudyIds(); //1 java.util.List getOrderedStudies(List studyIdList, String orderBy); //? java.util.List getRecentStudies(Long vdcId, int numResults); //?1 public List getDvOrderedStudyIds(Long vdcId, String orderBy, boolean ascending ); //?1 public List getDvOrderedStudyIdsByCreator(Long vdcId, Long creatorId, String orderBy, boolean ascending ); //4 public void incrementNumberOfDownloads(Long studyFileId, Long currentVDCId); //4 public void incrementNumberOfDownloads(Long studyFileId, Long currentVDCId, Date lastDownloadTime); //4 public RemoteAccessAuth lookupRemoteAuthByHost(String remoteHost); //4 public List<DataFileFormatType> getDataFileFormatTypes(); //2 String generateStudyIdSequence(String protocol, String authority); //2 boolean isUniqueStudyId(String userStudyId,String protocol,String authority); //4 java.lang.String generateFileSystemNameSequence(); //4 boolean isUniqueFileSystemName(String fileSystemName); //2 List<StudyLock> getStudyLocks(); //2 void removeStudyLock(Long studyId); //2 void addStudyLock(Long studyId, Long userId, String detail); //2 void deleteDataVariables(Long dataTableId); //2 edu.harvard.iq.dvn.core.study.Study saveStudyVersion(StudyVersion studyVersion, Long userId); //3 edu.harvard.iq.dvn.core.study.Study importHarvestStudy(File xmlFile, Long vdcId, Long userId, String harvestIdentifier); //3 edu.harvard.iq.dvn.core.study.Study importStudy(File xmlFile, Long harvestFormatTypeId, Long vdcId, Long userId); //3 edu.harvard.iq.dvn.core.study.Study importStudy(File xmlFile, Long harvestFormatTypeId, Long vdcId, Long userId, List<StudyFileEditBean> filesToUpload); //3 edu.harvard.iq.dvn.core.study.Study importStudy(File xmlFile, Long harvestFormatTypeId, Long vdcId, Long userId, String harvestIdentifier, List<StudyFileEditBean> filesToUpload); //1 List getVisibleStudies(List studyIds, Long vdcId); //1 List getViewableStudies(List<Long> studyIds); //1 List getViewableStudies(List<Long> studyIds, Long userId, Long ipUserGroupId, Long vdcId); //3 List getStudyIdsForExport(); //? public List<Long> getAllStudyIds(); //3 public void exportStudy(Long studyId); public void exportStudy(Study study); public void exportStudyToFormat(Long studyId, String exportFormat); public void exportStudyToFormat(Study study, String exportFormat); public void exportUpdatedStudies(); public void exportStudies(List<Long> studyIds); public void exportStudies(List<Long> studyIds, String exportFormat); //2 public boolean isValidStudyIdString(String studyId); public void setIndexTime(Long studyId, Date indexTime); public Timestamp getLastUpdatedTime(Long vdcId); //1 public long getStudyDownloadCount(Long studyId); public Long getActivityCount(Long vdcId); public Long getTotalActivityCount(); //2 public void setReadyForReview(Long studyId); public void setReadyForReview(Long studyId, String versionNote); public void setReadyForReview(StudyVersion sv); public void saveVersionNote(Long studyId, Long versionNumber, String newVersionNote); public void saveVersionNote(Long studyVersionId, String newVersionNote); public void setReleased(Long studyId); public void setReleased(Long studyId, String versionNote); public void destroyWorkingCopyVersion(Long studyVersionId); public void deaccessionStudy(StudyVersion studyVersion); public List getDvOrderedStudyVersionIds(Long vdcId, String orderBy, boolean ascending); public List getDvOrderedStudyVersionIdsByContributor(Long vdcId, Long contributorId, String orderBy, boolean ascending); public List getAllStudyVersionIdsByContributor(Long contributorId, String orderBy, boolean ascending); }
[ "ekraffmiller@hmdc.harvard.edu" ]
ekraffmiller@hmdc.harvard.edu
bbbf43e5e528ae7f882ad5be2a2cfd4abd5200dd
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/26/26_560ec3b9c3985ca3ce5536b74b21e5c6a781b692/UIBean/26_560ec3b9c3985ca3ce5536b74b21e5c6a781b692_UIBean_t.java
fb4f53740ce65d6d17c2ef7d00fb0d04c41dc48d
[]
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,648
java
/* Copyright c 2005-2012. * Licensed under GNU LESSER General Public License, Version 3. * http://www.gnu.org/licenses */ package org.beangle.struts2.view.component; import java.io.Writer; import java.text.MessageFormat; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.apache.struts2.ServletActionContext; import org.beangle.commons.lang.Chars; import org.beangle.commons.lang.Strings; import org.beangle.struts2.util.TextResourceHelper; import org.beangle.struts2.view.UIIdGenerator; import org.beangle.struts2.view.template.TemplateEngine; import org.beangle.struts2.view.template.Theme; import org.beangle.struts2.view.template.ThemeStack; import com.opensymphony.xwork2.ActionContext; import com.opensymphony.xwork2.inject.Container; import com.opensymphony.xwork2.util.ValueStack; /** * @author chaostone */ public abstract class UIBean extends Component { protected String id; protected Theme theme; public UIBean(ValueStack stack) { super(stack); } protected void evaluateParams() { } @Override public boolean end(Writer writer, String body) { evaluateParams(); try { mergeTemplate(writer); } catch (Exception e) { throw new RuntimeException(e); } popComponentStack(); return false; } protected void mergeTemplate(Writer writer) throws Exception { TemplateEngine engine = getContainer().getInstance(TemplateEngine.class); engine.render(getTheme().getTemplatePath(getClass(), engine.getSuffix()), stack, writer, this); } /** * 将所有额外参数链接起来 * * @return 空格开始 空格相隔的参数字符串 */ public String getParameterString() { StringBuilder sb = new StringBuilder(parameters.size() * 10); for (Map.Entry<String, Object> entry : parameters.entrySet()) { String key = entry.getKey(); if ("cssClass".equals(key)) key = "class"; sb.append(" ").append(key).append("=\"").append(entry.getValue().toString()).append("\""); } return sb.toString(); } public String getId() { return id; } public void setId(String id) { this.id = id; } protected Theme getTheme() { if (null == theme) { ThemeStack themestack = (ThemeStack) stack.getContext().get(Theme.THEME_STACK); if (null != themestack) theme = themestack.peek(); if (null == theme) theme = (Theme) stack.getContext().get(Theme.THEME); return theme; } else { return theme; } } public void setTheme(String theme) { this.theme = Theme.getTheme(theme); } /** * 获得对应的国际化信息 * * @param text * @return 当第一个字符不是字母或者不包含.或者包含空格的均返回原有字符串 */ protected String getText(String text) { return getText(text, text); } protected String getText(String text, String defaultText) { if (Strings.isEmpty(text)) return defaultText; if (!Chars.isAsciiAlpha(text.charAt(0))) return defaultText; if (-1 == text.indexOf('.') || -1 < text.indexOf(' ')) { return defaultText; } else { // long start = System.currentTimeMillis(); String msg = TextResourceHelper.getText(text, defaultText, stack); // System.out.println("I18n:" + text + "->" + msg + " use :" + (System.currentTimeMillis() - // start)); return msg; } } protected HttpServletRequest getRequest() { return (HttpServletRequest) stack.getContext().get(ServletActionContext.HTTP_REQUEST); } protected String getRequestURI() { return getRequest().getRequestURI(); } protected String getRequestParameter(String name) { return getRequest().getParameter(name); } private static final String Number_Fmt = "{0,number,#.##}"; protected Object getValue(Object obj, String property) { stack.push(obj); try { Object value = stack.findValue(property); if (value instanceof Number) { return MessageFormat.format(Number_Fmt, value); } return value; } finally { stack.pop(); } } protected Container getContainer() { return (Container) stack.getContext().get(ActionContext.CONTAINER); } protected String render(String uri) { return getContainer().getInstance(ActionUrlRender.class).render(getRequestURI(), uri); } protected void generateIdIfEmpty() { if (Strings.isEmpty(id)) { id = ((UIIdGenerator) stack.getContext().get(UIIdGenerator.GENERATOR)).generate(getClass()); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
3f26cea8fc39c874afcd4e4919fe70c44c8dce88
7a2c91813117a8d949571521510895ee53daad49
/src/main/java/com/alipay/api/response/AlipayEbppIndustryOrderCreateResponse.java
636465ee3c41118a4759df7f8d34cbc977fa0f95
[ "Apache-2.0" ]
permissive
dut3062796s/alipay-sdk-java-all
eb5afb5b570fb0deb40d8c960b85a01d13506568
559180f4c370f7fcfef67a1c559768d11475c745
refs/heads/master
2020-07-03T21:00:06.124387
2019-06-23T01:13:43
2019-06-23T01:13:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,236
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.ebpp.industry.order.create response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class AlipayEbppIndustryOrderCreateResponse extends AlipayResponse { private static final long serialVersionUID = 5317912841684819385L; /** * 扩展属性,json串(key-value对) */ @ApiField("extend_field") private String extendField; /** * 支付宝的业务订单号,具有唯一性。 */ @ApiField("order_no") private String orderNo; /** * 输出机构的业务流水号,需要保证唯一性。 */ @ApiField("out_order_no") private String outOrderNo; public void setExtendField(String extendField) { this.extendField = extendField; } public String getExtendField( ) { return this.extendField; } public void setOrderNo(String orderNo) { this.orderNo = orderNo; } public String getOrderNo( ) { return this.orderNo; } public void setOutOrderNo(String outOrderNo) { this.outOrderNo = outOrderNo; } public String getOutOrderNo( ) { return this.outOrderNo; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
4d594036db539a2f671178d6c5900b1e37b87e52
4ae7eaeef9dacf859188a8851824e4b69587abcd
/app/src/main/java/com/sdxxtop/zhidian/entity/AutoLoginBean.java
0cf497dfc339d5ac84b920eaf935a02307895a77
[]
no_license
ZhouSilverBullet/zhidian.android
fc901e30549c8fdbb3b7f66082b09ad06d972dc2
c8a17eb43cf9673cf8a0addfc6ea32ce0b4995c5
refs/heads/master
2020-03-22T11:10:34.854866
2018-09-03T11:33:21
2018-09-03T11:33:21
139,953,149
0
0
null
null
null
null
UTF-8
Java
false
false
2,152
java
package com.sdxxtop.zhidian.entity; /** * 作者:CaiCM * 日期:2018/3/22 时间:16:00 * 邮箱:15010104100@163.com * 描述:自动登录实体 */ public class AutoLoginBean { /** * code : 200 * msg : 成功 * data : {"userid":50000021,"auto_token":"2B8454948396505EB3220388A1A14D86","company_id":"100000","expire_time":"1521708027"} */ private int code; private String msg; private DataEntity data; public int getCode() { return code; } public void setCode(int code) { this.code = code; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public DataEntity getData() { return data; } public void setData(DataEntity data) { this.data = data; } public static class DataEntity { /** * userid : 50000021 * auto_token : 2B8454948396505EB3220388A1A14D86 * company_id : 100000 * expire_time : 1521708027 */ private int userid; private String auto_token; private String company_id; private String expire_time; public int getUserid() { return userid; } public void setUserid(int userid) { this.userid = userid; } public String getAuto_token() { return auto_token; } public void setAuto_token(String auto_token) { this.auto_token = auto_token; } public String getCompany_id() { return company_id; } public void setCompany_id(String company_id) { this.company_id = company_id; } public String getExpire_time() { return expire_time; } public void setExpire_time(String expire_time) { this.expire_time = expire_time; } } @Override public String toString() { return "AutoLoginBean{" + "code=" + code + ", msg='" + msg + '\'' + ", data=" + data + '}'; } }
[ "zhousaito@163.com" ]
zhousaito@163.com
20948d800097dd5e4a5f0b59dbe4b9d39f17bd45
3b481b302b02edf57b816acac9e5ff3b7ec602e2
/src/dfy.java
3a27c91f2a474884f4a10c121de336f48fc7ebfb
[]
no_license
reverseengineeringer/com.twitter.android
53338ae009b2b6aa79551a8273875ec3728eda99
f834eee04284d773ccfcd05487021200de30bd1e
refs/heads/master
2021-04-15T04:35:06.232782
2016-07-21T03:51:19
2016-07-21T03:51:19
63,835,046
1
1
null
null
null
null
UTF-8
Java
false
false
2,245
java
import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import rx.ao; import rx.exceptions.e; public final class dfy implements ao { private Set<ao> a; private volatile boolean b; private static void a(Collection<ao> paramCollection) { if (paramCollection == null) { return; } ao localao = null; Iterator localIterator = paramCollection.iterator(); paramCollection = localao; for (;;) { if (!localIterator.hasNext()) { break label68; } localao = (ao)localIterator.next(); try { localao.Q_(); } catch (Throwable localThrowable) { if (paramCollection != null) { break label73; } } } paramCollection = new ArrayList(); label68: label73: for (;;) { paramCollection.add(localThrowable); break; e.a(paramCollection); return; } } public void Q_() { if (!b) { try { if (b) { return; } b = true; Set localSet = a; a = null; a(localSet); return; } finally {} } } public void a(ao paramao) { if (paramao.b()) { return; } if (!b) { try { if (!b) { if (a == null) { a = new HashSet(4); } a.add(paramao); return; } } finally {} } paramao.Q_(); } public void b(ao paramao) { if (!b) { try { if ((b) || (a == null)) { return; } boolean bool = a.remove(paramao); if (bool) { paramao.Q_(); return; } } finally {} } } public boolean b() { return b; } public void c() { if (!b) { try { if ((b) || (a == null)) { return; } Set localSet = a; a = null; a(localSet); return; } finally {} } } } /* Location: * Qualified Name: dfy * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com