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
11465cb6541057486aa8448074bfe26e5a97e025
836234be97139b93e1d459a4053c54bec728accf
/app/src/main/java/com/tdr/citycontrolpolice/adapter/CzfDeviceAdapter.java
74f74291f499bef218496c7bbb34da4f04a4ea50
[]
no_license
KingJA/CityControlPolice
7f4c2b441ea41dc8e593c87083d70d327c1ee45f
a6b5d3eeed3b9d854a1c070a65545896570dffcb
refs/heads/master
2021-01-19T01:36:32.277448
2017-06-28T01:00:48
2017-06-28T01:00:48
55,286,838
0
0
null
null
null
null
UTF-8
Java
false
false
2,347
java
package com.tdr.citycontrolpolice.adapter; import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.tdr.citycontrolpolice.R; import com.tdr.citycontrolpolice.activity.DeviceCertActivity; import com.tdr.citycontrolpolice.entity.ChuZuWu_LkSelfReportingMacList; import java.util.List; /** * 项目名称:物联网城市防控(警用版) * 类描述:设备列表适配器 * 创建人:KingJA * 创建时间:2016/3/24 16:07 * 修改备注: */ public class CzfDeviceAdapter extends BaseSimpleAdapter<ChuZuWu_LkSelfReportingMacList.ContentBean> { public CzfDeviceAdapter(Context context, List<ChuZuWu_LkSelfReportingMacList.ContentBean> list) { super(context, list); } @Override public View simpleGetView(final int position, View convertView, ViewGroup parent) { ViewHolder viewHolder = null; if (convertView == null) { convertView = View .inflate(context, R.layout.item_czf_device, null); viewHolder = new ViewHolder(convertView); convertView.setTag(viewHolder); } else { viewHolder = (ViewHolder) convertView.getTag(); } viewHolder.tvcert.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { DeviceCertActivity.goActivity(context,list.get(position).getHOUSEID(),list.get(position)); } }); viewHolder.tvoutinname.setText(list.get(position).getCHINESENAME()); viewHolder.tvinfophone.setText(list.get(position).getPHONE()); viewHolder.tvmac.setText(list.get(position).getMAC()); return convertView; } public class ViewHolder { public final TextView tvoutinname; public final TextView tvcert; public final TextView tvinfophone; public final TextView tvmac; public final View root; public ViewHolder(View root) { tvoutinname = (TextView) root.findViewById(R.id.tv_outin_name); tvcert = (TextView) root.findViewById(R.id.tv_bind); tvinfophone = (TextView) root.findViewById(R.id.tv_info_phone); tvmac = (TextView) root.findViewById(R.id.tv_mac); this.root = root; } } }
[ "kingjavip@gmail.com" ]
kingjavip@gmail.com
e2bbb03fd8eb7f1293bb2713b2b765241bd243a8
622563f3bbca8c39efe9ffe8429fa727de7da1cb
/laif/src/main/java/eu/monnetproject/kap/laif/rules/LAIFValue.java
5d7a4062148bff3ba271734d1ae5eb055b3115c4
[]
no_license
monnetproject/kap
f4c49dac5a586ae5b7f783b5375e7d8c66a7c21c
e00a2b5fce2b48faf7a64b78e51f6c589ce1bd63
refs/heads/master
2021-05-16T02:36:27.934867
2018-04-20T12:49:44
2018-04-20T12:49:44
8,609,532
1
0
null
null
null
null
UTF-8
Java
false
false
2,043
java
/** * ******************************************************************************** * Copyright (c) 2011, Monnet Project All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * Redistributions in binary * form must reproduce the above copyright notice, this list of conditions and * the following disclaimer in the documentation and/or other materials provided * with the distribution. * Neither the name of the Monnet Project nor the names * of its contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE MONNET PROJECT 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 eu.monnetproject.kap.laif.rules; import eu.monnetproject.kap.laif.LAIFLexicon; import eu.monnetproject.kap.laif.LAIFRule; import java.net.URI; import java.util.Map; /** * * @author John McCrae */ public interface LAIFValue { String apply(LAIFLexicon lexicon, Map<LAIFVariable, LAIFValue> arguments, Map<URI, LAIFRule> calls); }
[ "john@mccr.ae" ]
john@mccr.ae
65e0ee660564cb954cb3c439263155d7ff1709cb
405c4a2aa91c27b271d2d71f2248f9b1cd14ceba
/lib-core/src/main/java/com/gzq/lib_core/avoid/AvoidOnResultFragment.java
46757eb38344bbaaaa5257fc71981e8cdd84f916
[]
no_license
henrycoding/HealthDoctor
c0b52b093b26c3ff75bb88456650e22fb8563fcd
e7a4201805d190895a2621c1189ddada16dd162f
refs/heads/master
2023-03-17T03:47:25.312634
2019-07-20T02:50:41
2019-07-20T02:50:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,270
java
package com.gzq.lib_core.avoid; import android.app.Fragment; import android.content.Intent; import android.os.Bundle; import java.util.HashMap; import java.util.Map; import io.reactivex.Observable; import io.reactivex.disposables.Disposable; import io.reactivex.functions.Consumer; import io.reactivex.subjects.PublishSubject; /** * Created by jack on 2017/12/27. * modify by https://guofeng007.github.io remove request code ,instead use callback.hashcode as requestcode 2017/1/10 */ public class AvoidOnResultFragment extends Fragment { private Map<Integer, PublishSubject<ActivityResultInfo>> mSubjects = new HashMap<>(); private Map<Integer, AvoidOnResult.Callback> mCallbacks = new HashMap<>(); public AvoidOnResultFragment() { } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setRetainInstance(true); } public Observable<ActivityResultInfo> startForResult(final Intent intent, final int requestCode) { final PublishSubject<ActivityResultInfo> subject = PublishSubject.create(); return subject.doOnSubscribe(new Consumer<Disposable>() { @Override public void accept(Disposable disposable) throws Exception { mSubjects.put(requestCode, subject); startActivityForResult(intent, subject.hashCode()); } }); } public void startForResult(Intent intent, AvoidOnResult.Callback callback, int requestCode) { mCallbacks.put(requestCode, callback); startActivityForResult(intent, requestCode); } @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); //rxjava方式的处理 PublishSubject<ActivityResultInfo> subject = mSubjects.remove(requestCode); if (subject != null) { subject.onNext(new ActivityResultInfo(requestCode, resultCode, data)); subject.onComplete(); } //callback方式的处理 AvoidOnResult.Callback callback = mCallbacks.remove(requestCode); if (callback != null) { callback.onActivityResult( resultCode, data); } } }
[ "774550196@qq.com" ]
774550196@qq.com
55c296c17ea05da05dd0964bb606a022d041116b
bd49625db02499b390c377d16baddb4fb54f6028
/vendor/magcomm/packages/apps/FactoryTest/src/com/magcomm/factorytest/batterytest/fragment/FlashLightTestFragment.java
3d41d046dbb7e8bd50291047e4b3765c68e6e1fa
[]
no_license
eudora-jia/android-p
c1d024ee2f1477687880b4c35077ffadc0f46437
de4469604de639eb2df43660ae47371e18711c02
refs/heads/master
2020-07-06T21:23:31.588679
2019-08-02T09:23:48
2019-08-02T09:23:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,848
java
package com.magcomm.factorytest.batterytest.fragment; import android.annotation.TargetApi; import android.app.Activity; import android.content.Context; import android.hardware.camera2.CameraAccessException; import android.hardware.camera2.CameraCharacteristics; import android.hardware.camera2.CameraManager; import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.support.annotation.Nullable; import android.support.annotation.RequiresApi; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Toast; import com.magcomm.factorytest.R; import com.magcomm.factorytest.batterytest.activity.BatteryBaseActivity; /** * Created by zhangziran on 2017/12/1. */ public class FlashLightTestFragment extends BaseFragment { private View view; private Handler handler; private CameraManager cameraManager; private static final String FRONT_CAMERA = CameraCharacteristics.LENS_FACING_FRONT + ""; @Override public void onAttach(Activity activity) { super.onAttach(activity); if (activity instanceof BatteryBaseActivity) { handler = ((BatteryBaseActivity) activity).getHandler(); } } @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) { view = inflater.inflate(R.layout.flash_test, null); initLight(); return view; } @TargetApi(Build.VERSION_CODES.M) private void initLight() { try { cameraManager = (CameraManager) getActivity().getSystemService(Context.CAMERA_SERVICE); cameraManager.setTorchMode(FRONT_CAMERA,true); handler.postDelayed(runnable,5000); } catch (CameraAccessException e) { Toast.makeText(getActivity(),"Light open fail",Toast.LENGTH_LONG).show(); handler.removeCallbacks(runnable); handler.obtainMessage(0).sendToTarget(); e.printStackTrace(); } } private Runnable runnable = new Runnable() { @RequiresApi(api = Build.VERSION_CODES.M) @Override public void run() { handler.obtainMessage(0).sendToTarget(); try { cameraManager.setTorchMode(FRONT_CAMERA,false); } catch (CameraAccessException e) { e.printStackTrace(); } } }; @Override @TargetApi(Build.VERSION_CODES.M) public void reset(boolean fail) { handler.removeCallbacks(runnable); try { cameraManager.setTorchMode(FRONT_CAMERA,false); } catch (CameraAccessException e) { e.printStackTrace(); } } }
[ "weiyawei@magcomm.cn" ]
weiyawei@magcomm.cn
41d78639bf74124f9bf3aff758f0a38cbd9910e6
374789de7651b309d40f40b45749d5b0d81afab7
/sparksql/src/main/java/name/lsg/sparksql/parser/grammar/tree/IdentifierCommentList.java
1a5929fca93e3682f144763d6809eea7b235a370
[]
no_license
linshuguang/grammars
6e309cacafc3dc7fb6b9bf18dca6a1b42ca83750
6c0346eef07573ee6fd3479d22d72550df702b2b
refs/heads/master
2020-04-07T11:23:32.413875
2018-12-04T01:00:05
2018-12-04T01:00:05
157,326,399
0
0
null
null
null
null
UTF-8
Java
false
false
625
java
package name.lsg.sparksql.parser.grammar.tree; import name.lsg.sparksql.parser.grammar.context.Context; import name.lsg.sparksql.parser.util.IndentHelper; import java.util.ArrayList; import java.util.List; /** * Created by kenya on 2018/11/29. */ public class IdentifierCommentList extends AST { List<AST> comments = new ArrayList<>(); public void addComment(AST comment){ this.comments.add(comment); } @Override public void indent(Context context){ IndentHelper.indent(context,"("); IndentHelper.indent(context, comments); IndentHelper.indent(context,")"); } }
[ "linshuguang@xiaomi.com" ]
linshuguang@xiaomi.com
89aeb85ef97904831dff110cbe7f5a80a060cf20
60bac282a15dc8c1dfe103c9be64cdaf9f1c7dd5
/app/src/main/java/com/project/library/controller/LoadDataActivity.java
5ad5783ffa925f669dd978dfb25d9d6f949289b3
[]
no_license
PhamMinhTien05102001/abc
93f848ef29f1b20cb319c501b2765abd12e213c0
6936c44fa4bfdc70395c7828c9a3bbb9dbb74369
refs/heads/main
2023-08-24T02:05:12.639504
2021-10-28T08:58:59
2021-10-28T08:58:59
402,256,304
0
0
null
null
null
null
UTF-8
Java
false
false
6,119
java
package com.project.library.controller; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.widget.Toast; import androidx.appcompat.app.AppCompatActivity; import androidx.viewpager2.widget.ViewPager2; import com.github.ybq.android.spinkit.style.ThreeBounce; import com.project.library.R; import com.project.library.databinding.ActivityLoadDataBinding; import com.project.library.model.Book; import com.project.library.model.BookCallAPI; import com.project.library.model.BookDatabase; import com.project.library.model.Photo; import com.project.library.model.ServiceAPI; import com.project.library.view.ZoomOutPageTransformer; import java.util.ArrayList; import java.util.List; import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; public class LoadDataActivity extends AppCompatActivity { private ActivityLoadDataBinding binding; private BookDatabase bookDatabase; private PhotoViewPagerAdapter photoViewPagerAdapter; private List<Photo> listPhoto; private String[] info = {"Quiet space", "Variety Of Books", "Library Cafeteria"}; private static int Count = 0; // Xử lý việc back về từ MainActivity private Handler handler = new Handler(); private Runnable runnable = new Runnable() { @Override public void run() { if(binding.viewpagerSlide.getCurrentItem() == listPhoto.size() - 1){ binding.viewpagerSlide.setCurrentItem(0); binding.tvShowInfo.setText(info[0]); } else{ binding.viewpagerSlide.setCurrentItem(binding.viewpagerSlide.getCurrentItem() + 1); binding.tvShowInfo.setText(info[binding.viewpagerSlide.getCurrentItem()]); } } }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); binding = ActivityLoadDataBinding.inflate(getLayoutInflater()); setContentView(binding.getRoot()); bookDatabase = BookDatabase.getInstance(this); binding.progressBar.setIndeterminateDrawable(new ThreeBounce()); //===============set up cho slide photo photoViewPagerAdapter = new PhotoViewPagerAdapter(GetListPhoto()); binding.viewpagerSlide.setAdapter(photoViewPagerAdapter); binding.circleIndicator.setViewPager(binding.viewpagerSlide); binding.viewpagerSlide.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() { //Xét AUTO RUN cho slide @Override public void onPageSelected(int position) { super.onPageSelected(position); handler.removeCallbacks(runnable); handler.postDelayed(runnable, 1500); } }); binding.viewpagerSlide.setPageTransformer(new ZoomOutPageTransformer()); //set hiệu ứng cho viewpager binding.tvShowInfo.setText(info[0]); //=================Call API CallAPI(); } @Override public void onResume() { // After a pause OR at startup super.onResume(); Count++; if(Count > 1){ // Lần đầu tiên là lần load Form, lần sau thì tắt app Count = 0; finish(); } } private List<Photo> GetListPhoto() { listPhoto = new ArrayList<>(); listPhoto.add(new Photo(R.drawable.slide_1)); listPhoto.add(new Photo(R.drawable.slide_2)); listPhoto.add(new Photo(R.drawable.slide_3)); return listPhoto; } public boolean CheckExistBook(String Id){ // Check xem có trùng với ID đã có trong csdl ko List<Book> data = bookDatabase.bookDAO().GetListAllBookByBookId(Id); for(Book i : data){ if( i.getBookId().equals(Id)){ return true; } } return false; } private void CallAPI(){ ServiceAPI.serviceApi.GetAllBook().enqueue(new Callback<BookCallAPI>() { @Override public void onResponse(Call<BookCallAPI> call, Response<BookCallAPI> response) { BookCallAPI bookCallAPI = response.body(); binding.progressBar.setMax(bookCallAPI.getResults()); List<Book> list = bookCallAPI.getBooks(); int count = 0; for(Book i : list){ count += 1; if(!CheckExistBook(i.getBookId())){ bookDatabase.bookDAO().insert(i); } binding.progressBar.setProgress(count); } Handler mHandler = new Handler(); mHandler.postDelayed(new Runnable() { @Override public void run() { Intent intent = new Intent(LoadDataActivity.this, MainActivity.class); intent.putExtra("no_back", "no"); startActivity(intent); } }, 1000); } @Override public void onFailure(Call<BookCallAPI> call, Throwable t) { boolean CheckIsNull = false; if(bookDatabase.bookDAO().GetListAllBook().isEmpty()){ CheckIsNull = true; } Handler mHandler = new Handler(); boolean finalCheckIsNull = CheckIsNull; mHandler.postDelayed(new Runnable() { @Override public void run() { Intent intent = new Intent(LoadDataActivity.this, MainActivity.class); if(!finalCheckIsNull){ startActivity(intent); } else{ Toast.makeText(LoadDataActivity.this, "Need Internet To Load Data ", Toast.LENGTH_SHORT).show(); startActivity(intent); } } }, 1000); } }); } }
[ "=" ]
=
347d137aabc27ed55dc72a566a1e161b96dbba1b
411300381901f2b7f2f276f50a7c8b69c5d1dff2
/shopping/src/com/ypy/shopping/model/McType.java
2d394e14065544ab40b7d053f83dd03b82f0df2c
[]
no_license
dl-ypy/shopping
5a23e287a03b9ee5b66e9a62eb1d8641aeda9abe
b4bc9e32df1ca3507044dbb08b747c9ded1b0826
refs/heads/master
2021-07-11T12:07:35.785759
2017-10-15T14:47:29
2017-10-15T14:47:29
107,020,876
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
1,094
java
package com.ypy.shopping.model; /** * ÉÌÆ·Àà±ð * @author ypy * */ public class McType { private int typeid; private String typename; private int fatherid; public McType(int typeid, String typename, int fatherid) { super(); this.typeid = typeid; this.typename = typename; this.fatherid = fatherid; } public McType(String typename, int fatherid) { super(); this.typename = typename; this.fatherid = fatherid; } public McType(int typeid) { super(); this.typeid = typeid; } @Override public String toString() { return "McType [typeid=" + typeid + ", typename=" + typename + ", fatherid=" + fatherid + "]"; } public int getTypeid() { return typeid; } public void setTypeid(int typeid) { this.typeid = typeid; } public String getTypename() { return typename; } public void setTypename(String typename) { this.typename = typename; } public int getFatherid() { return fatherid; } public void setFatherid(int fatherid) { this.fatherid = fatherid; } public McType() { super(); } }
[ "792015431@qq.com" ]
792015431@qq.com
c6ef32bb5b394e0fa258c734ec987358a44e087d
1ca86d5d065372093c5f2eae3b1a146dc0ba4725
/spring-web-modules/spring-5-mvc/src/main/java/com/surya/Spring5Application.java
67f0b2a883c80579e2ddd337516e636bee7ef279
[]
no_license
Suryakanta97/DemoExample
1e05d7f13a9bc30f581a69ce811fc4c6c97f2a6e
5c6b831948e612bdc2d9d578a581df964ef89bfb
refs/heads/main
2023-08-10T17:30:32.397265
2021-09-22T16:18:42
2021-09-22T16:18:42
391,087,435
0
1
null
null
null
null
UTF-8
Java
false
false
449
java
package com.surya; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration; @SpringBootApplication( exclude = SecurityAutoConfiguration.class) public class Spring5Application { public static void main(String[] args) { SpringApplication.run(Spring5Application.class, args); } }
[ "suryakanta97@github.com" ]
suryakanta97@github.com
8f41ffbb121b44119126cb2baa6a4588ba351464
21e3d5f861e3bb2b7d64aa9c914f300a542235cb
/src/main/java/io/growing/graphql/model/CreateDataCenterUserVariableMutationRequest.java
6651197ab291ec6c0890e09ba2f5f4a9a3478064
[ "MIT" ]
permissive
okpiaoxuefeng98/growingio-graphql-javasdk
d274378dad69d971fe14207f74d7a3135959460b
97a75faf337446fa16536a42a3b744f7fc992fb4
refs/heads/master
2023-02-04T15:38:13.627500
2020-12-24T07:25:32
2020-12-24T07:25:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,834
java
package io.growing.graphql.model; import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLOperation; import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLOperationRequest; import java.util.LinkedHashMap; import java.util.Map; import java.util.Objects; @javax.annotation.Generated( value = "com.kobylynskyi.graphql.codegen.GraphQLCodegen", date = "2020-12-22T15:45:58+0800" ) public class CreateDataCenterUserVariableMutationRequest implements GraphQLOperationRequest { private static final GraphQLOperation OPERATION_TYPE = GraphQLOperation.MUTATION; private static final String OPERATION_NAME = "createDataCenterUserVariable"; private Map<String, Object> input = new LinkedHashMap<>(); public CreateDataCenterUserVariableMutationRequest() { } public void setUserVariable(VariableInputDto userVariable) { this.input.put("userVariable", userVariable); } @Override public GraphQLOperation getOperationType() { return OPERATION_TYPE; } @Override public String getOperationName() { return OPERATION_NAME; } @Override public Map<String, Object> getInput() { return input; } @Override public String toString() { return Objects.toString(input); } public static class Builder { private VariableInputDto userVariable; public Builder() { } public Builder setUserVariable(VariableInputDto userVariable) { this.userVariable = userVariable; return this; } public CreateDataCenterUserVariableMutationRequest build() { CreateDataCenterUserVariableMutationRequest obj = new CreateDataCenterUserVariableMutationRequest(); obj.setUserVariable(userVariable); return obj; } } }
[ "dreamylost@outlook.com" ]
dreamylost@outlook.com
a65a20ab6044e670880289439f17359db607ca35
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/12/12_5d4ed0de0f6032af54876dddb18ac9f0f2b1eb9a/IAttributeEditor/12_5d4ed0de0f6032af54876dddb18ac9f0f2b1eb9a_IAttributeEditor_t.java
092d3e27d4f5ee0ee747dba7d0661a71af7f9ec2
[]
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,356
java
package org.carrot2.workbench.editors; import org.carrot2.util.attribute.AttributeDescriptor; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.IPersistableEditor; /** * Attribute editor is a control, that is used to edit and display value of given * attribute. The lifecycle of an attribute editor is as follows: * <ol> * <li>call editor.init(descriptor), if exception is thrown -> stop. * <li>call editor.createEditor(parent), if exception -> goto 5 * <li>call editor.setValue(currentValue), if exception -> goto 5 * <li>call editor.getValue() * <li>call editor.dispose() * <ol> */ public interface IAttributeEditor extends IPersistableEditor { void init(AttributeDescriptor descriptor); String getAttributeKey(); void createEditor(Composite parent, Object layoutData); void setValue(Object currentValue); Object getValue(); void dispose(); void addAttributeChangeListener(AttributeChangeListener listener); void removeAttributeChangeListener(AttributeChangeListener listener); /** * If false, than surrounding view must display label for given attribute on it's own. * If true, that label is a part of editor's control. * * @return */ boolean containsLabel(); }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
672e56f1747c2fb2ab4bfa16302575b6f4a90741
fbadaeab2f78ede5d91013e77817836f319c56c3
/src/magic/ui/viewer/PermanentPanel.java
bc89db305314ef7599551ace07d6e3e4fc6f968b
[]
no_license
neoedmund/neoedmund-magarena
181b340fc3a25cf8e99ebd21fb4dd05de727708c
abe5f43288b88286a4a539fb0357bac8201b2568
refs/heads/master
2016-09-06T05:17:18.761950
2012-03-20T12:51:52
2012-03-20T12:51:52
32,125,604
0
1
null
null
null
null
UTF-8
Java
false
false
2,254
java
package magic.ui.viewer; import magic.ui.GameController; import magic.ui.theme.Theme; import magic.ui.theme.ThemeFactory; import magic.ui.widget.FontsAndBorders; import javax.swing.BorderFactory; import javax.swing.BoxLayout; import javax.swing.JPanel; import javax.swing.border.Border; import java.awt.BorderLayout; import java.awt.Color; import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.SortedSet; public class PermanentPanel extends JPanel implements ChoiceViewer { private static final long serialVersionUID = 1L; private final PermanentButton button; private final List<PermanentButton> linkedButtons; public PermanentPanel(final PermanentViewerInfo permanentInfo,final GameController controller,final Border border,final int maxWidth) { setBorder(FontsAndBorders.SMALL_EMPTY_BORDER); setLayout(new BorderLayout()); button=new PermanentButton(permanentInfo,controller,border,maxWidth); add(button,BorderLayout.NORTH); linkedButtons=new ArrayList<PermanentButton>(); final SortedSet<PermanentViewerInfo> linked=permanentInfo.linked; if (!linked.isEmpty()) { final Color attachedColor=ThemeFactory.getInstance().getCurrentTheme().getColor(Theme.COLOR_SEPARATOR_BACKGROUND); final Border attachedBorder=BorderFactory.createMatteBorder(0,10,0,0,attachedColor); final JPanel attachedPanel=new JPanel(); attachedPanel.setLayout(new BoxLayout(attachedPanel,BoxLayout.Y_AXIS)); attachedPanel.setBorder(attachedBorder); for (final PermanentViewerInfo linkedPermanentInfo : linked) { final PermanentButton linkedButton=new PermanentButton( linkedPermanentInfo, controller, BorderFactory.createEmptyBorder(), maxWidth-10); linkedButtons.add(linkedButton); attachedPanel.add(linkedButton); } add(attachedPanel,BorderLayout.CENTER); } } @Override public void showValidChoices(final Set<Object> validChoices) { button.showValidChoices(validChoices); for (final PermanentButton linkedButton : linkedButtons) { linkedButton.showValidChoices(validChoices); } } }
[ "neoedmund@gmail.com" ]
neoedmund@gmail.com
c2b5df316cb922a156d71ceedec3f5feb3fed9d2
d18a0a69219c7b89f1c331fc233e7370dbd360b4
/src/main/java/com/example/zingmp3/service/likePlaylist/LikePlaylistService.java
f4a63c4cfee632c94f5624fcf894377bf7acb9c0
[]
no_license
duclm3/Zing_Mp3_Back-end
6ff1710ba0fca05e59174a6600df0814bdf7eacb
fa83ca6ece400383a741cab1e61a4932a2a7b3d9
refs/heads/master
2023-06-02T02:12:30.411390
2021-06-24T05:29:16
2021-06-24T05:29:16
379,812,731
0
2
null
null
null
null
UTF-8
Java
false
false
794
java
package com.example.zingmp3.service.likePlaylist; import com.example.zingmp3.model.LikePlayList; import com.example.zingmp3.model.User; import com.example.zingmp3.repository.ILikePlaylistRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Optional; @Service public class LikePlaylistService implements ILikePlaylistService { @Autowired ILikePlaylistRepository likePlaylistRepository; @Override public Optional<LikePlayList> findByUserAndPlaylistId(User user, Long id) { return likePlaylistRepository.findByUserAndPlaylistId(user,id); } @Override public LikePlayList save(LikePlayList likePlayList) { return likePlaylistRepository.save(likePlayList); } }
[ "duclm3.tt" ]
duclm3.tt
99ccd9f591ec6fa922d785969d28c2f85e5d35f7
22b1f967750c313d8a2e6fc255fd3bca9f13c290
/AdvancedAlgorithm(LintCode)/DynamicProgrammingI/394_CoinsInALine.java
f26886536c15441f312da650ba49eae150e6a0d3
[ "MIT" ]
permissive
robin-qu/Leetcode
333e997f1779fe41cbd4b0e057631454c1f37d13
9178287a7cc8fac7adb0e9bfd8d4771cd151d4a6
refs/heads/master
2021-06-24T18:49:25.879307
2021-01-21T05:28:20
2021-01-21T05:28:20
178,751,405
0
0
null
null
null
null
UTF-8
Java
false
false
1,367
java
// // O(n) space // public class Solution { // /** // * @param n: An integer // * @return: A boolean which equals to true if the first player will win // */ // public boolean firstWillWin(int n) { // if (n <= 0) { // return false; // } // if (n <= 2) { // return true; // } // boolean[] dp = new boolean[n + 1]; // dp[1] = true; // dp[2] = true; // for (int i = 3; i <= n; i++) { // if (!dp[i - 1] || !dp[i - 2]) { // dp[i] = true; // } // } // return dp[n]; // } // } // O(1) space public class Solution { /** * @param n: An integer * @return: A boolean which equals to true if the first player will win */ public boolean firstWillWin(int n) { if (n <= 0) { return false; } if (n <= 2) { return true; } boolean first = true; boolean second = true; for (int i = 3; i <= n; i++) { if (!first || !second) { first = second; second = true; } else { first = second; second = false; } } return second; } }
[ "hongbinqu9@gmail.com" ]
hongbinqu9@gmail.com
ac7b2097c1d1b8f9c1e5f5e58d31a353c48f2c17
a1b80a8b99dc9dda23690382a27043fa7c38ee04
/src/main/java/de/fraunhofer/iais/eis/LogMessageImpl.java
ae3c58502b29bf1b33771f5f6ab7fe7cb86ce1e9
[]
no_license
ashokkumarta/infomodel
35cbf78847f835f9cc16fa37949ef8bd81a16078
475c1d8c081024e439763e9044785ade427831a9
refs/heads/main
2023-06-24T14:21:10.937026
2021-07-17T09:17:54
2021-07-17T09:17:54
386,892,021
0
0
null
null
null
null
UTF-8
Java
false
false
8,038
java
package de.fraunhofer.iais.eis; import de.fraunhofer.iais.eis.util.*; import de.fraunhofer.iais.eis.*; import javax.xml.datatype.XMLGregorianCalendar; import java.lang.String; import java.math.BigInteger; import java.net.URL; import java.net.URI; import java.util.*; import javax.validation.constraints.*; import java.util.Arrays; import java.io.Serializable; import javax.validation.constraints.*; import com.fasterxml.jackson.annotation.*; /** "Log Message"@en "Log Message which can be used to transfer logs e.g. to the clearing house."@en */ @JsonIgnoreProperties(ignoreUnknown = true) @JsonTypeName("ids:LogMessage") public class LogMessageImpl implements Serializable, LogMessage { @JsonProperty("@id") @JsonAlias({"@id", "id"}) @javax.validation.constraints.NotNull URI id; //List of all labels of this class @JsonIgnore java.util.List<TypedLiteral> label = Arrays.asList(new TypedLiteral("Log Message", "en")); //List of all comments of this class @JsonIgnore java.util.List<TypedLiteral> comment = Arrays.asList(new TypedLiteral("Log Message which can be used to transfer logs e.g. to the clearing house.", "en")); // all classes have a generic property array @JsonIgnore java.util.Map<String,Object> properties; // instance fields as derived from information model /** "Authorization token"@en "An authorization token like JSON Web Token."@en */ @JsonAlias({"ids:authorizationToken", "authorizationToken"}) Token _authorizationToken; /** "contentVersion"@en "Version of the content in the payload. Use digits and semantic versioning pattern like MAJOR.MINOR.PATCH."@en */ @JsonAlias({"ids:contentVersion", "contentVersion"}) String _contentVersion; /** "consumer connector"@en "Correlated message, e.g. a response to a previous request."@en */ @JsonAlias({"ids:correlationMessage", "correlationMessage"}) URI _correlationMessage; /** "issued"@en "Date (as xsd:dateTimeStamp) of issuing the Message."@en */ @NotNull@JsonAlias({"ids:issued", "issued"}) XMLGregorianCalendar _issued; /** "issuer connector"@en "The Connector which is the origin of the message."@en */ @NotNull@JsonAlias({"ids:issuerConnector", "issuerConnector"}) URI _issuerConnector; /** "model version"@en "Version of the Information Model against which the Message should be interpreted."@en */ @NotNull@JsonAlias({"ids:modelVersion", "modelVersion"}) String _modelVersion; /** "recipient agent"@en "The Agent for which the Mesaage is intended."@en */ @JsonAlias({"ids:recipientAgent", "recipientAgent"}) java.util.ArrayList<? extends URI> _recipientAgent; /** "recipient connector"@en "The Connector which is the recipient of the message."@en */ @JsonAlias({"ids:recipientConnector", "recipientConnector"}) java.util.ArrayList<? extends URI> _recipientConnector; /** "Security token"@en "A token representing a claim that the message sender supports a certain security profile."@en */ @NotNull@JsonAlias({"ids:securityToken", "securityToken"}) DynamicAttributeToken _securityToken; /** "sender agent"@en "The Agent which initiated the Message."@en */ @NotNull@JsonAlias({"ids:senderAgent", "senderAgent"}) URI _senderAgent; /** "transferContract"@en "The contract which is (or will be) the legal basis of the data transfer."@en */ @JsonAlias({"ids:transferContract", "transferContract"}) URI _transferContract; // no manual construction LogMessageImpl() { id = VocabUtil.getInstance().createRandomUrl("logMessage"); } @JsonProperty("@id") final public URI getId() { return id; } public String toRdf() { return VocabUtil.getInstance().toRdf(this); } public java.util.List<TypedLiteral> getLabel() { return this.label; } public java.util.List<TypedLiteral> getComment() { return this.comment; } // getter and setter for generic property map @JsonAnyGetter public java.util.Map<String,Object> getProperties() { if (this.properties == null) return null; Iterator<String> iter = this.properties.keySet().iterator(); java.util.Map<String,Object> resultset = new HashMap<String, Object>(); while (iter.hasNext()) { String key = iter.next(); resultset.put(key,urifyObjects(this.properties.get(key))); } return resultset ; } public Object urifyObjects(Object value) { if (value instanceof String && value.toString().startsWith("http")) { try { value = new URI(value.toString()); } catch (Exception e) { /* do nothing */ } } else if (value instanceof ArrayList) { ArrayList<Object> result_array = new ArrayList<Object>(); ((ArrayList) value).forEach(x -> result_array.add(urifyObjects(x))); return result_array; } else if (value instanceof java.util.Map) { java.util.Map<String, Object> result_map = new HashMap<String, Object>(); ((java.util.Map) value).forEach((k,v) -> result_map.put(k.toString(), urifyObjects(v))); return result_map; } return value; } @JsonAnySetter public void setProperty(String property, Object value) { if (this.properties == null) this.properties = new java.util.HashMap<String,Object>(); if (property.startsWith("@")) {return ;}; this.properties.put(property, value) ; } // accessor method implementations as derived from information model final public @NotNull @JsonProperty("ids:modelVersion") String getModelVersion() { return _modelVersion; } final public void setModelVersion (String _modelVersion_) { this._modelVersion = _modelVersion_; } final public @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSzzz") @NotNull @JsonProperty("ids:issued") XMLGregorianCalendar getIssued() { return _issued; } final public void setIssued (XMLGregorianCalendar _issued_) { this._issued = _issued_; } final public @NotNull @JsonProperty("ids:issuerConnector") URI getIssuerConnector() { return _issuerConnector; } final public void setIssuerConnector (URI _issuerConnector_) { this._issuerConnector = _issuerConnector_; } final public @JsonProperty("ids:recipientConnector") java.util.ArrayList<? extends URI> getRecipientConnector() { return _recipientConnector; } final public void setRecipientConnector (java.util.ArrayList<? extends URI> _recipientConnector_) { this._recipientConnector = _recipientConnector_; } final public @NotNull @JsonProperty("ids:securityToken") DynamicAttributeToken getSecurityToken() { return _securityToken; } final public void setSecurityToken (DynamicAttributeToken _securityToken_) { this._securityToken = _securityToken_; } final public @NotNull @JsonProperty("ids:senderAgent") URI getSenderAgent() { return _senderAgent; } final public void setSenderAgent (URI _senderAgent_) { this._senderAgent = _senderAgent_; } final public @JsonProperty("ids:recipientAgent") java.util.ArrayList<? extends URI> getRecipientAgent() { return _recipientAgent; } final public void setRecipientAgent (java.util.ArrayList<? extends URI> _recipientAgent_) { this._recipientAgent = _recipientAgent_; } final public @JsonProperty("ids:correlationMessage") URI getCorrelationMessage() { return _correlationMessage; } final public void setCorrelationMessage (URI _correlationMessage_) { this._correlationMessage = _correlationMessage_; } final public @JsonProperty("ids:authorizationToken") Token getAuthorizationToken() { return _authorizationToken; } final public void setAuthorizationToken (Token _authorizationToken_) { this._authorizationToken = _authorizationToken_; } final public @JsonProperty("ids:transferContract") URI getTransferContract() { return _transferContract; } final public void setTransferContract (URI _transferContract_) { this._transferContract = _transferContract_; } final public @JsonProperty("ids:contentVersion") String getContentVersion() { return _contentVersion; } final public void setContentVersion (String _contentVersion_) { this._contentVersion = _contentVersion_; } }
[ "ashokkumar.ta@gmail.com" ]
ashokkumar.ta@gmail.com
b7a186c66f073a62c2e943b3b513f061fcfcc6c7
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdas/applicationModule/src/main/java/applicationModulepackageJava13/Foo408.java
7270f74cecbe2179a062140076fbf27d2c7df902
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
348
java
package applicationModulepackageJava13; public class Foo408 { public void foo0() { new applicationModulepackageJava13.Foo407().foo5(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
983b8e1dca590f275b0c9c6cd740b2e7cefd2ec0
0f4d0df8e061397f76e149ceaa188ea85fbcbe7b
/netty/src/main/java/com/thushear/book/packet/DelimeEchoClient.java
c92bf8daaece9a0eb679ed8f98839f907e6fa9c1
[]
no_license
thushear/ArchitectureOfJava
7910dca50eb101651ac07643909b490eaab59364
2a44a3da0cefc268124bfbefc1ab525057ecd224
refs/heads/master
2022-12-14T17:24:18.075519
2019-08-07T08:51:46
2019-08-07T08:51:46
69,248,963
0
1
null
2022-12-06T00:38:49
2016-09-26T12:44:03
Java
UTF-8
Java
false
false
1,840
java
package com.thushear.book.packet; import io.netty.bootstrap.Bootstrap; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioSocketChannel; import io.netty.handler.codec.DelimiterBasedFrameDecoder; import io.netty.handler.codec.string.StringDecoder; /** * Created by kongming on 2016/3/17. */ public class DelimeEchoClient { public static void main(String[] args) throws InterruptedException { new DelimeEchoClient().connect(8080,"127.0.0.1"); } public void connect(int port,String host) throws InterruptedException { EventLoopGroup group = new NioEventLoopGroup(); try { Bootstrap b = new Bootstrap(); b.group(group).channel(NioSocketChannel.class) .option(ChannelOption.TCP_NODELAY,true) .handler(new ChannelInitializer<SocketChannel>() { @Override protected void initChannel(SocketChannel ch) throws Exception { ByteBuf delimeter = Unpooled.copiedBuffer("$_".getBytes()); ch.pipeline().addLast(new DelimiterBasedFrameDecoder(1024,delimeter)) .addLast(new StringDecoder()) .addLast(new DelimeEchoClientHandler()); } }); ChannelFuture f = b.connect(host,port).sync(); f.channel().closeFuture().sync(); } finally { group.shutdownGracefully(); } } }
[ "kongming@jd.com" ]
kongming@jd.com
7fea6d7462d740d5060f7ad039f3cb003519fd80
b23c6fa79b72da4ea911ced79fb9fae907efdebd
/src/main/java/io/github/laplacedemon/qthings/mqtt/topic/AtomicUnsignedShort.java
305eaa8d82550b6f17a210f01fe83c7f404f3d34
[]
no_license
LaplaceDemon/QThings
33986f4502e7cb3161a5f30ca4aea27cee2b3185
b5b9d4bba8fbb51614b0612c7f8c9bc0fbad00df
refs/heads/master
2020-04-19T10:26:00.192684
2019-02-01T10:43:22
2019-02-01T10:43:22
168,140,215
0
0
null
null
null
null
UTF-8
Java
false
false
885
java
package io.github.laplacedemon.qthings.mqtt.topic; import java.util.concurrent.atomic.AtomicInteger; public class AtomicUnsignedShort { private AtomicInteger x; public AtomicUnsignedShort() { super(); this.x = new AtomicInteger(0); } public AtomicUnsignedShort(int x) { super(); this.x = new AtomicInteger(x); } public int incrementAndGet() { while(true) { int x0 = x.get(); int x1 = x0 + 1; if(x1 >= 65536) { x1 = 0; } boolean compareAndSet = x.compareAndSet(x0, x1); if(compareAndSet) { return x1; } } } public int decrementAndGet() { while(true) { int x0 = x.get(); int x1 = x0 - 1; if(x1 < 0) { x1 = 65535; } boolean compareAndSet = x.compareAndSet(x0, x1); if(compareAndSet) { return x1; } } } public int get() { return x.get(); } }
[ "laplacedemon.sjq@gmail.com" ]
laplacedemon.sjq@gmail.com
0465067243dc3d713569b2adb111e4d39c89cc1b
6eb9945622c34e32a9bb4e5cd09f32e6b826f9d3
/src/com/inponsel/android/details/TwitterListInPonsel$KomentarNextAsycTask$10.java
6fd8d14beededbaaa791a1540ae3d91fcfe0fd91
[]
no_license
alexivaner/GadgetX-Android-App
6d700ba379d0159de4dddec4d8f7f9ce2318c5cc
26c5866be12da7b89447814c05708636483bf366
refs/heads/master
2022-06-01T09:04:32.347786
2020-04-30T17:43:17
2020-04-30T17:43:17
260,275,241
0
0
null
null
null
null
UTF-8
Java
false
false
1,752
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.inponsel.android.details; import android.os.AsyncTask; import android.view.View; import com.inponsel.android.utils.Log; import com.inponsel.android.utils.Util; import com.inponsel.android.utils.Utility; // Referenced classes of package com.inponsel.android.details: // TwitterListInPonsel class this._cls1 implements android.view.NextAsycTask._cls10 { final ute this$1; public void onClick(View view) { try { ess._mth2(this._cls1.this).limit = 0; ess._mth2(this._cls1.this).urlKomenOld = (new StringBuilder(String.valueOf(Util.BASE_PATH2))).append("vendor_twitter_list").append(Utility.BASE_FORMAT).append("?slug=").append(ess._mth2(this._cls1.this).listtwitter).append("&screen_name=").append(ess._mth2(this._cls1.this).twitter).append("&max_id=").append(ess._mth2(this._cls1.this).bottom_id).append("&t=").append(ess._mth2(this._cls1.this).t).append("&idusr=").append(ess._mth2(this._cls1.this).user_id).toString(); Log.e("urlKomenOld", ess._mth2(this._cls1.this).urlKomenOld); if (android.os.enOld >= 11) { (new t>(ess._mth2(this._cls1.this))).uteOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new String[0]); return; } } // Misplaced declaration of an exception variable catch (View view) { return; } (new t>(ess._mth2(this._cls1.this))).ute(new String[0]); return; } () { this$1 = this._cls1.this; super(); } }
[ "hutomoivan@gmail.com" ]
hutomoivan@gmail.com
1987c36795a5e4f9385be1ddd2ed76aabbe8048b
5308297e063c59a065a025711ae62b0b7b015886
/SDK/src/com/skyworth/ui/skydata/BaseMenuItemData.java
30595bb2c9b4d5c35a267fca5fea04908563091e
[]
no_license
bibiRe/AppStore
77ddde3261cabe9294ffb74714c00febd0ec7268
06f5e05050ad01753fd9e6a9f6ec251474e3c6f1
refs/heads/master
2020-12-29T01:54:54.175750
2014-02-12T07:30:44
2014-02-12T07:30:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,903
java
/** * Copyright (C) 2012 The SkyTvOS Project * * Version Date Author * ───────────────────────────────────── * 2012-6-13 rico * */ package com.skyworth.ui.skydata; import java.util.UUID; import com.skyworth.defines.SkyModuleDefs.SKY_SERVICE; import com.skyworth.framework.SkyData; /** * @ClassName BaseMenuItemData * @Description TODO (write something) * @author rico * @date 2012-6-13 * @version TODO (write something) */ public abstract class BaseMenuItemData extends UIData { private boolean ismenutypeafterexec = true; private boolean enabled = true; //为3D设置添加接口,判断是否需要缓存数据,如果是每次需要重新serUI 则设置为false private boolean uineedcache = true; // callDialog变量用于适应cloudtv机制,如果为true,则点击菜单项之后 // 弹出一个dialog,其中包括一项或多项属性设置,类似于ismenutypeafterexec,但不完全一样 private boolean callDialog = false; //收藏增加接口 private boolean change_state = false; private String title = ""; private String xmlPath = ""; private String iconid = ""; private String icon_id = ""; private String titleid = ""; private String onfocusicon = ""; private String unfocusicon = ""; private String disableicon = ""; private String id = UUID.randomUUID().toString(); private String cmd = ""; private String cmdparams = ""; private SKY_SERVICE cmdService = SKY_SERVICE.SKY_MODULE_UIVIEW_SERVICE; private BaseMenuItemData itemData; //适用于第三方需要使用天赐界面的应用,设置一个随机端口 private int mRandomPort = -1; //适用于第三方需要使用天赐界面的应用,确认为第三方菜单 private boolean isthirdPartyMenu = false; //提供标识升级 private boolean needUpdate = false; /** * @Description TODO(write something) * @param type */ public BaseMenuItemData(final String type) { super(type); // TODO Auto-generated constructor stub } /** * @Description TODO(write something) * @param data */ public BaseMenuItemData(SkyData data) { super(data); // TODO Auto-generated constructor stub } /** * @return the uineedcache */ public boolean getIsUINeedCache() { return this.uineedcache; } /** * @param enabled the isneedcache to set */ public void setIsUINeedCache(boolean isneedcache) { this.uineedcache = isneedcache; } /** * @return the enabled */ public boolean isEnabled() { return enabled; } /** * @param enabled the enabled to set */ public void enabled(boolean enabled) { this.enabled = enabled; } /** * @return the title */ public String getTitle() { return title; } /** * @param title the title to set */ public void setTitle(String title) { this.title = title; } public String getXmlPath() { return xmlPath; } public void setXmlPath(String xmlPath) { this.xmlPath = xmlPath; } /** * @return the cmd */ public String getCmd() { return cmd; } /** * @param cmd the cmd to set * 调用该方法不但需要命令,还要添加命令发送时候需要添加的key。 * 参数1表示点击后触发的命令。 * 参数2表示发送命令时附带的cmdparams。 * 注意,参数1和参数2可以传null或者“”,表示以uiviewservice定义的标准cmd发送。 */ public void setCmd(String cmd,String cmdparams,SKY_SERVICE service) { if(cmd!=null) { this.cmd = cmd; } if(service!=null) { this.cmdService = service; } this.cmdparams = cmdparams; } public void setCmd(String cmd,String cmdparams,int randomPort) { if(randomPort != 0) { this.mRandomPort = randomPort; this.cmd = cmd; this.cmdparams = cmdparams; isthirdPartyMenu = true; } } /** * @return the onfocusicon */ public String getOnfocusicon() { return onfocusicon; } /** * @param onfocusicon the onfocusicon to set */ public void setOnfocusicon(String onfocusicon) { this.onfocusicon = onfocusicon; } /** * @return the unfocusicon */ public String getUnfocusicon() { return unfocusicon; } /** * @param unfocusicon the unfocusicon to set */ public void setUnfocusicon(String unfocusicon) { this.unfocusicon = unfocusicon; } /** * @return the disableicon */ public String getDisableicon() { return disableicon; } /** * @param disableicon the disableicon to set */ public void setDisableicon(String disableicon) { this.disableicon = disableicon; } public String getId() { return this.id; } public void setId(String id) { this.id = id; } public SKY_SERVICE getService() { return cmdService; } /** * @return the cmdparamkey */ public String getCmdparams() { return cmdparams; } /** * @param iconid the iconid to set */ public void setIconid(String iconId) { if(iconId!=null && !iconId.equals("")) { this.icon_id = iconId; this.iconid = iconId.toLowerCase(); int index = iconid.indexOf("_"); String selpath = iconid.substring(0,index)+"/"+iconid.substring(index+1,iconid.length())+"_sel.png"; this.setOnfocusicon(selpath); String unselpath = iconid.substring(0,index)+"/"+iconid.substring(index+1,iconid.length())+"_unsel.png"; this.setUnfocusicon(unselpath); String disablepath = iconid.substring(0,index)+"/"+iconid.substring(index+1,iconid.length())+"_disable.png"; this.setDisableicon(disablepath); } } public String getIconId() { return this.icon_id; } /** * @return the ismenutypeafterexec */ public boolean isMenuTypeAfterExec() { return ismenutypeafterexec; } public void setNoMenuTypeAfterExec() { this.ismenutypeafterexec = false; } /** * @return the titleId */ public String getTitleId() { return titleid; } /** * @param titleId the titleId to set */ public void setTitleId(String titleId) { this.titleid = titleId; } public void setChange_state(boolean state) { this.change_state = state; } public boolean getChange_state() { return this.change_state; } public boolean isCallDialog() { return callDialog; } public void setCallDialog(boolean callDialog) { this.callDialog = callDialog; } //设置 子项数据 public void setItemData(BaseMenuItemData _itemdata) { this.itemData = _itemdata; } public BaseMenuItemData getItemData() { return this.itemData; } public void setIsRandomPort(boolean isRandom){ this.isthirdPartyMenu = isRandom; } public boolean isRandomPort() { return this.isthirdPartyMenu; } public void setRandomPort(int port){ mRandomPort = port; } public int getmRandomPort() { return mRandomPort; } public void setNeedUpdate(boolean isneed) { this.needUpdate = isneed; } public boolean getNeedUpdate() { return this.needUpdate; } }
[ "haotie1990@gmail.com" ]
haotie1990@gmail.com
10557ab57871066b2ea994775090f1b719e40285
327d0b0500612617f3d832a3b90d7afff4684fbe
/test/org/apache/el/TesterBeanF.java
242cab0af724d2567a56a252b9dd3f0f63a24220
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "bzip2-1.0.6", "Zlib", "CPL-1.0", "LZMA-exception", "LicenseRef-scancode-public-domain", "EPL-2.0", "CDDL-1.0" ]
permissive
cklein05/tomcat
8216e939aa06e1afe7db3f62796cb5c68930c079
fd0775cbd47793b98e5479b3e319fa86b4105a30
refs/heads/main
2023-03-09T22:43:39.626635
2022-02-08T14:27:00
2022-02-08T14:27:00
240,064,845
0
1
Apache-2.0
2022-01-11T08:25:20
2020-02-12T16:50:48
Java
UTF-8
Java
false
false
2,223
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.el; /** * Test cases based on https://bz.apache.org/bugzilla/show_bug.cgi?id=65358 */ public class TesterBeanF { @SuppressWarnings("unused") public String doTest(TesterEnum param1) { return "Enum"; } @SuppressWarnings("unused") public String doTest(TesterEnum param1, TesterEnum param2) { return "Enum-Enum"; } @SuppressWarnings("unused") public String doTest(TesterEnum param1, String param2) { return "Enum-String"; } @SuppressWarnings("unused") public String doTest(TesterEnum param1, TesterEnum... param2 ) { return "Enum-VEnum"; } @SuppressWarnings("unused") public String doTest(TesterEnum param1, String... param2 ) { return "Enum-VString"; } @SuppressWarnings("unused") public String doTest(String param1) { return "String"; } @SuppressWarnings("unused") public String doTest(String param1, TesterEnum param2) { return "String-Enum"; } @SuppressWarnings("unused") public String doTest(String param1, String param2) { return "String-String"; } @SuppressWarnings("unused") public String doTest(String param1, TesterEnum... param2 ) { return "String-VEnum"; } @SuppressWarnings("unused") public String doTest(String param1, String... param2 ) { return "String-VString"; } }
[ "markt@apache.org" ]
markt@apache.org
56d2d82a003f8a48c5ce0baf27b0d177fe13b13c
4a7cb14aa934df8f362cf96770e3e724657938d8
/MFES/ATS/Project/structuring/projectsPOO_1920/51/Grupo52_POO2020/projeto/src/view/Menu.java
c60999cac7c47e698ae0be1b849dd9b34eb620ce
[]
no_license
pCosta99/Masters
7091a5186f581a7d73fd91a3eb31880fa82bff19
f835220de45a3330ac7a8b627e5e4bf0d01d9f1f
refs/heads/master
2023-08-11T01:01:53.554782
2021-09-22T07:51:51
2021-09-22T07:51:51
334,012,667
1
1
null
null
null
null
UTF-8
Java
false
false
4,559
java
package view; import model.GPS; import java.io.Serializable; import java.time.LocalDateTime; import java.util.Arrays; import java.util.InputMismatchException; import java.util.List; import java.util.Scanner; public class Menu implements Serializable { private List<String> opcoes; private int op; public Menu(String[] opcoes){ this.opcoes = Arrays.asList(opcoes); this.op = 0; } public Menu(List<String> opcoes){ this.opcoes = opcoes; this.op = 0; } public void executa() { do { showMenu(); this.op = lerOpcao(); } while (this.op == -1); } public void showMenu(){ System.out.println("\n Selecionar opção:"); if(this.opcoes!=null) { for (int i = 0; i < this.opcoes.size(); i++) { System.out.print(i + 1); System.out.print(" - "); System.out.println(this.opcoes.get(i)); } } System.out.println("0 - Sair"); } public int lerOpcao(){ int op; Scanner sc = new Scanner(System.in); System.out.print("Opção: "); try { op = sc.nextInt(); } catch (InputMismatchException e){ op = -1; } if (this.opcoes!=null) { if (op < 0 || op > this.opcoes.size()) op = -1; } return op; } public int getOp(){ return this.op; } public double lerDouble(){ double op = -1; Scanner sc = new Scanner(System.in); //System.out.print("Input: "); try { op = sc.nextDouble(); } catch (InputMismatchException e){ System.out.println("Não foi um double"); } return op; } public GPS lerLocalizacao(){ double cx,cy; Scanner sc = new Scanner(System.in); System.out.println("Inserir (cx , cy): "); try{ System.out.print("Componente cx: "); cx = sc.nextDouble(); } catch (InputMismatchException e){ System.out.println("A componente X não é um double."); return null; } try { System.out.print("Componente cy: "); cy = sc.nextDouble(); } catch (InputMismatchException e){ System.out.println("A componente Y não é um double."); return null; } return new GPS(cx,cy); } public String leString(){ String op = null; Scanner sc = new Scanner(System.in); try { op = sc.nextLine(); } catch(InputMismatchException e) { System.out.println("String Inválida."); op = null; } return op; } public int leInt(){ int op; Scanner sc = new Scanner(System.in); try{ op = sc.nextInt(); if(op<0) { op = -1; } } catch(InputMismatchException e){ System.out.println("Não é um número inteiro válido."); op = -1; } return op; } public String leYesNo(){ String op; Scanner sc = new Scanner(System.in); try{ op = sc.nextLine(); if(op.equals("y") || op.equals("n")) { return op; } else { op = null; } } catch (InputMismatchException e) { System.out.println("Não é uma escolha válida."); op = null; } return op; } public LocalDateTime lerData(){ int dataD,dataM,dataA; do { System.out.print("Inserir dia: "); dataD = leInt(); }while(dataD<=0 || dataD > 31); do { System.out.print("Inserir mês: "); dataM = leInt(); }while(dataM<=0 || dataM > 12); do { System.out.print("Inserir ano: "); dataA = leInt(); }while(dataA==-1 || dataA > 2020); return LocalDateTime.of(dataA,dataM,dataD,0, 0); } public void setOp(int op){ this.op = op; } public String getOpcion(int op){ return this.opcoes.get(op); } public void sendMessage(String message){ System.out.println(message); } public void sendMessage(String message, double d, String last){ System.out.print(message); System.out.printf("%.2f", d); System.out.println(last); } }
[ "costapedro.a1999@gmail.com" ]
costapedro.a1999@gmail.com
adc72d272b5948c94a4bbe1e3e7d8cf027855b99
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/grade/ee1f20ccded21df47f14019584a29968013d1e66c8df14c1564aff0d69f463c1897e93b7881fa6318cbf475b51e0cdd7523d748525fb5d64d376b88614d3fc92/000/mutations/110/grade_ee1f20cc_000.java
8dbdf49ef03cce665f007ec141eba91919344ddc
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,456
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class grade_ee1f20cc_000 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { grade_ee1f20cc_000 mainClass = new grade_ee1f20cc_000 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { FloatObj a = new FloatObj (), b = new FloatObj (), c = new FloatObj (), d = new FloatObj (), A = new FloatObj (); output += (String.format ("Enter thresholds for A, B, C, D\nin that order, decreasing percentages > ")); a.value = scanner.nextFloat (); b.value = scanner.nextFloat (); c.value = scanner.nextFloat (); d.value = scanner.nextFloat (); output += (String.format ("Thank you. Now enter student score (percent) >")); A.value = scanner.nextFloat (); if (A.value >= a.value) { output += (String.format ("Student has an A grade\n")); } else if (A.value < a.value && A.value >= b.value) { output += (String.format ("Student has an B grade\n")); } else if ((A.value) < (a.value)) && ((A.value) >= (b.value) && A.value >= c.value) { output += (String.format ("Student has an C grade\n")); } else if (A.value < c.value && A.value >= d.value) { output += (String.format ("Student has an D grade\n")); } else { output += (String.format ("Student has an F grade\n")); } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
351a3c27b06bc0ec703dc3e7e68cee2acb7bf563
5a13f24c35c34082492ef851fb91d404827b7ddb
/src/main/java/com/alipay/api/domain/AlipayOpenAppMsgDingSendModel.java
648f4fba2f6bd5cd606681cd62927aad55a90d32
[]
no_license
featherfly/alipay-sdk
69b2f2fc89a09996004b36373bd5512664521bfd
ba2355a05de358dc15855ffaab8e19acfa24a93b
refs/heads/master
2021-01-22T11:03:20.304528
2017-09-04T09:39:42
2017-09-04T09:39:42
102,344,436
1
0
null
null
null
null
UTF-8
Java
false
false
2,521
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 发送钉钉企业会话消息接口 * * @author auto create * @since 1.0, 2016-11-29 12:55:20 */ public class AlipayOpenAppMsgDingSendModel extends AlipayObject { private static final long serialVersionUID = 5117537234512362342L; /** * 钉钉企业应用ID */ @ApiField("agent_id") private String agentId; /** * 消息类型为text时表示消息内容、消息类型为link时表示消息描述 */ @ApiField("content") private String content; /** * 消息类型为link时的消息点击链接地址 */ @ApiField("goto_url") private String gotoUrl; /** * 消息类型为link时的图片地址,支持jpg格式图片,大小不超过1MB */ @ApiField("image_url") private String imageUrl; /** * 消息类型,文本为text;链接为link */ @ApiField("msg_type") private String msgType; /** * 接收者,个人为single;部门为department */ @ApiField("receiver") private String receiver; /** * 消息类型为link时的消息标题 */ @ApiField("title") private String title; /** * 用户UID列表 */ @ApiListField("user_ids") @ApiField("string") private List<String> userIds; public String getAgentId() { return this.agentId; } public void setAgentId(String agentId) { this.agentId = agentId; } public String getContent() { return this.content; } public void setContent(String content) { this.content = content; } public String getGotoUrl() { return this.gotoUrl; } public void setGotoUrl(String gotoUrl) { this.gotoUrl = gotoUrl; } public String getImageUrl() { return this.imageUrl; } public void setImageUrl(String imageUrl) { this.imageUrl = imageUrl; } public String getMsgType() { return this.msgType; } public void setMsgType(String msgType) { this.msgType = msgType; } public String getReceiver() { return this.receiver; } public void setReceiver(String receiver) { this.receiver = receiver; } public String getTitle() { return this.title; } public void setTitle(String title) { this.title = title; } public List<String> getUserIds() { return this.userIds; } public void setUserIds(List<String> userIds) { this.userIds = userIds; } }
[ "zhongj@cdmhzx.com" ]
zhongj@cdmhzx.com
2127656e650a04583939af7bb0cdbf32d070aa68
7fed77277d32d9dd60b19a6e02346934a7c12fa6
/04-SpringMVC/src/br/com/fiap/model/Cerveja.java
a1e73ba3bd714ffb9f8777d1b00b12971f269646
[]
no_license
ViniciusSevero/FIAP-2TDSF-DBE-2sem
bff06d7a27f7340ed94b5ce0b223cb77da069896
f097efadde23cb07a8c171dc3baffe4ba3410f03
refs/heads/master
2021-01-15T15:05:50.113310
2017-09-12T12:21:03
2017-09-12T12:21:03
99,701,731
0
0
null
null
null
null
UTF-8
Java
false
false
1,153
java
package br.com.fiap.model; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.SequenceGenerator; @Entity @SequenceGenerator(allocationSize = 1, name = "seqCerveja", sequenceName = "SQ_T_CERVEJA") public class Cerveja { @Id @GeneratedValue(generator = "seqCerveja", strategy = GenerationType.SEQUENCE) private int codigo; private String nome; private String marca; private double valor; private double teorAlcoolico; public int getCodigo() { return codigo; } public String getNome() { return nome; } public String getMarca() { return marca; } public double getValor() { return valor; } public double getTeorAlcoolico() { return teorAlcoolico; } public void setCodigo(int codigo) { this.codigo = codigo; } public void setNome(String nome) { this.nome = nome; } public void setMarca(String marca) { this.marca = marca; } public void setValor(double valor) { this.valor = valor; } public void setTeorAlcoolico(double teorAlcoolico) { this.teorAlcoolico = teorAlcoolico; } }
[ "logonrm@fiap.com.br" ]
logonrm@fiap.com.br
a9e65876bd3c69493c5ca749267193785ddd8cc2
7ef841751c77207651aebf81273fcc972396c836
/astream/src/main/java/com/loki/astream/stubs/SampleClass1531.java
fe23e6b3e21c2d59a04faaed4d8e1417e49a707c
[]
no_license
SergiiGrechukha/ModuleApp
e28e4dd39505924f0d36b4a0c3acd76a67ed4118
00e22d51c8f7100e171217bcc61f440f94ab9c52
refs/heads/master
2022-05-07T13:27:37.704233
2019-11-22T07:11:19
2019-11-22T07:11:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
375
java
package com.loki.astream.stubs;import com.jenzz.pojobuilder.api.Builder;import com.jenzz.pojobuilder.api.Ignore; @Builder public class SampleClass1531 { @Ignore private SampleClass1532 sampleClass; public SampleClass1531(){ sampleClass = new SampleClass1532(); } public String getClassName() { return sampleClass.getClassName(); } }
[ "sergey.grechukha@gmail.com" ]
sergey.grechukha@gmail.com
dbcfd7c1073a919f3069626eda5fc5bdd863963a
963599f6f1f376ba94cbb504e8b324bcce5de7a3
/sources/p046io/reactivex/android/schedulers/HandlerScheduler.java
a50da4fbe8de437ac000383ab824847c08f3ba93
[]
no_license
NikiHard/cuddly-pancake
563718cb73fdc4b7b12c6233d9bf44f381dd6759
3a5aa80d25d12da08fd621dc3a15fbd536d0b3d4
refs/heads/main
2023-04-09T06:58:04.403056
2021-04-20T00:45:08
2021-04-20T00:45:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,570
java
package p046io.reactivex.android.schedulers; import android.os.Handler; import android.os.Message; import java.util.concurrent.TimeUnit; import p046io.reactivex.Scheduler; import p046io.reactivex.disposables.Disposable; import p046io.reactivex.disposables.Disposables; import p046io.reactivex.plugins.RxJavaPlugins; /* renamed from: io.reactivex.android.schedulers.HandlerScheduler */ final class HandlerScheduler extends Scheduler { private final Handler handler; HandlerScheduler(Handler handler2) { this.handler = handler2; } public Disposable scheduleDirect(Runnable runnable, long j, TimeUnit timeUnit) { if (runnable == null) { throw new NullPointerException("run == null"); } else if (timeUnit != null) { ScheduledRunnable scheduledRunnable = new ScheduledRunnable(this.handler, RxJavaPlugins.onSchedule(runnable)); this.handler.postDelayed(scheduledRunnable, timeUnit.toMillis(j)); return scheduledRunnable; } else { throw new NullPointerException("unit == null"); } } public Scheduler.Worker createWorker() { return new HandlerWorker(this.handler); } /* renamed from: io.reactivex.android.schedulers.HandlerScheduler$HandlerWorker */ private static final class HandlerWorker extends Scheduler.Worker { private volatile boolean disposed; private final Handler handler; HandlerWorker(Handler handler2) { this.handler = handler2; } public Disposable schedule(Runnable runnable, long j, TimeUnit timeUnit) { if (runnable == null) { throw new NullPointerException("run == null"); } else if (timeUnit == null) { throw new NullPointerException("unit == null"); } else if (this.disposed) { return Disposables.disposed(); } else { ScheduledRunnable scheduledRunnable = new ScheduledRunnable(this.handler, RxJavaPlugins.onSchedule(runnable)); Message obtain = Message.obtain(this.handler, scheduledRunnable); obtain.obj = this; this.handler.sendMessageDelayed(obtain, timeUnit.toMillis(j)); if (!this.disposed) { return scheduledRunnable; } this.handler.removeCallbacks(scheduledRunnable); return Disposables.disposed(); } } public void dispose() { this.disposed = true; this.handler.removeCallbacksAndMessages(this); } public boolean isDisposed() { return this.disposed; } } /* renamed from: io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable */ private static final class ScheduledRunnable implements Runnable, Disposable { private final Runnable delegate; private volatile boolean disposed; private final Handler handler; ScheduledRunnable(Handler handler2, Runnable runnable) { this.handler = handler2; this.delegate = runnable; } public void run() { try { this.delegate.run(); } catch (Throwable th) { RxJavaPlugins.onError(th); } } public void dispose() { this.disposed = true; this.handler.removeCallbacks(this); } public boolean isDisposed() { return this.disposed; } } }
[ "a.amirovv@mail.ru" ]
a.amirovv@mail.ru
2bf3d9ab5499621d411c1544e2585e6569ea8944
c474b03758be154e43758220e47b3403eb7fc1fc
/apk/decompiled/com.tinder_2018-07-26_source_from_JADX/sources/android/arch/lifecycle/C3979g.java
de631f898e65e3dd5e9318b5b6013963358fe486
[]
no_license
EstebanDalelR/tinderAnalysis
f80fe1f43b3b9dba283b5db1781189a0dd592c24
941e2c634c40e5dbf5585c6876ef33f2a578b65c
refs/heads/master
2020-04-04T09:03:32.659099
2018-11-23T20:41:28
2018-11-23T20:41:28
155,805,042
0
0
null
2018-11-18T16:02:45
2018-11-02T02:44:34
null
UTF-8
Java
false
false
2,649
java
package android.arch.lifecycle; import android.arch.core.p003b.C0008b; import android.support.annotation.CallSuper; import android.support.annotation.MainThread; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import java.util.Iterator; import java.util.Map.Entry; /* renamed from: android.arch.lifecycle.g */ public class C3979g<T> extends C2686i<T> { /* renamed from: a */ private C0008b<LiveData<?>, C2685a<?>> f12637a = new C0008b(); /* renamed from: android.arch.lifecycle.g$a */ private static class C2685a<V> implements Observer<V> { /* renamed from: a */ final LiveData<V> f8502a; /* renamed from: b */ final Observer<V> f8503b; /* renamed from: c */ int f8504c = -1; C2685a(LiveData<V> liveData, Observer<V> observer) { this.f8502a = liveData; this.f8503b = observer; } /* renamed from: a */ void m10473a() { this.f8502a.m67a((Observer) this); } /* renamed from: b */ void m10474b() { this.f8502a.mo3031b((Observer) this); } public void onChanged(@Nullable V v) { if (this.f8504c != this.f8502a.m69b()) { this.f8504c = this.f8502a.m69b(); this.f8503b.onChanged(v); } } } @MainThread /* renamed from: a */ public <S> void m15520a(@NonNull LiveData<S> liveData, @NonNull Observer<S> observer) { C2685a c2685a = new C2685a(liveData, observer); C2685a c2685a2 = (C2685a) this.f12637a.mo19a(liveData, c2685a); if (c2685a2 == null || c2685a2.f8503b == observer) { if (c2685a2 == null && m74e() != null) { c2685a.m10473a(); } return; } throw new IllegalArgumentException("This source was already added with the different observer"); } @MainThread /* renamed from: d */ public <S> void m15523d(@NonNull LiveData<S> liveData) { C2685a c2685a = (C2685a) this.f12637a.mo20b(liveData); if (c2685a != null) { c2685a.m10474b(); } } @CallSuper /* renamed from: c */ protected void mo24c() { Iterator it = this.f12637a.iterator(); while (it.hasNext()) { ((C2685a) ((Entry) it.next()).getValue()).m10473a(); } } @CallSuper /* renamed from: d */ protected void mo25d() { Iterator it = this.f12637a.iterator(); while (it.hasNext()) { ((C2685a) ((Entry) it.next()).getValue()).m10474b(); } } }
[ "jdguzmans@hotmail.com" ]
jdguzmans@hotmail.com
9d38cc37d9edb05fbadffbe6a759c805c6efd238
ca030864a3a1c24be6b9d1802c2353da4ca0d441
/classes2.dex_source_from_JADX/com/facebook/ufiservices/util/ContinueReadingSpan.java
8cd17055d9def253c2e9d201d1ffc52e4eed842b
[]
no_license
pxson001/facebook-app
87aa51e29195eeaae69adeb30219547f83a5b7b1
640630f078980f9818049625ebc42569c67c69f7
refs/heads/master
2020-04-07T20:36:45.758523
2018-03-07T09:04:57
2018-03-07T09:04:57
124,208,458
4
0
null
null
null
null
UTF-8
Java
false
false
1,041
java
package com.facebook.ufiservices.util; import android.content.Context; import android.text.TextPaint; import android.text.style.ClickableSpan; import android.view.View; import android.view.View.OnClickListener; import com.facebook.inject.Assisted; import com.facebook.inject.ForAppContext; import javax.annotation.Nullable; import javax.inject.Inject; /* compiled from: getSubscriberInfo */ public class ContinueReadingSpan extends ClickableSpan { private final Context f22506a; public int f22507b = 2131361858; private final OnClickListener f22508c; @Inject public ContinueReadingSpan(@ForAppContext Context context, @Nullable @Assisted OnClickListener onClickListener) { this.f22506a = context; this.f22508c = onClickListener; } public void onClick(View view) { this.f22508c.onClick(view); } public void updateDrawState(TextPaint textPaint) { textPaint.setUnderlineText(false); textPaint.setColor(this.f22506a.getResources().getColor(this.f22507b)); } }
[ "son.pham@jmango360.com" ]
son.pham@jmango360.com
b7cf44322f7c3cbe6836b512d43a715bfef56366
8ba7e66ca0c880a5b251e76309382e1bac17c3bd
/code/client/corepower/helloworld-coolsql/src/com/coolsql/sql/execute/ScriptStatementExecute.java
326cde80d7d40ddb29d9f3c48297b442f890679a
[]
no_license
gongweichuan/gongweichuan
b80571d21f8d8d00163fc809ed36aae78887ae40
65c4033f95257cd8f33bfd5723ba643291beb8ca
refs/heads/master
2016-09-05T20:12:18.033880
2013-04-09T15:53:28
2013-04-09T15:53:28
34,544,114
0
0
null
null
null
null
UTF-8
Java
false
false
8,177
java
/** * */ package com.coolsql.sql.execute; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.util.ArrayList; import java.util.List; import com.coolsql.bookmarkBean.Bookmark; import com.coolsql.pub.display.DelimiterDefinition; import com.coolsql.pub.parse.StringManager; import com.coolsql.pub.parse.StringManagerFactory; import com.coolsql.pub.util.ExceptionUtil; import com.coolsql.system.DatabaseSetting; import com.coolsql.system.Setting; import com.coolsql.view.log.ILogger; import com.coolsql.view.log.LogProxy; import com.coolsql.view.sqleditor.ScriptParser; /** * A class to run several statements from a script file. * * @author 刘孝林(kenny liu) * * 2008-3-29 create */ public class ScriptStatementExecute extends BaseMultiStatementExecute { private static final StringManager stringMgr = StringManagerFactory .getStringManager(ScriptStatementExecute.class); private DelimiterDefinition limiter; private List<File> filenames; private String encoding = null; // encoding of script file /** * alternative item, user can enable/disable them by modify the setting . */ private boolean checkEscapedQuotes = false; public ScriptStatementExecute(Bookmark bookmark) { this(bookmark, (List<File>) null); } public ScriptStatementExecute(Bookmark bookmark, List<File> filenames) { this(bookmark, filenames, null); } public ScriptStatementExecute(Bookmark bookmark, File[] filenames) { this(bookmark, filenames, null); } public ScriptStatementExecute(Bookmark bookmark, File[] files, IStatementExecute statementExecuter) { super(bookmark, statementExecuter); filenames = new ArrayList<File>(); for (File file : files) { filenames.add(file); } } public ScriptStatementExecute(Bookmark bookmark, List<File> filenames, IStatementExecute statementExecuter) { super(bookmark, statementExecuter); this.filenames = filenames; if (filenames == null) filenames = new ArrayList<File>(); } public void cancel() { cancelExecution = true; if (this.statementExecuter != null) statementExecuter.cancel(); } public void execute() { boolean isError = false; long start = System.currentTimeMillis(); String msg = ""; for (int i = 0; i < filenames.size(); i++) { File f = filenames.get(i); msg = stringMgr.getString("batchprocess.start") + " " + f.getAbsolutePath(); /** print msg to ui prompt, log view and outside logger */ fireMessageChanged(msg); printMessage(msg); LogProxy.getProxy().info(msg); try { isError = this.execute(f, encoding); } catch (Throwable e) { isError = true; LogProxy.errorReport(stringMgr .getString("batchprocess.filescript.error") + " " + f.getAbsolutePath(), e); if (e instanceof FileNotFoundException) { msg = stringMgr .getString("batchprocess.filescript.filenotfound") + f.getAbsolutePath(); } else { msg = e.getMessage(); } printMessage(stringMgr .getString("batchprocess.filescript.txtError") + ": " + msg); } if (isError && abortOnError) { break; } } long end = System.currentTimeMillis(); msg = stringMgr.getString("batchprocess.execute.totaltime") + (end - start) + " ms, "+stringMgr.getString("batchprocess.execute.updatedrows",updatedRowCount); LogProxy.getProxy().info(msg); printMessage(msg); fireMessageChanged(msg); if (abortOnError && isError) { this.isSuccess = false; } else { this.isSuccess = true; } isFinished = true; try { if (resultLogger != null) resultLogger.finishLog(); } finally { fireMessageChanged(stringMgr .getString("batchprocess.execute.finished")); } } protected boolean execute(File file, String encoding) throws IOException { DatabaseSetting dbSetting = Setting.getInstance().getDatabaseSetting( bookmark.getAliasName()); ScriptParser parser = new ScriptParser(); limiter = new DelimiterDefinition(dbSetting.getSQLStatementSeparator(), false); parser.setDelimiter(limiter); parser.setSupportOracleInclude(dbSetting.supportSingleLineCommands()); parser.setCheckForSingleLineCommands(dbSetting.supportShortInclude()); parser.setFile(file, encoding); parser.setCheckEscapedQuotes(this.checkEscapedQuotes); long start = System.currentTimeMillis(); long end = 0; String sql; boolean error = false; parser.startIterator(); while (parser.hasNext()) { sql = parser.getNextCommand(); if (sql == null) continue; try { error = executeSingleStatement(sql); if (this.cancelExecution) { String msg = stringMgr .getString("batchprocess.execute.cancel"); fireMessageChanged(msg); printMessage(msg); break; } } catch (Exception e) { printMessage(ExceptionUtil.getDisplay(e)); error = true; LogProxy.errorReport(stringMgr.getString("batchprocess.error") + " " + sql, e); break; } finally { executedCount++; } if (error && abortOnError) break; } end = System.currentTimeMillis(); StringBuilder msg = new StringBuilder(); msg.append(file.getCanonicalPath()); msg.append(": "); msg.append(executedCount); msg.append(' '); msg.append(stringMgr.getString("batchprocess.file.execute.sqlcount")); this.printMessage(msg.toString()); parser.done(); // if (this.showTiming) // { long execTime = (end - start); String m = stringMgr.getString("batchprocess.file.execute.costtime") + " " + (((double) execTime) / 1000.0) + "s"; this.printMessage(m); // } return error; } /** * @return the checkEscapedQuotes */ public boolean isCheckEscapedQuotes() { return this.checkEscapedQuotes; } /** * @param checkEscapedQuotes * the checkEscapedQuotes to set */ public void setCheckEscapedQuotes(boolean checkEscapedQuotes) { this.checkEscapedQuotes = checkEscapedQuotes; } /** * @return the encoding */ public String getEncoding() { return this.encoding; } /** * @param encoding * the encoding to set */ public void setEncoding(String encoding) { this.encoding = encoding; } /** * @return the limiter */ public DelimiterDefinition getLimiter() { return this.limiter; } /** * @param limiter * the limiter to set */ public void setLimiter(DelimiterDefinition limiter) { this.limiter = limiter; } /** * @return the verboseLogging */ public boolean isVerboseLogging() { return this.verboseLogging; } /** * @param verboseLogging * the verboseLogging to set */ public void setVerboseLogging(boolean verboseLogging) { this.verboseLogging = verboseLogging; } /** * @return the resultLogger */ public ILogger getResultLogger() { return this.resultLogger; } /** * @param resultLogger * the resultLogger to set */ public void setResultLogger(ILogger resultLogger) { this.resultLogger = resultLogger; } /** * @return the abortOnError */ public boolean isAbortOnError() { return this.abortOnError; } /** * @param abortOnError * the abortOnError to set */ public void setAbortOnError(boolean abortOnError) { this.abortOnError = abortOnError; } /** * @return the statementExecuter */ public IStatementExecute getStatementExecuter() { return this.statementExecuter; } /** * @param statementExecuter * the statementExecuter to set */ public void setStatementExecuter(IStatementExecute statementExecuter) { this.statementExecuter = statementExecuter; } /** * @return the cancelExecution */ public boolean isCancelExecution() { return this.cancelExecution; } /** * @return the executedCount */ public int getExecutedCount() { return this.executedCount; } /** * @return the isSuccess */ public boolean isSuccess() { return this.isSuccess; } }
[ "gongweichuan@gmail.com@934a62da-e7e6-11dd-bce9-bf72c0239d3a" ]
gongweichuan@gmail.com@934a62da-e7e6-11dd-bce9-bf72c0239d3a
0362b11f84c3fe5e3edfad7a0abd1d1f92d6b6ac
ebd2bbc19f85bec0aec634bd9294fa1945e32061
/dependencies/jclouds/openstack-keystone/1.6.0-wso2v1/src/main/java/org/jclouds/openstack/v2_0/services/ObjectStore.java
e271ddb1c3722aa6841baf10f0caac973eecac00
[]
no_license
madusankap/turing-1
da645af4886d562667dfd2f61b4aa184da093340
04edf79deefbe751f0dee518b3891f816cec2dbc
refs/heads/master
2019-01-02T01:46:09.216852
2014-12-18T11:04:09
2014-12-18T11:04:09
28,171,116
0
1
null
2023-03-20T11:52:10
2014-12-18T06:21:53
Java
UTF-8
Java
false
false
1,504
java
/** * Licensed to jclouds, Inc. (jclouds) under one or more * contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. jclouds 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.jclouds.openstack.v2_0.services; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import javax.inject.Qualifier; import org.jclouds.openstack.v2_0.ServiceType; /** * Object Storage (Swift) * * @author Adrian Cole * @see <a href="http://docs.openstack.org/api/openstack-typeentity-service/2.0/content/Identity-Service-Concepts-e1362.html" * /> * @see ServiceType#OBJECT_STORE */ @Retention(value = RetentionPolicy.RUNTIME) @Target(value = { ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD }) @Qualifier public @interface ObjectStore { }
[ "tharindua@wso2.com" ]
tharindua@wso2.com
ed807d50d5b592b8d822ca3e9529e811a8efd217
4120e073a4b0b2c79870e3ab87b294f98f47d0be
/app-itests/src/itest/java/com/rideaustin/driverstatus/C1177093IT.java
1877a3c249da6fa067ea8c3944c95ba40b25e52f
[ "MIT" ]
permissive
jyt109/server
8933281097303d14b5a329f0c679edea4fcd174b
24354717624c25b5d4faf0b7ea540e2742e8039f
refs/heads/master
2022-03-20T10:36:44.973843
2019-10-03T11:43:07
2019-10-03T11:43:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,855
java
package com.rideaustin.driverstatus; import static org.assertj.core.api.Assertions.assertThat; import javax.inject.Inject; import org.junit.Before; import org.junit.Test; import org.junit.experimental.categories.Category; import com.rideaustin.model.enums.ActiveDriverStatus; import com.rideaustin.model.ride.ActiveDriver; import com.rideaustin.model.user.Rider; import com.rideaustin.rest.exception.RideAustinException; import com.rideaustin.test.response.AreaQueuePositions; import com.rideaustin.service.ActiveDriverLocationService; import com.rideaustin.service.location.enums.LocationType; import com.rideaustin.service.model.OnlineDriverDto; import com.rideaustin.test.actions.cascaded.CascadedDriverAction; import com.rideaustin.test.asserts.DriverQueueAssert; import com.rideaustin.test.setup.C1177093Setup; import com.rideaustin.test.util.TestUtils; import com.rideaustin.testrail.TestCases; @Category(DriverStatusManagement.class) public class C1177093IT extends AbstractNonTxDriverStatusManagementTest<C1177093Setup> { @Inject private ActiveDriverLocationService activeDriverLocationService; @Override @Before public void setUp() throws Exception { super.setUp(); setup = createSetup(); } @Test @TestCases("C1177093") public void shouldNotGoOffline_WhenInQueue_DecliningOutsideRequests() throws Exception { ActiveDriver activeDriver = setup.getActiveDriver(); CascadedDriverAction cascadedAction = new CascadedDriverAction(activeDriver.getDriver(), driverAction); cascadedAction .goOnline(airportLocation.lat, airportLocation.lng) .locationUpdate(activeDriver, airportLocation.lat, airportLocation.lng); updateQueue(); AreaQueuePositions queuePosition = driverAction.getQueuePosition(activeDriver.getDriver()); DriverQueueAssert.assertThat(queuePosition) .hasPosition(TestUtils.REGULAR, 0) .hasLength(TestUtils.REGULAR, 1); Rider rider = setup.getRider(); for (int i = 0; i < declinedRidesLimit; i++) { Long ride = riderAction.requestRide(rider.getEmail(), austinCenter); awaitDispatch(activeDriver, ride); cascadedAction .withRideId(ride) .declineRide(); sleeper.sleep(10); } OnlineDriverDto updatedActiveDriver = activeDriverLocationService.getById(activeDriver.getId(), LocationType.ACTIVE_DRIVER); assertThat(updatedActiveDriver.getStatus()).isEqualTo(ActiveDriverStatus.AVAILABLE); assertThat(updatedActiveDriver.getAvailableCarCategoriesBitmask()).isEqualTo(1); queuePosition = driverAction.getQueuePosition(activeDriver.getDriver()); DriverQueueAssert.assertThat(queuePosition) .hasPosition(TestUtils.REGULAR, 0) .hasLength(TestUtils.REGULAR, 1); } protected void updateQueue() throws RideAustinException { queueService.updateStatuses(airport.getId()); } }
[ "mikhail.chugunov@crossover.com" ]
mikhail.chugunov@crossover.com
5bcd76e8d172c8fb13dd8835acbfa01dea404953
9623f83defac3911b4780bc408634c078da73387
/powercraft_16/forge/mcp/src/minecraft/powercraft/transport/blocks/PCtr_BlockTeleporter.java
d9f0e81a089d5a276cb42b527b81f125e7a86450
[]
no_license
BlearStudio/powercraft-legacy
42b839393223494748e8b5d05acdaf59f18bd6c6
014e9d4d71bd99823cf63d4fbdb65c1b83fde1f8
refs/heads/master
2021-01-21T21:18:55.774908
2015-04-06T20:45:25
2015-04-06T20:45:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
485
java
package powercraft.transport.blocks; import net.minecraft.block.material.Material; import powercraft.api.blocks.PC_Block; import powercraft.api.blocks.PC_BlockInfo; @PC_BlockInfo(name="Teleporter", blockid="teleporter", defaultid=4023) public class PCtr_BlockTeleporter extends PC_Block { public PCtr_BlockTeleporter(int id) { super(id, Material.ground); } @Override public void loadIcons() { } @Override public void registerRecipes() { } }
[ "rapus95@gmail.com@ed9f5d1b-00bb-0f29-faab-e8ebad1a710c" ]
rapus95@gmail.com@ed9f5d1b-00bb-0f29-faab-e8ebad1a710c
64d303b3fa925c754f1f4f8ac697b8e1be464d50
40665051fadf3fb75e5a8f655362126c1a2a3af6
/conghuahuadan-CNiaoShops/7b5d82648d14c91fb49e99789a312b6c596f58c0/48/SpUtils.java
ae5a4ff23d0094a5ec7f8bc19df53588ead3aeb6
[]
no_license
fermadeiral/StyleErrors
6f44379207e8490ba618365c54bdfef554fc4fde
d1a6149d9526eb757cf053bc971dbd92b2bfcdf1
refs/heads/master
2020-07-15T12:55:10.564494
2019-10-24T02:30:45
2019-10-24T02:30:45
205,546,543
2
0
null
null
null
null
UTF-8
Java
false
false
2,582
java
package com.chhd.per_library.util; import android.content.Context; import android.content.SharedPreferences; import com.chhd.per_library.util.UiUtils; public class SpUtils { private static final String NAME = "config"; private static SharedPreferences sharedPreferences; private SpUtils() { } public static boolean getBoolean(String key, boolean defValue) { if (sharedPreferences == null) { sharedPreferences = UiUtils.getContext().getSharedPreferences(NAME, Context.MODE_PRIVATE); } return sharedPreferences.getBoolean(key, defValue); } public static void putBoolean(String key, boolean value) { if (sharedPreferences == null) { sharedPreferences = UiUtils.getContext().getSharedPreferences(NAME, Context.MODE_PRIVATE); } sharedPreferences.edit().putBoolean(key, value).commit(); } public static int getInt(String key, int defValue) { if (sharedPreferences == null) { sharedPreferences = UiUtils.getContext().getSharedPreferences(NAME, Context.MODE_PRIVATE); } return sharedPreferences.getInt(key, defValue); } public static void putInt(String key, int value) { if (sharedPreferences == null) { sharedPreferences = UiUtils.getContext().getSharedPreferences(NAME, Context.MODE_PRIVATE); } sharedPreferences.edit().putInt(key, value).commit(); } public static long getLong(String key, long defValue) { if (sharedPreferences == null) { sharedPreferences = UiUtils.getContext().getSharedPreferences(NAME, Context.MODE_PRIVATE); } return sharedPreferences.getLong(key, defValue); } public static void putLong(String key, long value) { if (sharedPreferences == null) { sharedPreferences = UiUtils.getContext().getSharedPreferences(NAME, Context.MODE_PRIVATE); } sharedPreferences.edit().putLong(key, value).commit(); } public static String getString(String key, String defValue) { if (sharedPreferences == null) { sharedPreferences = UiUtils.getContext().getSharedPreferences(NAME, Context.MODE_PRIVATE); } return sharedPreferences.getString(key, defValue); } public static void putString(String key, String value) { if (sharedPreferences == null) { sharedPreferences = UiUtils.getContext().getSharedPreferences(NAME, Context.MODE_PRIVATE); } sharedPreferences.edit().putString(key, value).commit(); } }
[ "fer.madeiral@gmail.com" ]
fer.madeiral@gmail.com
ff586c3ebc3654ac42722d89c61a493e50531b19
750d656f08aae554f6bff22caa37000dbd9909fc
/src/main/java/pe/com/tss/runakuna/security/auth/ajax/AjaxAuthenticationProvider.java
ef3f3be2d806b2b23502af457cc1819ee5beb7ee
[]
no_license
joedayz/rkbackend
5c136568bf0cd6da76f06dbfbe30de3fad704fbb
0a95269aed1b8b2bad3b6a2d2a35aef78df7c5a9
refs/heads/master
2021-01-18T15:29:27.978597
2018-06-15T01:56:32
2018-06-15T01:56:32
86,655,434
0
13
null
null
null
null
UTF-8
Java
false
false
3,731
java
package pe.com.tss.runakuna.security.auth.ajax; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.security.authentication.AuthenticationProvider; import org.springframework.security.authentication.BadCredentialsException; import org.springframework.security.authentication.InsufficientAuthenticationException; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.AuthenticationException; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.stereotype.Component; import org.springframework.util.Assert; import pe.com.tss.runakuna.domain.model.entities.Usuario; import pe.com.tss.runakuna.security.model.UserContext; import pe.com.tss.runakuna.service.LdapService; import pe.com.tss.runakuna.service.impl.DatabaseUserService; import java.util.List; import java.util.stream.Collectors; /** * Created by josediaz on 23/11/2016. */ @Component public class AjaxAuthenticationProvider implements AuthenticationProvider { private final BCryptPasswordEncoder encoder; private final DatabaseUserService userService; @Value("${spring.security.ldap.active}") private boolean ldapActive; @Autowired private LdapService ldapService; @Autowired public AjaxAuthenticationProvider(final DatabaseUserService userService, final BCryptPasswordEncoder encoder) { this.userService = userService; this.encoder = encoder; } @Override public Authentication authenticate(Authentication authentication) throws AuthenticationException { Assert.notNull(authentication, "Datos de autenticaci\u00f3n no proveidos"); String username = (String) authentication.getPrincipal(); String password = (String) authentication.getCredentials(); Usuario user = null; if(ldapActive){ if(!ldapService.authenticate(username, password)){ //throw new BadCredentialsException("Fallo la autenticación. Usuario o contraseña no validos."); throw new BadCredentialsException("Usuario o contrase\u00f1a no v\u00e1lidos."); } } user = userService.getByUsername(username).orElseThrow(() -> new UsernameNotFoundException("Usuario no encontrado: " + username)); if(!ldapActive && !"A".equalsIgnoreCase(user.getEstado())){ throw new BadCredentialsException("Usuario inactivo."); } if (!ldapActive && !encoder.matches(password, user.getPassword())) { throw new BadCredentialsException("Usuario o contrase\u00f1a no v\u00e1lidos."); } if (user.getRoles() == null) throw new InsufficientAuthenticationException("Usuario no tiene roles asignados"); List<GrantedAuthority> authorities = user.getRoles().stream() .map(authority -> new SimpleGrantedAuthority(authority.getRol().authority())) .collect(Collectors.toList()); UserContext userContext = UserContext.create(user.getIdUsuario(), authorities); return new UsernamePasswordAuthenticationToken(userContext, null, userContext.getAuthorities()); } @Override public boolean supports(Class<?> authentication) { return (UsernamePasswordAuthenticationToken.class.isAssignableFrom(authentication)); } }
[ "jose.diaz@joedayz.pe" ]
jose.diaz@joedayz.pe
6e180654c545e4851f6551e5552945832d285fac
0de0950d06cbae52ed4dd5199f005fbb935aecee
/src/edu/nyu/cs/designpatterns/chapter08/barista/CaffeineBeverage.java
8ff09f4355e83e0cce59673e9ca0f79f91cbbad3
[]
no_license
elevenlee/HeadFirstDesignPatterns
3df6a1c9fe5a273c74d02346bcd36895b8a26aed
b57288ba4084a12dc6896ca0b62d6921c7f51550
refs/heads/master
2021-01-18T16:12:04.147608
2015-06-01T02:28:13
2015-06-01T02:28:13
27,415,277
0
0
null
null
null
null
UTF-8
Java
false
false
457
java
package edu.nyu.cs.designpatterns.chapter08.barista; public abstract class CaffeineBeverage { final void prepareRecipe() { boilWater(); brew(); pourInCup(); addCondiments(); } abstract void brew(); abstract void addCondiments(); void boilWater() { System.out.println("Boiling water"); } void pourInCup() { System.out.println("Pouring into cup"); } }
[ "sl3268@nyu.edu" ]
sl3268@nyu.edu
449396e198a319f447d02f41c3099c9d3778af3e
d29975b29645049f7f49ee57a76aa06c5442d6f1
/app/src/main/java/com/example/q/pocketmusic/view/widget/net/ToastUtil.java
9d5740ddab097fc0097588a1d20c83cb66b5316d
[]
no_license
ITVIP/PocketMusic
6f1cc2f5d425868d7cf9cb99900e0b348fe44136
17e2e36fe3a78b6bd228e38068f2c7a080c813f4
refs/heads/master
2020-06-02T18:45:31.108854
2017-05-04T14:46:34
2017-05-04T14:46:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,100
java
package com.example.q.pocketmusic.view.widget.net; import android.content.Context; import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; /** * Created by YQ on 2016/9/24. */ //可自定义Toast(未使用) public class ToastUtil { private Toast toast; private LinearLayout toastView; /** * 修改原布局的Toast */ public ToastUtil() { } /** * 完全自定义布局Toast * * @param context * @param view */ public ToastUtil(Context context, View view, int duration) { toast = new Toast(context); toast.setView(view); toast.setDuration(duration); } /** * 向Toast中添加自定义view * * @param view * @param postion * @return */ public ToastUtil addView(View view, int postion) { toastView = (LinearLayout) toast.getView(); toastView.addView(view, postion); return this; } /** * 设置Toast字体及背景颜色 * * @param messageColor * @param backgroundColor * @return */ public ToastUtil setToastColor(int messageColor, int backgroundColor) { View view = toast.getView(); if (view != null) { TextView message = ((TextView) view.findViewById(android.R.id.message)); message.setBackgroundColor(backgroundColor); message.setTextColor(messageColor); } return this; } /** * 设置Toast字体及背景 * * @param messageColor * @param background * @return */ public ToastUtil setToastBackground(int messageColor, int background) { View view = toast.getView(); if (view != null) { TextView message = ((TextView) view.findViewById(android.R.id.message)); message.setBackgroundResource(background); message.setTextColor(messageColor); } return this; } /** * 短时间显示Toast */ public ToastUtil Short(Context context, CharSequence message) { if (toast == null || (toastView != null && toastView.getChildCount() > 1)) { toast = Toast.makeText(context, message, Toast.LENGTH_SHORT); toastView = null; } else { toast.setText(message); toast.setDuration(Toast.LENGTH_SHORT); } return this; } /** * 短时间显示Toast */ public ToastUtil Short(Context context, int message) { if (toast == null || (toastView != null && toastView.getChildCount() > 1)) { toast = Toast.makeText(context, message, Toast.LENGTH_SHORT); toastView = null; } else { toast.setText(message); toast.setDuration(Toast.LENGTH_SHORT); } return this; } /** * 长时间显示Toast */ public ToastUtil Long(Context context, CharSequence message) { if (toast == null || (toastView != null && toastView.getChildCount() > 1)) { toast = Toast.makeText(context, message, Toast.LENGTH_LONG); toastView = null; } else { toast.setText(message); toast.setDuration(Toast.LENGTH_LONG); } return this; } /** * 长时间显示Toast * * @param context * @param message */ public ToastUtil Long(Context context, int message) { if (toast == null || (toastView != null && toastView.getChildCount() > 1)) { toast = Toast.makeText(context, message, Toast.LENGTH_LONG); toastView = null; } else { toast.setText(message); toast.setDuration(Toast.LENGTH_LONG); } return this; } /** * 自定义显示Toast时间 * * @param context * @param message * @param duration */ public ToastUtil Indefinite(Context context, CharSequence message, int duration) { if (toast == null || (toastView != null && toastView.getChildCount() > 1)) { toast = Toast.makeText(context, message, duration); toastView = null; } else { toast.setText(message); toast.setDuration(duration); } return this; } /** * 自定义显示Toast时间 * * @param context * @param message * @param duration */ public ToastUtil Indefinite(Context context, int message, int duration) { if (toast == null || (toastView != null && toastView.getChildCount() > 1)) { toast = Toast.makeText(context, message, duration); toastView = null; } else { toast.setText(message); toast.setDuration(duration); } return this; } /** * 显示Toast * * @return */ public ToastUtil show() { toast.show(); return this; } /** * 获取Toast * * @return */ public Toast getToast() { return toast; } }
[ "812568684@qq.com" ]
812568684@qq.com
55775f96ebc3693a9372674a14aaa5a922d6a594
995f73d30450a6dce6bc7145d89344b4ad6e0622
/Mate20-9.0/src/main/java/com/android/server/hidata/wavemapping/entity/ModelInfo.java
a52a377ade8386c0423909bb1afd1d59b6284044
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,722
java
package com.android.server.hidata.wavemapping.entity; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; public class ModelInfo { private String[] bssidLst; private int dataLen; private int[][] datas; private ArrayList<HashMap<String, Integer>> hpDatas; private String modelName; private String place; private HashSet<String> setBssids; private String storePath; private String updateTime; public String getModelName() { return this.modelName; } public void setModelName(String modelName2) { this.modelName = modelName2; } public ArrayList<HashMap<String, Integer>> getHpDatas() { return this.hpDatas; } public void setHpDatas(ArrayList<HashMap<String, Integer>> hpDatas2) { this.hpDatas = hpDatas2; } public int getDataLen() { return this.dataLen; } public void setDataLen(int dataLen2) { this.dataLen = dataLen2; } public HashSet<String> getSetBssids() { return this.setBssids; } public void setSetBssids(HashSet<String> setBssids2) { this.setBssids = setBssids2; } public String[] getBssidLst() { if (this.bssidLst == null) { return new String[0]; } return (String[]) this.bssidLst.clone(); } public void setBssidLst(String[] bssidLst2) { if (bssidLst2 == null) { this.bssidLst = null; } else { this.bssidLst = (String[]) bssidLst2.clone(); } } public int[][] getDatas() { if (this.datas == null) { return new int[0][]; } return (int[][]) this.datas.clone(); } public void setDatas(int[][] datas2) { if (datas2 == null) { this.datas = null; } else { this.datas = (int[][]) datas2.clone(); } } public ModelInfo(String place2, String storePath2, String updateTime2) { this.place = place2; this.storePath = storePath2; this.updateTime = updateTime2; } public ModelInfo(String place2, int modelName2) { this.place = place2; this.modelName = Integer.toString(modelName2); } public String getPlace() { return this.place; } public void setPlace(String place2) { this.place = place2; } public String getStorePath() { return this.storePath; } public void setStorePath(String storePath2) { this.storePath = storePath2; } public String getUpdateTime() { return this.updateTime; } public void setUpdateTime(String updateTime2) { this.updateTime = updateTime2; } }
[ "dstmath@163.com" ]
dstmath@163.com
cb6391bdca3b24e4f99ab3ef5719d8f92c277ba9
c28c86d0bf2545e6457603b0f56cedf6a611aff1
/demo/src/main/java/sql/FileDemo.java
7e7c8109dda4315645ca900acd7087ea023e43b9
[]
no_license
YangShuailing/test-1
01e4ac09aeb4b00561a6785f26a8531c5871348a
4c6c22ebb1f6e2e49ed3f3d259b4cb0fe2b3eadc
refs/heads/master
2021-05-04T23:01:27.767081
2018-01-16T15:08:26
2018-01-16T15:08:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,715
java
package sql; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.InputStream; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class FileDemo { // JDBC driver name and database URL private static final String DB_URL = "jdbc:postgresql://localhost:5432/postgres"; //"jdbc:postgresql://localhost:5432/postgres?" + "user=postgres&password=1Qaz&useUnicode=true&characterEncoding=UTF8"; // Database credentials private static final String USER = "postgres"; private static final String PASS = "1Qaz"; public static void main(String[] args) { Connection conn = null; PreparedStatement pstmt = null; Statement stmt = null; ResultSet rs; try { // Register JDBC driver Class.forName("org.postgresql.Driver"); // Open a connection System.out.println("Connecting to database..."); conn = DriverManager.getConnection(DB_URL, USER, PASS); //Create a Statement object and build table stmt = conn.createStatement(); createXMLTable(stmt); //Open a FileInputStream File file = new File("D:\\Java_ex\\test\\src\\test\\resources\\Data.xml"); long fileLength = file.length(); // InputStream is = new FileInputStream(file); FileInputStream fis = new FileInputStream(file); //Create PreparedStatement and stream data String SQL = "INSERT INTO XML_Data VALUES (?,?)"; pstmt = conn.prepareStatement(SQL); pstmt.setInt(1, 100); pstmt.setAsciiStream(2, fis, (int) fileLength); pstmt.execute(); fis.close(); SQL = "SELECT Data FROM XML_Data WHERE id=100"; rs = stmt.executeQuery(SQL); // Get the first row if (rs.next()) { //Retrieve data from input stream InputStream xmlInputStream = rs.getAsciiStream(1); int c; ByteArrayOutputStream bos = new ByteArrayOutputStream(); while ((c = xmlInputStream.read()) != -1) bos.write(c); System.out.println(bos.toString()); } rs.close(); stmt.close(); pstmt.close(); conn.close(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (stmt != null) stmt.close(); } catch (SQLException se) { se.printStackTrace(); } try { if (pstmt != null) pstmt.close(); } catch (SQLException se2) { se2.printStackTrace(); } try { if (conn != null) conn.close(); } catch (SQLException se) { se.printStackTrace(); } } System.out.println("Goodbye!"); } private static void createXMLTable(Statement stmt) throws SQLException { System.out.println("Creating XML_Data table..."); //Create SQL Statement String streamingDataSql = "CREATE TABLE XML_Data " + "(id INTEGER, Data LONG)"; //Drop table first if it exists. try { stmt.executeUpdate("DROP TABLE XML_Data"); } catch (SQLException se) { se.printStackTrace(); } //Build table. stmt.executeUpdate(streamingDataSql); } }
[ "1224017485@qq.com" ]
1224017485@qq.com
e076ba99252d612520581187c6e08e5ed60ad56b
5ec06dab1409d790496ce082dacb321392b32fe9
/clients/java-vertx/generated/src/main/java/org/openapitools/server/api/model/ComAdobeCqSocialConnectOauthImplSocialOAuthAuthenticationHandleProperties.java
c0a6d417811202adb57beb3ec53a5ffc302e3e89
[ "Apache-2.0" ]
permissive
shinesolutions/swagger-aem-osgi
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
c2f6e076971d2592c1cbd3f70695c679e807396b
refs/heads/master
2022-10-29T13:07:40.422092
2021-04-09T07:46:03
2021-04-09T07:46:03
190,217,155
3
3
Apache-2.0
2022-10-05T03:26:20
2019-06-04T14:23:28
null
UTF-8
Java
false
false
2,726
java
package org.openapitools.server.api.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import org.openapitools.server.api.model.ConfigNodePropertyArray; import org.openapitools.server.api.model.ConfigNodePropertyInteger; @JsonInclude(JsonInclude.Include.NON_NULL) public class ComAdobeCqSocialConnectOauthImplSocialOAuthAuthenticationHandleProperties { private ConfigNodePropertyArray path = null; private ConfigNodePropertyInteger serviceRanking = null; public ComAdobeCqSocialConnectOauthImplSocialOAuthAuthenticationHandleProperties () { } public ComAdobeCqSocialConnectOauthImplSocialOAuthAuthenticationHandleProperties (ConfigNodePropertyArray path, ConfigNodePropertyInteger serviceRanking) { this.path = path; this.serviceRanking = serviceRanking; } @JsonProperty("path") public ConfigNodePropertyArray getPath() { return path; } public void setPath(ConfigNodePropertyArray path) { this.path = path; } @JsonProperty("service.ranking") public ConfigNodePropertyInteger getServiceRanking() { return serviceRanking; } public void setServiceRanking(ConfigNodePropertyInteger serviceRanking) { this.serviceRanking = serviceRanking; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ComAdobeCqSocialConnectOauthImplSocialOAuthAuthenticationHandleProperties comAdobeCqSocialConnectOauthImplSocialOAuthAuthenticationHandleProperties = (ComAdobeCqSocialConnectOauthImplSocialOAuthAuthenticationHandleProperties) o; return Objects.equals(path, comAdobeCqSocialConnectOauthImplSocialOAuthAuthenticationHandleProperties.path) && Objects.equals(serviceRanking, comAdobeCqSocialConnectOauthImplSocialOAuthAuthenticationHandleProperties.serviceRanking); } @Override public int hashCode() { return Objects.hash(path, serviceRanking); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ComAdobeCqSocialConnectOauthImplSocialOAuthAuthenticationHandleProperties {\n"); sb.append(" path: ").append(toIndentedString(path)).append("\n"); sb.append(" serviceRanking: ").append(toIndentedString(serviceRanking)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "cliffano@gmail.com" ]
cliffano@gmail.com
8b0c0d358f687d192b1258e15a85dc2e8231b38f
838576cc2e44f590d4c59f8a4d120f629969eedf
/src/com/sino/ams/task/service/internal/ReportDataProduceService.java
947732c4ccd3238856b9e32ede5b433215cad4dc
[]
no_license
fancq/CQEAM
ecbfec8290fc4c213101b88365f7edd4b668fdc8
5dbb23cde5f062d96007f615ddae8fd474cb37d8
refs/heads/master
2021-01-16T20:33:40.983759
2013-09-03T16:00:57
2013-09-03T16:00:57
null
0
0
null
null
null
null
GB18030
Java
false
false
2,300
java
package com.sino.ams.task.service.internal; import com.sino.ams.task.dao.internal.AccountPeriodSearchDAO; import com.sino.ams.task.service.AbstractTaskService; import com.sino.base.db.conn.DBManager; import com.sino.base.exception.DataHandleException; import com.sino.base.log.Logger; import java.sql.CallableStatement; import java.sql.Connection; import java.sql.SQLException; import java.sql.Types; /** * <p>标题: SinoEAM中国移动资产管理系统后台同步任务:业务服务层对象</p> * <p>描述: 报表跑数的后台服务,该服务仅用于启动存储过程</p> * <p>版权: 根据中华人民共和国相关法律以及中华人民共和国加入的相关国际公约审定</p> * <p>开发商: 北京思诺博信息技术有限公司</p> * * @author 唐明胜 * @version 1.0 */ public class ReportDataProduceService extends AbstractTaskService { /** * <p>功能说明:从各相关应用表生成报表数据到报表相关模型表。</p> * * @throws com.sino.base.exception.DataHandleException * 数据转移出错时抛出数据处理异常 */ public void produceReportData() throws DataHandleException { Connection conn = null; CallableStatement cStmt = null; try { conn = DBManager.getDBConnection(); initTaskExecutor(conn); AccountPeriodSearchDAO accountPeriodDAO = new AccountPeriodSearchDAO(taskExecutor, conn); String accountPeriod = accountPeriodDAO.getMaxAccountPeriod(); if (accountPeriod.length() > 0) { String sqlStr = "{call dbo.APP_EAM_FA_ANALYSIS_DATA(?,?)}"; cStmt = conn.prepareCall(sqlStr); cStmt.setString(1, accountPeriod); cStmt.registerOutParameter(2, Types.INTEGER); cStmt.execute(); } } catch (SQLException ex) { Logger.logError(ex); throw new DataHandleException(ex); } catch (Throwable ex) { Logger.logError(ex); throw new DataHandleException(ex.getMessage()); } finally { DBManager.closeDBStatement(cStmt); DBManager.closeDBConnection(conn); } } }
[ "lq_xm@163.com" ]
lq_xm@163.com
c7fde3773dda4bbb599a4a66ee5f9e6faab8ab5c
aa424c208191a7bcd14a4248f74f9963a2dc2a1d
/src/main/java/vn/mog/ewallet/operation/web/thirdparty/system/integration/payment/contract/transaction/PhoneTopupTransactionOnHoldResponse.java
a6645105cb554e839b602d0b9fa99cba83942b34
[]
no_license
duongvic/wallet-operation-web
50f85669461d337740a25d8f602e2865f1d3503e
11f0c5c10054f780ea45faa3b610cb1ab1b7818b
refs/heads/master
2023-07-02T17:49:59.324117
2021-08-18T04:59:36
2021-08-18T04:59:36
397,476,761
0
0
null
null
null
null
UTF-8
Java
false
false
307
java
package vn.mog.ewallet.operation.web.thirdparty.system.integration.payment.contract.transaction; import java.io.Serializable; public class PhoneTopupTransactionOnHoldResponse extends PhoneTopupTransactionOnHoldResponseType implements Serializable { private static final long serialVersionUID = 1L; }
[ "DuongNH43@fpt.com.vn" ]
DuongNH43@fpt.com.vn
155a1a735d3198c28e427a92e308d5afb9a83734
d197603718990bb9c42203664f9e61a4400d3771
/blogcore/src/main/java/cn/compaind/duck/step1/MallardDuck.java
1973ba6580d5589d15d7d8b87cf24a72f00e64e7
[]
no_license
ZhouKaiDongGitHub/kzhou
e107ae6a49ae6f0424f2337f8c7b535cf5b4f2ad
43e74abd7a3545f4eb814d34895fce2be5df8901
refs/heads/master
2023-01-05T08:44:44.851787
2019-08-07T03:03:04
2019-08-07T03:03:04
200,954,298
1
0
null
2023-01-02T22:12:45
2019-08-07T02:08:17
Java
UTF-8
Java
false
false
166
java
package cn.compaind.duck.step1; public class MallardDuck implements Quickable { @Override public void quick() { System.out.println("Quack"); } }
[ "Kaidong.Zhou@eisgroup.com" ]
Kaidong.Zhou@eisgroup.com
5da2951df309336d9e3fc0d4e6654057788ab3c0
21e3d5f861e3bb2b7d64aa9c914f300a542235cb
/src/main/java/io/growing/graphql/model/QueryCountFrequencyAnalysesParametrizedInput.java
6fb1827bed1dd3e43f7f5963aa118ec5c6f28330
[ "MIT" ]
permissive
okpiaoxuefeng98/growingio-graphql-javasdk
d274378dad69d971fe14207f74d7a3135959460b
97a75faf337446fa16536a42a3b744f7fc992fb4
refs/heads/master
2023-02-04T15:38:13.627500
2020-12-24T07:25:32
2020-12-24T07:25:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,221
java
package io.growing.graphql.model; import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLParametrizedInput; import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequestSerializer; import java.util.StringJoiner; /** * Parametrized input for field countFrequencyAnalyses in type Query */ @javax.annotation.Generated( value = "com.kobylynskyi.graphql.codegen.GraphQLCodegen", date = "2020-12-22T15:45:57+0800" ) public class QueryCountFrequencyAnalysesParametrizedInput implements GraphQLParametrizedInput { @javax.validation.constraints.NotNull private String projectId; public QueryCountFrequencyAnalysesParametrizedInput() { } public QueryCountFrequencyAnalysesParametrizedInput(String projectId) { this.projectId = projectId; } public QueryCountFrequencyAnalysesParametrizedInput projectId(String projectId) { this.projectId = projectId; return this; } @Override public String toString() { StringJoiner joiner = new StringJoiner(", ", "(", ")"); if (projectId != null) { joiner.add("projectId: " + GraphQLRequestSerializer.getEntry(projectId)); } return joiner.toString(); } }
[ "dreamylost@outlook.com" ]
dreamylost@outlook.com
53a7d73dedf01c65e179d679bac17533c35f4bac
c7c7c0df36104921847948a9e5478532811d99c8
/src/ifc4javatoolbox/ifc4/IfcPresentationStyleSelect.java
d63f4428da1d9f592b151aa5174dc19dda1ce029
[]
no_license
puneetarora2000/buildingrules
c57b63a2a3328cd458249ceb6eacb4a5dcf05c06
829a739360165fd395f12be511c702f53676df73
refs/heads/master
2020-04-17T17:07:38.978972
2016-12-21T06:23:58
2016-12-21T06:23:58
66,047,861
0
0
null
null
null
null
UTF-8
Java
false
false
933
java
/* Generated By: IFC Tools Project EXPRESS TO JAVA COMPILER: Do not edit this file!! */ package ifc4javatoolbox.ifc4; /** * This is a default implementation of the select type IfcPresentationStyleSelect<br><br> *<br><br> * Copyright: CC BY-NC-SA 3.0 DE (cc) 2013 Eike Tauscher and Michael Theiler<br><br> * The whole package including this class is licensed under<br> * <a rel='license' href='http://creativecommons.org/licenses/by-nc-sa/3.0/de/deed.en/'> * Creative Commons Attribution-Non-Commercial-Share Alike 3.0 Germany</a>.<br><br> * If you are using the package or parts of it in any commercial way, a commercial license is required. * Visit <a href='http://www.ifctoolsproject.com'>http://www.ifctoolsproject.com</a> for more information * or contact us directly: <a href='mailto:info@ifctoolsproject.com'>info@ifctoolsproject.com</a><br> */ public interface IfcPresentationStyleSelect extends RootInterface { }
[ "puneetarora2000@gmail.com" ]
puneetarora2000@gmail.com
e8a4b59672868c522a1ee6c2b0b3c14f62e3086d
60b21a8028118da05833ce01fec4dff27ebe41e5
/app/src/main/java/com/lemelo/controlev1/ThreadAsyncTask.java
4b8c9749be76b590f698bda4eb5b9be45755c1b5
[]
no_license
leocij/Controle-v1---Front-End-em-Android
ba3b4138d308c29d62d9b34d81986b5ce897f12c
e3571a25e319cc185d18c0895bad02f490100bc0
refs/heads/master
2021-01-22T22:20:13.352238
2017-05-29T19:21:10
2017-05-29T19:21:10
92,768,624
0
0
null
null
null
null
UTF-8
Java
false
false
2,834
java
package com.lemelo.controlev1; import android.os.AsyncTask; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; /* * Created by leoci on 27/05/2017. */ public class ThreadAsyncTask extends AsyncTask<String,String,String> { private String method; private StringBuffer buffer; private int codeResponse; @Override protected String doInBackground(String... params) { HttpURLConnection httpURLConnection = null; BufferedReader reader = null; try { URL url = new URL(params[0]); httpURLConnection = (HttpURLConnection) url.openConnection(); httpURLConnection.setRequestMethod(getMethod()); httpURLConnection.setRequestProperty("Content-Type", "application/json"); httpURLConnection.setRequestProperty("Cookie", "JSESSIONID=" + params[2]); httpURLConnection.setDoInput(true); int codeResponse = httpURLConnection.getResponseCode(); if (codeResponse == 200) { if (getMethod().equals("GET")) { InputStream inputStream = httpURLConnection.getInputStream(); reader = new BufferedReader(new InputStreamReader(inputStream)); StringBuffer buffer = new StringBuffer(); String linha; while ((linha = reader.readLine()) != null) { buffer.append(linha); buffer.append("\n"); } setBuffer(buffer); return "buffer"; } } else { setCodeResponse(codeResponse); return "http"; } } catch (MalformedURLException e) { e.printStackTrace(); if (httpURLConnection != null) { httpURLConnection.disconnect(); } if (reader != null) { try { reader.close(); } catch (IOException e1) { e1.printStackTrace(); } } } catch (IOException e) { e.printStackTrace(); } return null; } public void setMethod(String method) { this.method = method; } public String getMethod() { return method; } public void setBuffer(StringBuffer buffer) { this.buffer = buffer; } public void setCodeResponse(int codeResponse) { this.codeResponse = codeResponse; } public int getCodeResponse() { return codeResponse; } public StringBuffer getBuffer() { return buffer; } }
[ "leocij@hotmail.com" ]
leocij@hotmail.com
163412154cc0b6a494b9c83316b56613bd357869
3b22f7a5d32ee72494fb50538027d6fd37e782ad
/src/test/java/com/kousenit/interfaces/SumNumbersTest.java
7868f4f905852c8480abe3d3354c440c9e50e80a
[]
no_license
kousen/java_latest
2b12e423fe295be38fdfe31e6e2284bcc3579ed9
aaa84ed83cb15aa1427d3a57b59e970fba5ee2c2
refs/heads/main
2023-08-16T23:02:11.489746
2023-08-15T18:31:34
2023-08-15T18:31:34
243,598,153
94
56
null
null
null
null
UTF-8
Java
false
false
2,061
java
package com.kousenit.interfaces; import org.junit.jupiter.api.Test; import java.lang.reflect.Method; import java.util.List; import java.util.function.IntPredicate; import java.util.stream.Collectors; import java.util.stream.IntStream; import java.util.stream.Stream; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.junit.jupiter.api.Assertions.assertEquals; public class SumNumbersTest { private final SumNumbers demo = new PrivateDemo(); @Test public void addEvens() { assertEquals(2 + 4 + 6, demo.addEvens(1, 2, 3, 4, 5, 6)); } @Test public void addOdds() { assertEquals(1 + 3 + 5, demo.addOdds(1, 2, 3, 4, 5, 6)); } private List<Method> nonObjectMethods(Method[] methods) { return Stream.of(methods) .filter(method -> !method.getDeclaringClass().equals(Object.class)) .collect(Collectors.toList()); } @Test public void checkMethods() throws Exception { List<Method> methods = nonObjectMethods(demo.getClass().getDeclaredMethods()); assertEquals(0, methods.size()); methods = nonObjectMethods(demo.getClass().getMethods()); assertEquals(2, methods.size()); List<String> names = methods.stream() .map(Method::getName) .collect(Collectors.toList()); String[] correct = new String[]{"addEvens", "addOdds"}; assertThat(names, containsInAnyOrder(correct)); Class<?>[] interfaces = demo.getClass().getInterfaces(); assertEquals(1, interfaces.length); assertEquals(SumNumbers.class, interfaces[0]); Method add = interfaces[0] .getDeclaredMethod("add", IntPredicate.class, int[].class); add.setAccessible(true); int[] ints = IntStream.rangeClosed(1, 5).toArray(); IntPredicate predicate = e -> true; Object result = add.invoke(demo, predicate, ints); assertEquals(1 + 2 + 3 + 4 + 5, result); } }
[ "ken.kousen@kousenit.com" ]
ken.kousen@kousenit.com
be3bc1e42434cdb4d1a08d0374455a077b9d6c26
c82f89b0e6d1547c2829422e7de7664b378c1039
/src/com/hongyu/dao/HyTicketSubscribePriceDao.java
0e814fcd99667b900f8a5969911dc92927df0d6c
[]
no_license
chenxiaoyin3/shetuan_backend
1bab5327cafd42c8086c25ade7e8ce08fda6a1ac
e21a0b14a2427c9ad52ed00f68d5cce2689fdaeb
refs/heads/master
2022-05-15T14:52:07.137000
2022-04-07T03:30:57
2022-04-07T03:30:57
250,762,749
1
2
null
null
null
null
UTF-8
Java
false
false
198
java
package com.hongyu.dao; import com.grain.dao.BaseDao; import com.hongyu.entity.HyTicketSubscribePrice; public interface HyTicketSubscribePriceDao extends BaseDao<HyTicketSubscribePrice,Long> { }
[ "925544714@qq.com" ]
925544714@qq.com
a0ed9f6f910c0c65c61c139a2d811b061520e25b
8502e1e47522318bf3539d5ef057f124e2e75166
/1.4/test/wsdl/xsd/CPWSImplServiceTestCase.java
c77463b730e1afcae31abdf3d04b4fb31a17d46b
[ "Apache-2.0" ]
permissive
YellowfinBI/apache-axis
5833d3b86ab9fef3f3264c05592ef7ed66e6970a
e7640afc686fb3f48a211bc956e03820c345c4ba
refs/heads/master
2023-05-24T17:22:30.715882
2023-05-18T00:56:42
2023-05-18T00:56:42
78,585,682
0
1
null
2023-05-18T00:56:43
2017-01-10T23:56:51
Java
UTF-8
Java
false
false
1,686
java
/** * CPWSImplServiceTestCase.java * * This file was auto-generated from WSDL * by the Apache Axis 1.2alpha Dec 09, 2003 (01:27:53 EST) WSDL2Java emitter. */ package test.wsdl.xsd; import junit.framework.TestCase; import org.apache.axis.Constants; import org.apache.axis.wsdl.gen.Parser; import org.apache.axis.wsdl.symbolTable.DefinedType; import org.apache.axis.wsdl.symbolTable.ElementDecl; import org.apache.axis.wsdl.symbolTable.SchemaUtils; import org.apache.axis.wsdl.symbolTable.SymbolTable; import javax.xml.namespace.QName; import java.util.Vector; public class CPWSImplServiceTestCase extends TestCase { public CPWSImplServiceTestCase(java.lang.String name) { super(name); } /** Test case for Bug 25161 Axis 1.2 alpha WSDL xsd types problem prevent .Net integration */ public void testCPWebServicesWSDL() throws Exception { String url = new test.wsdl.xsd.CPWSImplServiceLocator().getCPWebServicesAddress(); Parser wsdlParser = new Parser(); System.out.println("Reading WSDL document from '" + url + "?WSDL'"); wsdlParser.run(url + "?WSDL"); SymbolTable symbolTable = wsdlParser.getSymbolTable(); Vector v = symbolTable.getSymbols(new QName("http://datatypes.cs.amdocs.com", "CSText")); DefinedType type = (DefinedType) v.get(0); assertNotNull(type); Vector v2 = SchemaUtils.getContainedElementDeclarations( type.getNode(), symbolTable); ElementDecl element = (ElementDecl) v2.get(0); assertNotNull(element); assertEquals(Constants.XSD_STRING, element.getType().getQName()); } }
[ "deepak.narayan@yellowfin.bi" ]
deepak.narayan@yellowfin.bi
43070f1a64acd3337710bf7507825da3884424db
bb643df586a8b8ab7cde35d1ca47b0a7f1f1ed85
/aQute.metatype/src/aQute/metatype/samples/ConfigPrinter.java
ad7fd655849bff1864e962a0c6cee73f7f87a00a
[]
no_license
chrisdolan/aQute
3ea7172f85b4cc08f4c561fd1e251c61a4ac569f
908571ba3df5d36259f2eca1d87df76fd6057613
refs/heads/master
2020-06-15T06:13:41.570776
2012-05-23T14:08:17
2012-05-23T14:08:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,499
java
package aQute.metatype.samples; import java.lang.reflect.*; import java.net.*; import java.util.*; import org.osgi.service.cm.*; import aQute.bnd.annotation.component.*; import aQute.bnd.annotation.metatype.*; /** * This example shows different options of a configuration. * */ @Meta.OCD interface SampleConfig { String _secret(); String $new(); String name(); enum X { A, B, C; } X x(); int birthYear(); URI uri(); URI[] uris(); Collection<URI> curis(); //Collection<Integer> ints(); // does not work with webconsole } @Component(properties="service.pid=aQute.metatype.samples.SampleConfig") public class ConfigPrinter implements ManagedService { SampleConfig cnf; @SuppressWarnings("unchecked") @Override public void updated(Dictionary properties) throws ConfigurationException { System.out.println("\n--- " + new Date()); cnf = Configurable.createConfigurable(SampleConfig.class, properties); Method ms[] = SampleConfig.class.getMethods(); for ( Method m : ms ) { try { Object o = m.invoke(cnf); if ( o != null && o.getClass().isArray()) { int length = Array.getLength(o); StringBuilder sb = new StringBuilder(); sb.append('['); String del =""; for ( int i=0; i<length; i++) { sb.append(del); sb.append(Array.get(o, i)); del = ", "; } sb.append(']'); o = sb; } System.out.printf("%-40s %s\n", m.getName(), o); } catch (Exception e) { e.printStackTrace(); } } } }
[ "peter.kriens@aqute.biz" ]
peter.kriens@aqute.biz
9886eacef3979065087d504970a61166f0119338
54f352a242a8ad6ff5516703e91da61e08d9a9e6
/Source Codes/AtCoder/agc026/D/2853344.java
2e17cf1d49bad57c20a153f7f830f9b7596711bc
[]
no_license
Kawser-nerd/CLCDSA
5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb
aee32551795763b54acb26856ab239370cac4e75
refs/heads/master
2022-02-09T11:08:56.588303
2022-01-26T18:53:40
2022-01-26T18:53:40
211,783,197
23
9
null
null
null
null
UTF-8
Java
false
false
5,019
java
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.StringTokenizer; import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.InputStream; /** * Built using CHelper plug-in * Actual solution is at the top * * @author kessido */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); PrintWriter out = new PrintWriter(outputStream); DHistogramColoring solver = new DHistogramColoring(); solver.solve(1, in, out); out.close(); } static class DHistogramColoring { final long MOD = MathExtensions.DEFAULT_MOD; final long inv2 = MathExtensions.modInverse_For_M_Prime(2, MathExtensions.DEFAULT_MOD); long calcOptimal(int l, int r, int[] h, int fromH, boolean withNormal) { if (l == r) return MathExtensions.powerMod(2, h[l] - fromH, MOD); int nextH = h[l]; for (int i = l + 1; i <= r; i++) { nextH = Math.min(nextH, h[i]); } long res = MathExtensions.powerMod(2, nextH - fromH, MOD); if (!withNormal) res--; int lastNextH = l - 1; for (int i = l; i <= r; i++) { if (h[i] == nextH) { if (lastNextH + 1 != i) { res = res * calcOptimal(lastNextH + 1, i - 1, h, nextH, true) % MOD; } lastNextH = i; } } if (lastNextH != r) { res = res * calcOptimal(lastNextH + 1, r, h, nextH, true) % MOD; } return res; } long calcNormal(int l, int r, int[] h, int fromH) { if (l == r) return MathExtensions.powerMod(2, h[l] - fromH, MOD); int nextH = h[l]; for (int i = l + 1; i <= r; i++) { nextH = Math.min(nextH, h[i]); } long invProbability = MathExtensions.powerMod(inv2, r - l + 1, MOD); long resForNormal = 1; long resForOptimal = 2 * invProbability * calcOptimal(l, r, h, fromH, false) % MOD; int lastNextH = l - 1; for (int i = l; i <= r; i++) { if (h[i] == nextH) { if (lastNextH + 1 != i) { resForNormal = resForNormal * calcNormal(lastNextH + 1, i - 1, h, nextH) % MOD; } lastNextH = i; } } if (lastNextH != r) { resForNormal = resForNormal * calcNormal(lastNextH + 1, r, h, nextH) % MOD; } return (resForNormal + resForOptimal) % MOD; } public void solve(int testNumber, InputReader in, PrintWriter out) { int n = in.NextInt(); int[] h = in.NextIntArray(n); long res = MathExtensions.powerMod(2, n, MOD) * calcNormal(0, h.length - 1, h, 1) % MOD; if (res < 0) res += MOD; out.println(res); } } static class MathExtensions { public static final long DEFAULT_MOD = 1_000_000_007L; public static long modInverse_For_M_Prime(final long a, final long m) { return powerMod(a, m - 2, m); } public static long powerMod(final long x, final long y, final long m) { if (y == 0) return 1; long p = powerMod(x, y / 2, m) % m; p = (p * p) % m; if (y % 2 == 0) return p; else return (x * p) % m; } } static class InputReader { BufferedReader reader; StringTokenizer tokenizer; public InputReader(InputStream stream) { reader = new BufferedReader(new InputStreamReader(stream), 32768); tokenizer = null; } public String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine(), " \t\n\r\f,"); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public int NextInt() { return Integer.parseInt(next()); } public int[] NextIntArray(int n) { return NextIntArray(n, 0); } public int[] NextIntArray(int n, int offset) { int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = NextInt() + offset; } return a; } } }
[ "kwnafi@yahoo.com" ]
kwnafi@yahoo.com
f12f0be337102b4fbb4b3434f3b361f48b530aa7
445c3cf84dd4bbcbbccf787b2d3c9eb8ed805602
/aliyun-java-sdk-smartag/src/main/java/com/aliyuncs/smartag/transform/v20180313/DescribeSagWifiResponseUnmarshaller.java
17ec8370b67df3eb5fd2bc5222d7810f7842fb9a
[ "Apache-2.0" ]
permissive
caojiele/aliyun-openapi-java-sdk
b6367cc95469ac32249c3d9c119474bf76fe6db2
ecc1c949681276b3eed2500ec230637b039771b8
refs/heads/master
2023-06-02T02:30:02.232397
2021-06-18T04:08:36
2021-06-18T04:08:36
172,076,930
0
0
NOASSERTION
2019-02-22T14:08:29
2019-02-22T14:08:29
null
UTF-8
Java
false
false
2,672
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.smartag.transform.v20180313; import java.util.ArrayList; import java.util.List; import com.aliyuncs.smartag.model.v20180313.DescribeSagWifiResponse; import com.aliyuncs.smartag.model.v20180313.DescribeSagWifiResponse.TaskState; import com.aliyuncs.transform.UnmarshallerContext; public class DescribeSagWifiResponseUnmarshaller { public static DescribeSagWifiResponse unmarshall(DescribeSagWifiResponse describeSagWifiResponse, UnmarshallerContext _ctx) { describeSagWifiResponse.setRequestId(_ctx.stringValue("DescribeSagWifiResponse.RequestId")); describeSagWifiResponse.setIsEnable(_ctx.stringValue("DescribeSagWifiResponse.IsEnable")); describeSagWifiResponse.setChannel(_ctx.stringValue("DescribeSagWifiResponse.Channel")); describeSagWifiResponse.setBandwidth(_ctx.stringValue("DescribeSagWifiResponse.Bandwidth")); describeSagWifiResponse.setIsAuth(_ctx.stringValue("DescribeSagWifiResponse.IsAuth")); describeSagWifiResponse.setSsid(_ctx.stringValue("DescribeSagWifiResponse.Ssid")); describeSagWifiResponse.setIsBroadcast(_ctx.stringValue("DescribeSagWifiResponse.IsBroadcast")); describeSagWifiResponse.setEncryptAlgorithm(_ctx.stringValue("DescribeSagWifiResponse.EncryptAlgorithm")); describeSagWifiResponse.setAuthenticationType(_ctx.stringValue("DescribeSagWifiResponse.AuthenticationType")); List<TaskState> taskStates = new ArrayList<TaskState>(); for (int i = 0; i < _ctx.lengthValue("DescribeSagWifiResponse.TaskStates.Length"); i++) { TaskState taskState = new TaskState(); taskState.setState(_ctx.stringValue("DescribeSagWifiResponse.TaskStates["+ i +"].State")); taskState.setCreateTime(_ctx.stringValue("DescribeSagWifiResponse.TaskStates["+ i +"].CreateTime")); taskState.setErrorCode(_ctx.stringValue("DescribeSagWifiResponse.TaskStates["+ i +"].ErrorCode")); taskState.setErrorMessage(_ctx.stringValue("DescribeSagWifiResponse.TaskStates["+ i +"].ErrorMessage")); taskStates.add(taskState); } describeSagWifiResponse.setTaskStates(taskStates); return describeSagWifiResponse; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
57becf15590d7bed30720955c2c1db555dfc2f0c
74115cd63867b5403e1a4ec2e2f5a660e5337bdb
/src/main/java/ru/bellintegrator/practice/office/model/Office.java
8509138d89f7b63e6c20292f1f622970d4ca3cc9
[]
no_license
danailKondov/BItask
1a274ac55239ba0362e38bba83dbb9bd545f0074
f474fc3dd6c7fa0458611fa88e0a9f9add7d8db9
refs/heads/master
2021-04-27T17:44:48.501233
2018-03-23T06:49:36
2018-03-23T06:49:36
122,326,508
2
0
null
null
null
null
UTF-8
Java
false
false
3,766
java
package ru.bellintegrator.practice.office.model; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import ru.bellintegrator.practice.orgs.model.Organisation; import javax.persistence.*; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import java.io.Serializable; /** * Офис организации. */ @Entity @Table(name = "offices") public class Office implements Serializable { @Id @GeneratedValue private Long id; // @org.springframework.data.annotation.Transient - из-за этого не работала сериализация @JsonIgnore @Version private Integer version = 0; // @org.springframework.data.annotation.Transient @JsonIgnore @ManyToOne( fetch = FetchType.LAZY ) @JoinColumn(name = "org_id") private Organisation organisation; @Transient @JsonIgnore private Long orgId; // для JSON маппинга @NotNull @Size(min = 3, max = 255) @Basic(optional = false) private String name; private String address; private String phone; @Column(name = "is_active") private Boolean isActive; public Office() { } public Office(String name, String address, String phone, Boolean isActive) { this.name = name; this.address = address; this.phone = phone; this.isActive = isActive; } // добавить конструктор с параметрами при тестировании public Long getId() { return id; } public void setId(Long id) { this.id = id; } // обязательный параметр orgId получаем через организацию: getOrganisation().getId() public Organisation getOrganisation() { return organisation; } public void setOrganisation(Organisation organisation) { this.organisation = organisation; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } @JsonProperty(value = "isActive") public Boolean isActive() { return isActive; } public void setActive(Boolean active) { isActive = active; } public Long getOrgId() { return orgId; } public void setOrgId(Long orgId) { this.orgId = orgId; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Office office = (Office) o; if (getName() != null ? !getName().equals(office.getName()) : office.getName() != null) return false; if (getAddress() != null ? !getAddress().equals(office.getAddress()) : office.getAddress() != null) return false; if (getPhone() != null ? !getPhone().equals(office.getPhone()) : office.getPhone() != null) return false; return isActive != null ? isActive.equals(office.isActive) : office.isActive == null; } @Override public int hashCode() { int result = getName() != null ? getName().hashCode() : 0; result = 31 * result + (getAddress() != null ? getAddress().hashCode() : 0); result = 31 * result + (getPhone() != null ? getPhone().hashCode() : 0); result = 31 * result + (isActive != null ? isActive.hashCode() : 0); return result; } }
[ "dkondov@yandex.ru" ]
dkondov@yandex.ru
f7ddc7c935bb1e3a56588a1007199d926c6762d7
11b6816e497296313ea81946a64597a0aba14dfe
/app/src/main/java/com/reryde/provider/Services/FloatingViewService.java
67a96415f40f1a417982bded8ef86de15536c8a7
[]
no_license
KPRajAndroid/ReRydeDriver
aac6a887674ed2a1ce875e992e3be3c70195b988
4a43d1bde3379f77e3b4a78e325394318a331caf
refs/heads/master
2020-03-30T06:01:32.884671
2018-09-29T06:51:20
2018-09-29T06:51:20
150,834,276
0
1
null
null
null
null
UTF-8
Java
false
false
5,958
java
package com.reryde.provider.Services; /** * Created by jayakumar on 13/08/17. */ import android.app.Service; import android.content.Intent; import android.graphics.PixelFormat; import android.os.IBinder; import android.view.Gravity; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.WindowManager; import android.widget.ImageView; import com.reryde.provider.Activity.MainActivity; import com.reryde.provider.R; import android.util.Log; public class FloatingViewService extends Service { private WindowManager mWindowManager; private View mFloatingView; public FloatingViewService() { } @Override public IBinder onBind(Intent intent) { return null; } @Override public void onCreate() { super.onCreate(); //Inflate the floating view layout we created mFloatingView = LayoutInflater.from(this).inflate(R.layout.layout_floating_widget, null); //Add the view to the window. final WindowManager.LayoutParams params = new WindowManager.LayoutParams( WindowManager.LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.TYPE_PHONE, WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, PixelFormat.TRANSLUCENT); //Specify the view position params.gravity = Gravity.TOP | Gravity.LEFT; //Initially view will be added to top-left corner params.x = 0; params.y = 100; //Add the view to the window mWindowManager = (WindowManager) getSystemService(WINDOW_SERVICE); mWindowManager.addView(mFloatingView, params); //The root element of the collapsed view layout final View collapsedView = mFloatingView.findViewById(R.id.collapse_view); final View collapsed_iv = mFloatingView.findViewById(R.id.collapsed_iv); //Set the close button ImageView closeButtonCollapsed = (ImageView) mFloatingView.findViewById(R.id.close_btn); closeButtonCollapsed.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { stopSelf(); } }); //Drag and move floating view using user's touch action. mFloatingView.setOnTouchListener(new View.OnTouchListener() { private int initialX; private int initialY; private float initialTouchX; private float initialTouchY; @Override public boolean onTouch(View v, MotionEvent event) { Log.e("FabOnMap", "onTouch1: " + v); switch (event.getAction()) { case MotionEvent.ACTION_DOWN: Log.e("FabOnMap", "onTouch2: " + v); //remember the initial position. initialX = params.x; initialY = params.y; //get the touch location initialTouchX = event.getRawX(); initialTouchY = event.getRawY(); return true; case MotionEvent.ACTION_UP: int Xdiff = (int) (event.getRawX() - initialTouchX); int Ydiff = (int) (event.getRawY() - initialTouchY); //The check for Xdiff <10 && YDiff< 10 because sometime elements moves a little while clicking. //So that is click event. if (Xdiff < 10 && Ydiff < 10) { if (isViewCollapsed()) { //When user clicks on the image view of the collapsed layout, //visibility of the collapsed layout will be changed to "View.GONE" //and expanded view will become visible. collapsedView.setVisibility(View.GONE); } } return true; case MotionEvent.ACTION_MOVE: //Calculate the X and Y coordinates of the view. Log.e("FabOnMap", "onTouch4: " + v); params.x = initialX + (int) (event.getRawX() - initialTouchX); params.y = initialY + (int) (event.getRawY() - initialTouchY); //Update the layout with new X & Y coordinate collapsedView.setVisibility(View.VISIBLE); collapsed_iv.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { //Open the application click. Intent intent = new Intent(FloatingViewService.this, MainActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); //close the service and remove view from the view hierarchy stopSelf(); } }); mWindowManager.updateViewLayout(mFloatingView, params); return true; } return true; } }); } /** * Detect if the floating view is collapsed or expanded. * @return true if the floating view is collapsed. */ private boolean isViewCollapsed() { return mFloatingView == null || mFloatingView.findViewById(R.id.collapse_view).getVisibility() == View.VISIBLE; } @Override public void onDestroy() { super.onDestroy(); if (mFloatingView != null) mWindowManager.removeView(mFloatingView); } }
[ "sundar@appoets.com" ]
sundar@appoets.com
ea79b2c215898ed39338685581451a7391e26cd7
7ec0194c493e63b18ab17b33fe69a39ed6af6696
/masterlock/app_decompiled/sources/com/google/android/gms/tagmanager/zzax.java
f3f83addac84f8f591ec79203721171de0118ddd
[]
no_license
rasaford/CS3235
5626a6e7e05a2a57e7641e525b576b0b492d9154
44d393fb3afb5d131ad9d6317458c5f8081b0c04
refs/heads/master
2020-07-24T16:00:57.203725
2019-11-05T13:00:09
2019-11-05T13:00:09
207,975,557
0
1
null
null
null
null
UTF-8
Java
false
false
3,522
java
package com.google.android.gms.tagmanager; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteException; import android.database.sqlite.SQLiteOpenHelper; import android.os.Build.VERSION; import com.google.android.gms.common.util.VisibleForTesting; import java.util.HashSet; @VisibleForTesting final class zzax extends SQLiteOpenHelper { private final /* synthetic */ zzat zzagd; zzax(zzat zzat, Context context, String str) { this.zzagd = zzat; super(context, str, null, 1); } public final void onDowngrade(SQLiteDatabase sQLiteDatabase, int i, int i2) { } public final void onUpgrade(SQLiteDatabase sQLiteDatabase, int i, int i2) { } private static boolean zza(String str, SQLiteDatabase sQLiteDatabase) { Cursor cursor = null; try { Cursor query = sQLiteDatabase.query("SQLITE_MASTER", new String[]{ProductCodesColumns.NAME}, "name=?", new String[]{str}, null, null, null); boolean moveToFirst = query.moveToFirst(); if (query != null) { query.close(); } return moveToFirst; } catch (SQLiteException unused) { String str2 = "Error querying for table "; String valueOf = String.valueOf(str); zzdi.zzac(valueOf.length() != 0 ? str2.concat(valueOf) : new String(str2)); if (cursor != null) { cursor.close(); } return false; } catch (Throwable th) { if (cursor != null) { cursor.close(); } throw th; } } public final SQLiteDatabase getWritableDatabase() { SQLiteDatabase sQLiteDatabase; try { sQLiteDatabase = super.getWritableDatabase(); } catch (SQLiteException unused) { this.zzagd.zzrm.getDatabasePath("google_tagmanager.db").delete(); sQLiteDatabase = null; } return sQLiteDatabase == null ? super.getWritableDatabase() : sQLiteDatabase; } /* JADX INFO: finally extract failed */ public final void onOpen(SQLiteDatabase sQLiteDatabase) { if (VERSION.SDK_INT < 15) { Cursor rawQuery = sQLiteDatabase.rawQuery("PRAGMA journal_mode=memory", null); try { rawQuery.moveToFirst(); } finally { rawQuery.close(); } } if (!zza("datalayer", sQLiteDatabase)) { sQLiteDatabase.execSQL(zzat.zzafx); return; } Cursor rawQuery2 = sQLiteDatabase.rawQuery("SELECT * FROM datalayer WHERE 0", null); HashSet hashSet = new HashSet(); try { String[] columnNames = rawQuery2.getColumnNames(); for (String add : columnNames) { hashSet.add(add); } rawQuery2.close(); if (!hashSet.remove("key") || !hashSet.remove("value") || !hashSet.remove("ID") || !hashSet.remove("expires")) { throw new SQLiteException("Database column missing"); } else if (!hashSet.isEmpty()) { throw new SQLiteException("Database has extra columns"); } } catch (Throwable th) { rawQuery2.close(); throw th; } } public final void onCreate(SQLiteDatabase sQLiteDatabase) { zzbr.zzbb(sQLiteDatabase.getPath()); } }
[ "fruehaufmaximilian@gmail.com" ]
fruehaufmaximilian@gmail.com
01adf7519bcc3e85c65a21de169d17bb8fc1e424
dac8a56ee2c38c3a48f7a38677cc252fd0b5f94a
/CodeSnippets/September/29Sep/Program10/Pro10.java
12cbb1fa19ecab1f74c978b1ca78e5c8eee9732d
[]
no_license
nikitasanjaypatil/Java9
64dbc0ec8b204c54bfed128d9517ea0fb00e97a4
fd92b1b13d767e5ee48d88fe22f0260d3d1ac391
refs/heads/master
2023-03-15T03:44:34.347450
2021-02-28T17:13:01
2021-02-28T17:13:01
281,289,978
0
1
null
null
null
null
UTF-8
Java
false
false
251
java
import java.io.*; class Core2Web { public static void main(String arr[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String codeWord = br.readLine(); System.out.println(codeWord); } }
[ "nikitaspatilaarvi@gmail.com" ]
nikitaspatilaarvi@gmail.com
981db821533f81cd9e2953919dba23e70ffc9b5b
05801ae3917bc9779170e26549c874b006ff3d8d
/annotations/component-annotations/src/main/java/io/dekorate/component/annotation/ComponentApplication.java
9a2ae837310c67f10703c1eef4b58858d9c272b3
[ "Apache-2.0" ]
permissive
longzl2015/dekorate
42ccacf130350dbfe52f33fa1b215842de5bfcb5
ae264f77cedbcbc9f8f112aab450e2000d6982e5
refs/heads/master
2020-06-19T14:10:26.083713
2019-07-13T16:32:51
2019-07-13T16:32:51
196,738,583
0
0
Apache-2.0
2019-07-13T15:44:39
2019-07-13T15:44:39
null
UTF-8
Java
false
false
1,745
java
/** * Copyright 2018 The original authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.dekorate.component.annotation; import io.dekorate.component.model.DeploymentMode; import io.dekorate.kubernetes.annotation.Env; import io.dekorate.kubernetes.config.Configuration; import io.sundr.builder.annotations.Adapter; import io.sundr.builder.annotations.Buildable; import io.sundr.builder.annotations.Pojo; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Buildable(builderPackage = "io.dekorate.deps.kubernetes.api.builder") @Pojo(name = "ComponentConfig", mutable = true, superClass = Configuration.class, relativePath = "../config", withStaticAdapterMethod = false, adapter = @Adapter(suffix = "Adapter", relativePath = "../adapter", withMapAdapterMethod = true)) @Target({ElementType.CONSTRUCTOR, ElementType.TYPE}) @Retention(RetentionPolicy.SOURCE) public @interface ComponentApplication { String name() default ""; DeploymentMode deploymentMode() default DeploymentMode.dev; boolean exposeService() default false; Env[] envs() default {}; String buildType() default "s2i"; }
[ "iocanel@gmail.com" ]
iocanel@gmail.com
2c18912ddadf01713b1393d2f6b3283f2048a3d2
2d7be601e45efdb7ad772dccb8cd7c3564c479e2
/facade/src/main/java/com/facade/Client.java
fa0edb62a0d5dfac383b1e84f2cfd5890178ff08
[]
no_license
xinput123/design-pattern
425be7bcb20c09308f54422429146c67fb95261b
ccc9979839112ab07e1677db7f783f972ca6a823
refs/heads/master
2021-07-18T02:15:25.487797
2020-08-13T07:19:42
2020-08-13T07:19:42
185,757,682
0
0
null
null
null
null
UTF-8
Java
false
false
408
java
package com.facade; /** * @author <a href="mailto:xinput.xx@gmail.com">xinput</a> * @Date: 2019-10-08 14:17 */ public class Client { public static void main(String[] args) { ModenPostOffice modenPostOffice = new ModenPostOffice(); String address = "北京市东大路88号"; String context = "hello。。。"; modenPostOffice.sendLetter(context, address); } }
[ "yuan_lai1234@163.com" ]
yuan_lai1234@163.com
43e84ab8d9a5a9fdab9e49e3514919d000a05b88
65e30faf60cc55a86b244bc3d8e61c47a69d2051
/cynomys-client/cynomys-agent/src/main/java/cn/howardliu/monitor/cynomys/agent/dto/MemoryUsage.java
f321715fdaf3d6e1223da10f1892f44263cac000
[ "Apache-2.0" ]
permissive
howardliu-cn/cynomys
ffee7aa753305e3ee6198dc555117371d49b249b
4679e178ed30d0491a3a0f9d87848a286930fcb0
refs/heads/master
2022-12-21T20:15:18.754479
2021-06-01T12:47:33
2021-06-01T12:47:33
97,213,966
7
10
Apache-2.0
2022-12-10T05:18:15
2017-07-14T08:54:15
Java
UTF-8
Java
false
false
1,703
java
/** * @Probject Name: netty-wfj-monitor * @Path: com.wfj.netty.monitor.dtoMemUsage.java * @Create By Jack * @Create In 2015年10月28日 下午2:52:09 */ package cn.howardliu.monitor.cynomys.agent.dto; /** * @Class Name MemUsage * @Author Jack * @Create In 2015年10月28日 */ public class MemoryUsage { private long init; private long used; private long committed; private long max; public MemoryUsage() { super(); this.init = 0; this.used = 0; this.committed = 0; this.max = 0; } public void clone(java.lang.management.MemoryUsage usage) { this.setInit(usage.getInit()); this.setUsed(usage.getUsed()); this.setCommitted(usage.getCommitted()); this.setMax(usage.getMax()); } /** * @Return the long init */ public long getInit() { return init; } /** * @Param long init to set */ public void setInit(long init) { this.init = init; } /** * @Return the long used */ public long getUsed() { return used; } /** * @Param long used to set */ public void setUsed(long used) { this.used = used; } /** * @Return the long committed */ public long getCommitted() { return committed; } /** * @Param long committed to set */ public void setCommitted(long committed) { this.committed = committed; } /** * @Return the long max */ public long getMax() { return max; } /** * @Param long max to set */ public void setMax(long max) { this.max = max; } }
[ "liuxinghao1988@gmail.com" ]
liuxinghao1988@gmail.com
9d8215e6026cefd6f1e957dfc0dfe127e622f9d5
938a9e1fe19bf785a123eea5a522e1f0c4a9ae6e
/src/main/java/Simulation/CompTeamConfWins.java
824221ebb7c1e88d3d8263eaa29521e4fdf6dcc0
[]
no_license
jasperweinberg/CFB-Coach
44133f70e15ecef549a527e041c146c092dd8ad5
34069f65766536649c209eb096793de45bc55a96
refs/heads/master
2021-04-15T15:40:18.912592
2018-02-10T23:26:34
2018-02-10T23:26:34
126,499,034
0
0
null
2018-03-23T14:48:02
2018-03-23T14:48:02
null
UTF-8
Java
false
false
797
java
package Simulation; import java.util.Comparator; /** * Created by ahngu on 11/13/2017. */ //EXTRACTED FROM CONFERENCES public class CompTeamConfWins implements Comparator<Team> { @Override public int compare(Team a, Team b) { if (a.confChampion.equals("CC")) return -1; else if (b.confChampion.equals("CC")) return 1; else if (a.getConfWins() > b.getConfWins()) { return -1; } else if (a.getConfWins() == b.getConfWins()) { //check for h2h tiebreaker if (a.gameWinsAgainst.contains(b)) { return -1; } else if (b.gameWinsAgainst.contains(a)) { return 1; } else { return 0; } } else { return 1; } } }
[ "ahnguyen@gmail.com" ]
ahnguyen@gmail.com
96e96c9341cd25a1c7ea2eb37efd270acfcc76e0
4d9d48359286b55e1d01ada39b4a5286add2eae6
/src/main/java/weka/classifiers/bayes/NaiveBayesUpdateable.java
e845546955b3e12db858d3c8d94048575d758653
[]
no_license
Mihir2/HCoreDist
969ead235abf42aa3c6779482a80caae61acbcca
c23eebc1777e95398308909506bad75308412874
refs/heads/master
2021-04-15T18:06:08.584262
2018-03-24T17:18:43
2018-03-24T17:18:43
126,339,452
0
0
null
null
null
null
UTF-8
Java
false
false
4,539
java
/* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* * NaiveBayesUpdateable.java * Copyright (C) 1999-2012 University of Waikato, Hamilton, New Zealand * */ package weka.classifiers.bayes; import weka.classifiers.UpdateableClassifier; import weka.core.RevisionUtils; import weka.core.TechnicalInformation; /** <!-- globalinfo-start --> * Class for a Naive Bayes classifier using estimator classes. This is the updateable version of NaiveBayes.<br/> * This classifier will use a default precision of 0.1 for numeric attributes when buildClassifier is called with zero training instances.<br/> * <br/> * For more information on Naive Bayes classifiers, see<br/> * <br/> * George H. John, Pat Langley: Estimating Continuous Distributions in Bayesian Classifiers. In: Eleventh Conference on Uncertainty in Artificial Intelligence, San Mateo, 338-345, 1995. * <p/> <!-- globalinfo-end --> * <!-- technical-bibtex-start --> * BibTeX: * <pre> * &#64;inproceedings{John1995, * address = {San Mateo}, * author = {George H. John and Pat Langley}, * booktitle = {Eleventh Conference on Uncertainty in Artificial Intelligence}, * pages = {338-345}, * publisher = {Morgan Kaufmann}, * title = {Estimating Continuous Distributions in Bayesian Classifiers}, * year = {1995} * } * </pre> * <p/> <!-- technical-bibtex-end --> * <!-- options-start --> * Valid options are: <p/> * * <pre> -K * Use kernel density estimator rather than normal * distribution for numeric attributes</pre> * * <pre> -D * Use supervised discretization to process numeric attributes * </pre> * * <pre> -O * Display model in old format (good when there are many classes) * </pre> * <!-- options-end --> * * @author Len Trigg (trigg@cs.waikato.ac.nz) * @author Eibe Frank (eibe@cs.waikato.ac.nz) * @version $Revision$ */ public class NaiveBayesUpdateable extends NaiveBayes implements UpdateableClassifier { /** for serialization */ static final long serialVersionUID = -5354015843807192221L; /** * Returns a string describing this classifier * @return a description of the classifier suitable for * displaying in the explorer/experimenter gui */ public String globalInfo() { return "Class for a Naive Bayes classifier using estimator classes. This is the " +"updateable version of NaiveBayes.\n" +"This classifier will use a default precision of 0.1 for numeric attributes " +"when buildClassifier is called with zero training instances.\n\n" +"For more information on Naive Bayes classifiers, see\n\n" + getTechnicalInformation().toString(); } /** * Returns an instance of a TechnicalInformation object, containing * detailed information about the technical background of this class, * e.g., paper reference or book this class is based on. * * @return the technical information about this class */ public TechnicalInformation getTechnicalInformation() { return super.getTechnicalInformation(); } /** * Set whether supervised discretization is to be used. * * @param newblah true if supervised discretization is to be used. */ public void setUseSupervisedDiscretization(boolean newblah) { if (newblah) { throw new IllegalArgumentException("Can't use discretization " + "in NaiveBayesUpdateable!"); } m_UseDiscretization = false; } /** * Returns the revision string. * * @return the revision */ public String getRevision() { return RevisionUtils.extract("$Revision$"); } /** * Main method for testing this class. * * @param argv the options */ public static void main(String [] argv) { runClassifier(new NaiveBayesUpdateable(), argv); } }
[ "mihirchauhan9@gmail.com" ]
mihirchauhan9@gmail.com
8ee483272ff62416316385d73c3aa30cdae7ac20
e2cbc475e26a5357c212cd2f951ece1f9d7d9cea
/Task_Workspace/WidgetDemo/src/com/example/widgetdemo/MyWidgetIntentReceiver.java
be6ed5b444a510cf51e219b5b52464d83459447c
[]
no_license
arjunmehta1992/backup
b2ff86c92b48ec8c11f54efb14e94bde179932f9
d38c91905bc0c1515a0350ce09c323e1681dfb56
refs/heads/master
2016-09-10T19:42:00.552121
2015-09-09T09:42:16
2015-09-09T09:42:16
41,653,939
0
0
null
null
null
null
UTF-8
Java
false
false
1,747
java
package com.example.widgetdemo; import com.example.widgetdemo.R.color; import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.sax.StartElementListener; import android.widget.RemoteViews; public class MyWidgetIntentReceiver extends BroadcastReceiver { private static int clickCount = 0; String packageName = "com.zaptech.wallpapermanager"; String className = "com.zaptech.wallpapermanager.Splash"; @Override public void onReceive(Context context, Intent intent) { if (intent.getAction().equals("pl.looksok.intent.action.CHANGE_PICTURE")) { System.err.println("-----------------"); intent = new Intent(Intent.ACTION_MAIN); intent.setComponent(new ComponentName(packageName, className)); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); // intent = new Intent(context, MainScreen.class); // intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // context.startActivity(intent); // updateWidgetPictureAndButtonListener(context); } } private void updateWidgetPictureAndButtonListener(Context context) { RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.activity_home); remoteViews.setImageViewResource(R.id.widget_image, getImageToSet()); // REMEMBER TO ALWAYS REFRESH YOUR BUTTON CLICK LISTENERS!!! remoteViews.setOnClickPendingIntent(R.id.linMain, MyWidgetProvider.buildButtonPendingIntent(context)); MyWidgetProvider.pushWidgetUpdate(context.getApplicationContext(), remoteViews); } private int getImageToSet() { clickCount++; return clickCount % 2 == 0 ? R.drawable.animal_one : R.drawable.animal_two; } }
[ "arjun@zapserver.com" ]
arjun@zapserver.com
663a2f5a5b4609c5dfe7f757e0f3fb59fcd8a3ec
fd28e28d665ef4c8d43d73fc1eea4c2c37e979be
/bus-crypto/src/main/java/org/aoju/bus/crypto/provider/AESProvider.java
314800deb63619e80e8ca289fdebe259e5b2fb48
[ "MIT" ]
permissive
xiaoyue6/bus
c6691b46f9d2e685cbb4a9edf574ba2a0a356a25
a4ad0103bb267b5de5a3c53777bdd67e6d9b86f5
refs/heads/master
2023-07-26T20:54:29.291855
2021-08-31T15:50:42
2021-08-31T15:50:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,759
java
/********************************************************************************* * * * The MIT License (MIT) * * * * Copyright (c) 2015-2021 aoju.org 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.crypto.provider; import org.aoju.bus.core.lang.exception.InstrumentException; import org.aoju.bus.core.toolkit.StringKit; import org.aoju.bus.crypto.Builder; import org.aoju.bus.crypto.Provider; import org.aoju.bus.crypto.symmetric.AES; /** * 高级加密标准,是下一代的加密算法标准,速度快,安全级别高; * AES是一个使用128为分组块的分组加密算法,分组块和128、192或256位的密钥一起作为输入, * 对4×4的字节数组上进行操作 众所周之AES是种十分高效的算法,尤其在8位架构中,这源于它面向字节的设计 * AES 适用于8位的小型单片机或者普通的32位微处理器,并且适合用专门的硬件实现,硬件实现能够使其吞吐量(每秒可以到达的加密/解密bit数) * 达到十亿量级 * * @author Kimi Liu * @version 6.2.8 * @since JDK 1.8+ */ public class AESProvider implements Provider { /** * 加密 * * @param key 密钥 * @param content 需要加密的内容 */ @Override public byte[] encrypt(String key, byte[] content) { if (StringKit.isEmpty(key)) { throw new InstrumentException("key is null!"); } AES aes = Builder.aes(key.getBytes()); return aes.encrypt(content); } /** * 解密 * * @param key 密钥 * @param content 需要解密的内容 */ @Override public byte[] decrypt(String key, byte[] content) { if (StringKit.isEmpty(key)) { throw new InstrumentException("key is null!"); } AES aes = Builder.aes(key.getBytes()); return aes.decrypt(content); } }
[ "839536@qq.com" ]
839536@qq.com
0e94d78845e10c62be42a97b2886e39612fcb3cb
6f6b9e1c558469ca0501813c7a1e9e74ee5c2821
/app/src/main/java/org/yeewoe/mopassion/app/nearby/presenter/NearByUserGridPresenter.java
8710c6ee06bae901d7c530ea7856501661df9df1
[]
no_license
Yeewoe/Mopassion
ee47d57d88815ee53920005d812c938ae15f01ba
36cfb2550300ac14d6802ee6b36d69da1bac0b37
refs/heads/master
2021-01-22T19:09:08.745890
2017-03-16T13:28:48
2017-03-16T13:28:48
85,167,616
0
1
null
null
null
null
UTF-8
Java
false
false
2,559
java
package org.yeewoe.mopassion.app.nearby.presenter; import org.yeewoe.mopanet.callback.Callback; import org.yeewoe.mopassion.app.common.presenter.LinePresenter; import org.yeewoe.mopassion.app.contact.view.iview.IContactFriendView; import org.yeewoe.mopassion.app.location.manager.LocationPointInfo; import org.yeewoe.mopassion.app.location.manager.LocationUtils; import org.yeewoe.mopassion.app.nearby.model.LocUser; import org.yeewoe.mopassion.app.nearby.model.NearByUserLineVo; import org.yeewoe.mopassion.app.nearby.view.adapter.NearByUserGridAdapter; import org.yeewoe.mopassion.app.nearby.view.adapter.NearByUserLineAdapter; import org.yeewoe.mopassion.asynctask.LineAsyncTask; import org.yeewoe.mopassion.constants.TrendConstants; import org.yeewoe.mopassion.db.po.MapPosition; import org.yeewoe.mopassion.db.po.User; import java.util.List; /** * Created by wyw on 2016/4/9. */ public class NearByUserGridPresenter extends LinePresenter<NearByUserLineVo> { private final IContactFriendView view; /** * @param firstPageCount 首页条数 * @param nextPageCount 分页条数 */ public NearByUserGridPresenter(IContactFriendView view, NearByUserGridAdapter adapter, int firstPageCount, int nextPageCount) { super(adapter, firstPageCount, nextPageCount); this.view = view; } @Override protected LineAsyncTask<NearByUserLineVo> initAsyncTask() { return new LineAsyncTask<NearByUserLineVo>(view, adapter) { @Override protected Callback.CallbackInfo<NearByUserLineVo> doInBackgroundAfterInit(Object param, long prev, int count) { LocationPointInfo cacheLocation = LocationUtils.loadLocation(); Callback.CallbackInfo<NearByUserLineVo> result = new Callback.CallbackInfo<>(); if (cacheLocation != null) { Callback.CallbackInfo<LocUser> resultInfo = userService.getNearUserLineNet(0L, TrendConstants.VALUE_NEARBY_MAX_DISTANCE, (int) prev, count, new MapPosition(cacheLocation.addrStr, cacheLocation.longitude, cacheLocation.latitude)); if (resultInfo.bError) { result.bError = true; result.errorCode = resultInfo.errorCode; } else { List<User> users = userService.getFromPo(resultInfo.mTs, true, false); result.mTs = NearByUserLineVo.Convertor.convert(resultInfo.mTs, users); } } return result; } }; } }
[ "476904945@qq.com" ]
476904945@qq.com
4ab7ceda183f25b637aa250afe36996a04655181
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE129_Improper_Validation_of_Array_Index/s04/CWE129_Improper_Validation_of_Array_Index__PropertiesFile_array_write_no_check_31.java
6fd8e7ff848a8aa754683a9f64687b88ed65cf51
[]
no_license
bqcuong/Juliet-Test-Case
31e9c89c27bf54a07b7ba547eddd029287b2e191
e770f1c3969be76fdba5d7760e036f9ba060957d
refs/heads/master
2020-07-17T14:51:49.610703
2019-09-03T16:22:58
2019-09-03T16:22:58
206,039,578
1
2
null
null
null
null
UTF-8
Java
false
false
7,693
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE129_Improper_Validation_of_Array_Index__PropertiesFile_array_write_no_check_31.java Label Definition File: CWE129_Improper_Validation_of_Array_Index.label.xml Template File: sources-sinks-31.tmpl.java */ /* * @description * CWE: 129 Improper Validation of Array Index * BadSource: PropertiesFile Read data from a .properties file (in property named data) * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: array_write_no_check * GoodSink: Write to array after verifying index * BadSink : Write to array without any verification of index * Flow Variant: 31 Data flow: make a copy of data within the same method * * */ package testcases.CWE129_Improper_Validation_of_Array_Index.s04; import testcasesupport.*; import javax.servlet.http.*; import java.util.Properties; import java.io.FileInputStream; import java.io.IOException; import java.util.logging.Level; public class CWE129_Improper_Validation_of_Array_Index__PropertiesFile_array_write_no_check_31 extends AbstractTestCase { public void bad() throws Throwable { int dataCopy; { int data; data = Integer.MIN_VALUE; /* Initialize data */ /* retrieve the property */ { Properties properties = new Properties(); FileInputStream streamFileInput = null; try { streamFileInput = new FileInputStream("../common/config.properties"); properties.load(streamFileInput); /* POTENTIAL FLAW: Read data from a .properties file */ String stringNumber = properties.getProperty("data"); if (stringNumber != null) // avoid NPD incidental warnings { try { data = Integer.parseInt(stringNumber.trim()); } catch(NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat); } } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* Close stream reading object */ try { if (streamFileInput != null) { streamFileInput.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing FileInputStream", exceptIO); } } } dataCopy = data; } { int data = dataCopy; /* Need to ensure that the array is of size > 3 and < 101 due to the GoodSource and the large_fixed BadSource */ int array[] = { 0, 1, 2, 3, 4 }; /* POTENTIAL FLAW: Attempt to write to array at location data, which may be outside the array bounds */ array[data] = 42; /* Skip reading back data from array since that may be another out of bounds operation */ } } public void good() throws Throwable { goodG2B(); goodB2G(); } /* goodG2B() - use goodsource and badsink */ private void goodG2B() throws Throwable { int dataCopy; { int data; /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; dataCopy = data; } { int data = dataCopy; /* Need to ensure that the array is of size > 3 and < 101 due to the GoodSource and the large_fixed BadSource */ int array[] = { 0, 1, 2, 3, 4 }; /* POTENTIAL FLAW: Attempt to write to array at location data, which may be outside the array bounds */ array[data] = 42; /* Skip reading back data from array since that may be another out of bounds operation */ } } /* goodB2G() - use badsource and goodsink */ private void goodB2G() throws Throwable { int dataCopy; { int data; data = Integer.MIN_VALUE; /* Initialize data */ /* retrieve the property */ { Properties properties = new Properties(); FileInputStream streamFileInput = null; try { streamFileInput = new FileInputStream("../common/config.properties"); properties.load(streamFileInput); /* POTENTIAL FLAW: Read data from a .properties file */ String stringNumber = properties.getProperty("data"); if (stringNumber != null) // avoid NPD incidental warnings { try { data = Integer.parseInt(stringNumber.trim()); } catch(NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat); } } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* Close stream reading object */ try { if (streamFileInput != null) { streamFileInput.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing FileInputStream", exceptIO); } } } dataCopy = data; } { int data = dataCopy; /* Need to ensure that the array is of size > 3 and < 101 due to the GoodSource and the large_fixed BadSource */ int array[] = { 0, 1, 2, 3, 4 }; /* FIX: Verify index before writing to array at location data */ if (data >= 0 && data < array.length) { array[data] = 42; } else { IO.writeLine("Array index out of bounds"); } } } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "bqcuong2212@gmail.com" ]
bqcuong2212@gmail.com
6c0f5ad8b2ffd1f668ba6259a07a2b209e3c651f
3180c5a659d5bfdbf42ab07dfcc64667f738f9b3
/src/unk/com/zing/zalo/social/io.java
6bbf35a42e4b2686a41a2e349ce55bba178327c2
[]
no_license
tinyx3k/ZaloRE
4b4118c789310baebaa060fc8aa68131e4786ffb
fc8d2f7117a95aea98a68ad8d5009d74e977d107
refs/heads/master
2023-05-03T16:21:53.296959
2013-05-18T14:08:34
2013-05-18T14:08:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
994
java
package unk.com.zing.zalo.social; import android.view.View; import android.view.View.OnClickListener; import android.widget.LinearLayout; import com.zing.zalo.utils.p; class io implements View.OnClickListener { io(UpdateStatusActivity paramUpdateStatusActivity) { } public void onClick(View paramView) { try { if ((UpdateStatusActivity.i(this.SE) != null) && (UpdateStatusActivity.i(this.SE).length() > 0)) { p.eK(this.SE.getString(2131165718)); return; } if (UpdateStatusActivity.h(this.SE).getVisibility() == 0) { this.SE.removeDialog(1); this.SE.showDialog(1); return; } } catch (Exception localException) { localException.printStackTrace(); return; } this.SE.removeDialog(0); this.SE.showDialog(0); } } /* Location: /home/danghvu/0day/Zalo/Zalo_1.0.8_dex2jar.jar * Qualified Name: com.zing.zalo.social.io * JD-Core Version: 0.6.2 */
[ "danghvu@gmail.com" ]
danghvu@gmail.com
f3c5f66763fbaa63a8dc1204e8db7c44c5bf4f6c
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a011/A011374Test.java
6809324f7a5dfdcf1dcaa799d6e5032e2f131dca
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a011; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A011374Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
6b4151b76ea42ddf13326a8628b11193d7aa8595
e5baa5ba65c5cb80b38203b28c064a475aa63693
/src/cn/edustar/jitar/pojos/UserOnLine.java
8f92986beffa7ac47a6c2bfbf83279a1d92c5718
[]
no_license
yxxcrtd/jitar2012
bbe00b1eb2e505400dcfec396201752c3888199c
ccae07ff44a3cb9dc3d0b75673cbca699fa66b80
refs/heads/master
2020-05-31T15:26:40.107486
2019-06-05T08:05:22
2019-06-05T08:05:22
190,352,419
0
0
null
null
null
null
UTF-8
Java
false
false
1,487
java
package cn.edustar.jitar.pojos; import java.io.Serializable; /** * 用户在线对象 * * @author Yang xinxin * @version 1.0.0 Mar 25, 2009 10:53:59 AM */ public class UserOnLine implements Serializable { /** serialVersionUID */ private static final long serialVersionUID = 5894846391599755870L; /** 对象标识 */ private int Id; /** 用户Id,如为游客,则可以为空 */ private Integer userId; /** 用户名,如为游客,则可以为:Guest */ private String userName; /** 时间的毫秒数 */ private long onlineTime; /** Construct */ public UserOnLine() { // } // Get and set /** 对象标识 */ public int getId() { return Id; } /** 对象标识 */ public void setId(int id) { Id = id; } /** 用户Id,如为游客,则可以为空 */ public Integer getUserId() { return userId; } /** 用户Id,如为游客,则可以为空 */ public void setUserId(Integer userId) { this.userId = userId; } /** 用户名,如为游客,则可以为:Guest */ public String getUserName() { return userName; } /** 用户名,如为游客,则可以为:Guest */ public void setUserName(String userName) { this.userName = userName; } /** 时间的毫秒数 */ public long getOnlineTime() { return onlineTime; } /** 时间的毫秒数 */ public void setOnlineTime(long onlineTime) { this.onlineTime = onlineTime; } }
[ "yxxcrtd@gmail.com" ]
yxxcrtd@gmail.com
2cef586783e1d38ae57e5cc5ba6a2b46ca175a16
731a08ab422f463413ed8658a4d1243aeb392575
/febit-web/src/main/java/org/febit/web/render/TempFileResult.java
f5292b2c7ef4d40b6e07e4284e58e9e10f1c1e1c
[ "Apache-2.0" ]
permissive
restmad/febit
7ffb6db6397bfb05f375e7737c536c7c68a62bc5
2d532cdb9bf12d98b8b4155c919f60fa64461b3a
refs/heads/master
2021-01-01T17:09:04.341995
2017-07-20T03:19:05
2017-07-20T03:19:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,612
java
/** * Copyright 2013 febit.org (support@febit.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.febit.web.render; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import javax.servlet.http.HttpServletResponse; import jodd.io.StreamUtil; import org.febit.web.ActionRequest; import org.febit.web.util.ServletUtil; /** * * @author zqq90 */ public class TempFileResult implements Renderable { protected final File file; protected final String downloadFileName; protected final String mimeType; protected final String etag; protected final int length; protected TempFileResult(File file, String downloadFileName, String mimeType, String etag, int length) { this.file = file; this.downloadFileName = downloadFileName; this.mimeType = mimeType; this.etag = etag; this.length = length; } public TempFileResult(String downloadFileName, File file, String mimeType) { this(file, downloadFileName, mimeType, null, (int) file.length()); } public TempFileResult(File file, String mimeType, String etag) { this(file, file.getName(), mimeType, etag, (int) file.length()); } public TempFileResult(File file, String mimeType) { this(file, file.getName(), mimeType, null, (int) file.length()); } public TempFileResult(File file) { this(file, null, null); } @Override public Object render(ActionRequest actionRequest) throws IOException { HttpServletResponse response = actionRequest.response; if (etag != null) { response.setHeader("Etag", etag); } ServletUtil.prepareResponse(response, downloadFileName, mimeType, length); InputStream contentInputStream = new FileInputStream(file); OutputStream out = response.getOutputStream(); StreamUtil.copy(contentInputStream, out); out.flush(); StreamUtil.close(contentInputStream); file.delete(); return null; } }
[ "zqq_90@163.com" ]
zqq_90@163.com
34a8804ddf331c9b557d7fff4f4742a68d68d422
729b091eb91817684fa8423919ec31e61c7a0ccb
/src/plugins/fastpath/src/java/org/jivesoftware/openfire/fastpath/providers/EmailProvider.java
00a2c9bc8e0df703b2cc4fed77e451998aa34bc0
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
idwanglu2010/openfire
77ac5c19db71193c74bf126f382e060ce3516ee2
cbfc8211ce0dce7ddb48dd2e5aece96b2ab81aab
refs/heads/master
2021-01-19T15:01:33.678637
2014-10-04T05:33:03
2014-10-04T05:33:03
24,532,636
4
2
null
null
null
null
UTF-8
Java
false
false
4,149
java
/** * $RCSfile$ * $Revision: 19353 $ * $Date: 2005-07-20 16:25:54 -0700 (Wed, 20 Jul 2005) $ * * Copyright (C) 1999-2008 Jive Software. 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.jivesoftware.openfire.fastpath.providers; import org.jivesoftware.xmpp.workgroup.Workgroup; import org.jivesoftware.xmpp.workgroup.WorkgroupProvider; import org.jivesoftware.xmpp.workgroup.disco.DiscoFeaturesProvider; import org.jivesoftware.xmpp.workgroup.utils.ModelUtil; import org.jivesoftware.openfire.fastpath.history.ChatTranscriptManager; import org.dom4j.Element; import org.xmpp.packet.IQ; import org.xmpp.packet.PacketError; import org.jivesoftware.util.EmailService; import org.jivesoftware.util.JiveGlobals; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; /** * Allows agents and web client w/authentication to send email. */ public class EmailProvider implements WorkgroupProvider, DiscoFeaturesProvider { public boolean handleGet(IQ packet) { return false; } public boolean handleSet(IQ packet) { Element iq = packet.getChildElement(); String name = iq.getName(); return "send-email".equals(name); } public void executeGet(IQ packet, Workgroup workgroup) { // Nothing. } public void executeSet(IQ packet, Workgroup workgroup) { IQ reply = IQ.createResultIQ(packet); Element iq = packet.getChildElement(); String from = iq.element("fromAddress").getTextTrim(); String to = iq.element("toAddress").getTextTrim(); String subject = iq.element("subject").getTextTrim(); String body = iq.element("message").getTextTrim(); // Need to replace the \\n for \n to allow for text sending. body = body.replace("\\n", "\n"); String html = iq.element("useHTML").getTextTrim(); boolean useHTML = false; if ("true".equals(html)) { useHTML = true; } String sessionID = null; if(iq.element("sessionID") != null){ sessionID = iq.element("sessionID").getTextTrim(); } // Handle missing information. if (!ModelUtil.hasLength(from) || !ModelUtil.hasLength(to) || !ModelUtil.hasLength(subject) || (!ModelUtil.hasLength(body) && !ModelUtil.hasLength(sessionID))) { reply = IQ.createResultIQ(packet); reply.setChildElement(packet.getChildElement().createCopy()); reply.setError(new PacketError(PacketError.Condition.not_acceptable)); workgroup.send(reply); return; } if (ModelUtil.hasLength(sessionID)) { ChatTranscriptManager.sendTranscriptByMail(sessionID, to); } else { EmailService emailService = EmailService.getInstance(); if (!useHTML) { emailService.sendMessage(null, to, null, from, subject, body, null); } else { emailService.sendMessage(null, to, null, from, subject, null, body); } } workgroup.send(reply); } public Collection<String> getFeatures() { String property = JiveGlobals.getProperty("mail.configured"); if (!ModelUtil.hasLength(property)) { return Collections.emptyList(); } List<String> list = new ArrayList<String>(); list.add("jive:email:provider"); return list; } }
[ "idwanglu2010@gmail.com" ]
idwanglu2010@gmail.com
1dc3b237be0283e50043ce51d1dc74788d50a105
74b460e67d96f420de0a9eab763bf1b0969d1aa3
/testData/debug/src/AccessNotObjectSubclass.java
ea6a1c8a01377f9673b6b761b8e592c6c0033901
[ "Apache-2.0" ]
permissive
bibaev/stream-debugger-plugin
aed15d0c64fd188c71361cfd71cef455aa6d779c
1e4184d83eb0bbc99e878fccb59236937d50c7a1
refs/heads/master
2021-03-22T02:56:04.819954
2018-01-11T12:50:46
2018-01-11T12:50:46
80,594,815
8
5
Apache-2.0
2018-01-11T12:50:46
2017-02-01T06:19:05
Java
UTF-8
Java
false
false
459
java
import java.util.function.Consumer; import java.util.stream.Stream; public class AccessNotObjectSubclass { public static void main(String[] args) { // Breakpoint! Stream.of(1, 2, 3).peek(new Super() { @Override public void accept(Integer integer) { final String str = new MyClass().toString(); } }).count(); } private static class MyClass { } static abstract class Super implements Consumer<Integer> { } }
[ "vitaliy.bibaev@jetbrains.com" ]
vitaliy.bibaev@jetbrains.com
f73ba7ac1c2be5172adbf0fb906164f9e8c729c4
67c758bad3524a128384e14ed44e23d2bcf6a1c4
/eu.jgen.notes.uaf/src/eu/jgen/notes/uaf/proc/Function.java
30023505bc6b0421a9b3d5895c03a5aeb2a2d704
[ "BSD-2-Clause" ]
permissive
JGen-Notes/JGenNotesUserAddedFunctions
6469156065564181f1e2e38759b2d2f19c63da91
31342e26fa52b7c4e61cf09f072a2c4e4b231915
refs/heads/master
2021-01-23T17:05:18.888005
2017-09-11T08:56:09
2017-09-11T08:56:09
102,759,617
0
0
null
null
null
null
UTF-8
Java
false
false
229
java
package eu.jgen.notes.uaf.proc; public @interface Function { public String CGName(); public boolean useselec() default false; public String dbmsname() default "IEFDB"; public boolean impl() default false; }
[ "ms@jgen.eu" ]
ms@jgen.eu
25c18d8a8e9bd91a12562085dad457199fe1f6ae
7cd68884a12f1f4007342ce5d2d00ee523add1f3
/User_Manager/src/Crud_operations/pro_2.java
b4ad843463eded65df1d490e4bee8a77d535c146
[]
no_license
Lezhil/Simple_Database_creation
ecdba0f10e7c1fc322feeb7c18a4e298810550fa
efad6b779d0216fee58a0613a453ebbf489c7edb
refs/heads/master
2023-02-12T18:52:11.138469
2021-01-06T03:36:21
2021-01-06T03:36:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
950
java
package Crud_operations; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; public class pro_2 { public static void main(String[] args) throws Exception { String jdbcURL ="jdbc:mysql://localhost:3306/sampledb"; String dbusername ="root"; String dbpassword=""; Connection con=DriverManager.getConnection(jdbcURL,dbusername,dbpassword); String sql="SELECT*FROM users"; Statement stt = con.createStatement(); ResultSet result = stt.executeQuery(sql); while(result.next()) { int user_id=result.getInt("user_id"); String username =result.getString("username"); String fullname=result.getString("fullname"); String email=result.getString("email"); String password=result.getString("password"); System.out.println(user_id+":"+username+":"+fullname+":"+email+":"+password+":"); } con.close(); } }
[ "Admin@Admin-PC" ]
Admin@Admin-PC
dad9462a17d977996cd01c9840dfc6eb64fd229b
87c3c335023681d1c906892f96f3a868b3a6ee8e
/HTML5/dev/simplivity-citrixplugin-service/src/main/java/com/vmware/vim25/VmConfigFileQueryFilter.java
91c0539841a2f580596980b205c8cdd9b37c7e72
[ "Apache-2.0" ]
permissive
HewlettPackard/SimpliVity-Citrix-VCenter-Plugin
19d2b7655b570d9515bf7e7ca0cf1c823cbf5c61
504cbeec6fce27a4b6b23887b28d6a4e85393f4b
refs/heads/master
2023-08-09T08:37:27.937439
2020-04-30T06:15:26
2020-04-30T06:15:26
144,329,090
0
1
Apache-2.0
2020-04-07T07:27:53
2018-08-10T20:24:34
Java
UTF-8
Java
false
false
1,213
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2019.06.12 at 09:16:35 AM EDT // package com.vmware.vim25; /** * */ @SuppressWarnings("all") public class VmConfigFileQueryFilter extends DynamicData { private final static int[] NULL_MATCH_CONFIG_VERSION_ARRAY = new int[ 0 ] ; public int[] matchConfigVersion; public Boolean encrypted; public int[] getMatchConfigVersion() { if ((matchConfigVersion) == null) { return (NULL_MATCH_CONFIG_VERSION_ARRAY); } return matchConfigVersion; } public void setMatchConfigVersion(int[] matchConfigVersion) { this.matchConfigVersion = matchConfigVersion; } public Boolean getEncrypted() { return encrypted; } public void setEncrypted(Boolean encrypted) { this.encrypted = encrypted; } public Boolean isEncrypted() { return encrypted; } }
[ "anuanusha471@gmail.com" ]
anuanusha471@gmail.com
b9feaba86094a842920f9027a3288102c81a3c8a
ed623c8799b2bd31ca730f0349630bced0ae1599
/datavec-api/src/main/java/org/datavec/api/transform/transform/categorical/IntegerToCategoricalTransform.java
6f2d8cc01caff94d472aea440de31b3adec91a50
[ "Apache-2.0" ]
permissive
akhodakivskiy/DataVec
285575dbf16964692391856b936ffd04bc866cc0
430696b7ce8d9e7d0557502059c1a2adb6e54efd
refs/heads/master
2021-01-18T06:25:11.506333
2016-07-16T23:45:26
2016-07-16T23:45:26
63,507,043
0
0
null
2016-07-16T23:54:33
2016-07-16T23:54:33
null
UTF-8
Java
false
false
2,448
java
/* * * Copyright 2016 Skymind, Inc. * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. */ package org.datavec.api.transform.transform.categorical; import org.datavec.api.transform.metadata.CategoricalMetaData; import org.datavec.api.writable.Text; import org.datavec.api.writable.Writable; import org.datavec.api.transform.metadata.ColumnMetaData; import org.datavec.api.transform.transform.BaseColumnTransform; import java.util.*; /** * Convert an integer column to a categorical column, using a provided {@code Map<Integer,String>} * * @author Alex Black */ public class IntegerToCategoricalTransform extends BaseColumnTransform { private final Map<Integer, String> map; public IntegerToCategoricalTransform(String columnName, Map<Integer, String> map) { super(columnName); this.map = map; } public IntegerToCategoricalTransform(String columnName, List<String> list) { super(columnName); this.map = new LinkedHashMap<>(); int i = 0; for (String s : list) map.put(i++, s); } @Override public ColumnMetaData getNewColumnMetaData(ColumnMetaData oldColumnType) { return new CategoricalMetaData(new ArrayList<>(map.values())); } @Override public Writable map(Writable columnWritable) { return new Text(map.get(columnWritable.toInt())); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("IntegerToCategoricalTransform(map=["); List<Integer> list = new ArrayList<>(map.keySet()); Collections.sort(list); boolean first = true; for (Integer i : list) { if (!first) sb.append(","); sb.append(i).append("=\"").append(map.get(i)).append("\""); first = false; } sb.append("])"); return sb.toString(); } }
[ "blacka101@gmail.com" ]
blacka101@gmail.com
e0922d3494562f5bf32339a2859b9d2b5681a6d2
58df55b0daff8c1892c00369f02bf4bf41804576
/src/ftt.java
50512a0340f4bc45687891b69ed537788b884446
[]
no_license
gafesinremedio/com.google.android.gm
0b0689f869a2a1161535b19c77b4b520af295174
278118754ea2a262fd3b5960ef9780c658b1ce7b
refs/heads/master
2020-05-04T15:52:52.660697
2016-07-21T03:39:17
2016-07-21T03:39:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
310
java
import android.os.Parcelable.Creator; import com.google.android.gms.people.identity.internal.models.PersonImpl.AboutsImpl; public final class ftt implements Parcelable.Creator<PersonImpl.AboutsImpl> {} /* Location: * Qualified Name: ftt * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
ddaf03aeb2cf1cf98785aeb06fa82bb53ee3578a
f0546b3f86f2a2616d7ac0aead52684aef60d4e3
/comclient/src/com/jhw/adm/comclient/carrier/protoco/Hex95Codec.java
20ac6a657fa1a40ad2bbe21a4d39175dc66a5794
[]
no_license
dudefu/WTNMS2017
dcc39f7b7c431be6d7fb60881f38af9b3883e622
b014fd08eba9096cfbdf0b026a81c88435fcf4ed
refs/heads/master
2021-01-19T12:10:45.089703
2017-04-12T07:28:55
2017-04-12T07:28:55
88,021,447
0
0
null
null
null
null
UTF-8
Java
false
false
696
java
package com.jhw.adm.comclient.carrier.protoco; import com.jhw.adm.comclient.carrier.serial.ScrollBuffer; public class Hex95Codec extends PacketCodec { @Override protected void decodeBody(ScrollBuffer scrollBuffer, DataPacket packet) { if (packet.getCommandCode() != HANDLE_COMMAND) return; int waveBand1 = scrollBuffer.getInt(); int waveBand2 = scrollBuffer.getInt(); int timeout1 = scrollBuffer.get2ByteHL(); // int timeout2 = scrollBuffer.get2ByteHL(); Hex95RSP hex95 = (Hex95RSP) packet; hex95.setWaveBand1(waveBand1); hex95.setWaveBand2(waveBand2); hex95.setTimeout1(timeout1); // hex95.setTimeout2(timeout2); } public static final int HANDLE_COMMAND = 0x95; }
[ "dudefu@foxmail.com" ]
dudefu@foxmail.com
a398939906515b347d5af3645309f409358b83d2
ae670ebee62358c8652e96aad3f85d8ad35fe2b4
/pret-common/src/main/java/com/pret/common/utils/MD5Util.java
3422abd7e9b3403ef3dcb11f2cf6331c3776385b
[]
no_license
iswu2013/pret
6ebd229eea51ffbcca51a337ff41ac22f800e6ca
041b48ef16b6a42564ac75d291846b491cbd6692
refs/heads/master
2022-07-11T23:17:05.729203
2019-12-29T14:51:31
2019-12-29T14:51:31
207,935,231
0
1
null
2022-06-17T02:32:05
2019-09-12T01:03:37
Java
UTF-8
Java
false
false
742
java
package com.pret.common.utils; import org.apache.shiro.crypto.hash.SimpleHash; import org.apache.shiro.util.ByteSource; public class MD5Util { protected MD5Util(){ } private static final String ALGORITH_NAME = "md5"; private static final int HASH_ITERATIONS = 2; public static String encrypt(String password) { return new SimpleHash(ALGORITH_NAME, password, ByteSource.Util.bytes(password), HASH_ITERATIONS).toHex(); } public static String encrypt(String username, String password) { return new SimpleHash(ALGORITH_NAME, password, ByteSource.Util.bytes(username.toLowerCase() + password), HASH_ITERATIONS).toHex(); } public static void main(String[] args) { System.out.println(encrypt("mrbird","1234qwer")); } }
[ "1037216275@qq.com" ]
1037216275@qq.com
90aea91e8a95e3c483e162498e7f5e03b7817072
684f50dd1ae58a766ce441d460214a4f7e693101
/common/src/main/java/com/dimeng/p2p/FeeCode.java
9b7111c2a14cd71864d3ba7e2d1b7eecbb16f2bf
[]
no_license
wang-shun/rainiee-core
a0361255e3957dd58f653ae922088219738e0d25
80a96b2ed36e3460282e9e21d4f031cfbd198e69
refs/heads/master
2020-03-29T16:40:18.372561
2018-09-22T10:05:17
2018-09-22T10:05:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,376
java
package com.dimeng.p2p; public class FeeCode { // 充值类 /** * 在线充值金额 */ public static final int CZ = 1001; /** * 充值手续费 */ public static final int CZ_SXF = 1002; /** * 充值成本 */ public static final int CZ_CB = 1003; /** * 线下充值金额 */ public static final int CZ_XX = 1004; /** * 平台充值 */ public static final int PTCZ = 1005; /** * 线下提现 */ public static final int TX_XX = 1006; // 提现类 /** * 提现金额 */ public static final int TX = 2001; /** * 提现手续费 */ public static final int TX_SXF = 2002; /** * 提现成本 */ public static final int TX_CB = 2003; /** * 平台提现 */ public static final int PTTX = 2004; /** * 提现失败金额返还 */ public static final int TXSB = 2005; /** * 提现失败手续费返还 */ public static final int TXSB_SXF = 2006; // 投资类 /** * 投资 */ public static final int TZ = 3001; /** * 投资撤销 */ public static final int TZ_CX = 3002; /** * 体验金投资 */ public static final int TYJTZ = 3003; // 债权转让 /** * 债权转让手续费 */ public static final int ZQZR_SXF = 4001; /** * 卖出债权 */ public static final int ZQZR_MC = 4002; /** * 债权转让买入 */ public static final int ZQZR_MR = 4003; /** * 购买不良债权 */ public static final int BLZQ_GM = 4004; // 借款类 /** * 借款本金 */ public static final int JK = 6001; /** * 借款管理费 */ public static final int JK_GLF = 6002; // 还款类 /** * 本金 */ public static final int TZ_BJ = 7001; /** * 利息 */ public static final int TZ_LX = 7002; /** * 逾期管理费 */ public static final int TZ_YQGLF = 7003; /** * 逾期罚息 */ public static final int TZ_FX = 7004; /** * 提前还款违约金 */ public static final int TZ_WYJ = 7005; /** * 垫付 */ public static final int TZ_DF = 7006; /** * 违约金手续费 */ public static final int TZ_WYJ_SXF = 7007; /** * 投资奖励 */ public static final int TZ_TBJL = 7008; /** * 投资红包 */ public static final int TZ_TBHB = 7009; /** * 加息奖励 */ public static final int JX_REWARD = 7010; /** * 活动费用 */ public static final int HD = 8001; /** * 有效推广 */ public static final int TG_YX = 9001; /** * 持续推广 */ public static final int TG_CX = 9002; // 信用类 /** * 发标审核信用扣除 */ public static final int XY_FB_TZ = 1101; /** * 还款信用返还 */ public static final int XY_HK_FH = 1102; /** * 流标信用返还 */ public static final int XY_LB_FH = 1103; /** * 人工调整信用额度 */ public static final int XY_CZ = 1104; /** * 默认信用额度 */ public static final int XY_MR = 1105; /** * 放款多余信用额度返还 */ public static final int XY_FK_FH = 1106; // 费用类 /** * 成交服务费、借款管理费 */ public static final int CJFWF = 1201; /** * 理财管理费/投资管理费 */ public static final int GLF = 1202; // 优选理财 /** * 投优选理财 */ public static final int YXLC = 1301; /** * 优选加入费 */ public static final int YXLC_JR = 1302; /** * 优选服务费 */ public static final int YXLC_FW = 1303; /** * 优选退出费 */ public static final int YXLC_TC = 1304; /** * 优选理财还款 */ public static final int YXLC_HK = 1305; /** * 优选理财利息 */ public static final int YXLC_LX = 1306; /** * 风险保证金充值 */ public static final int FXBZJ = 1401; /** * 风险保证金转出 */ public static final int FXBZJ_ZC = 1402; /** * 身份验证手续费 */ public static final int SFYZSXF = 1501; /** * 查标服务费 */ public static final int CBFWF = 1502; /** * 担保费 */ public static final int DBF = 1503; /** * 平台划拨 */ public static final int PTHB = 1701; /** * 商品交易 */ public static final int MALL_BUY = 1702; /** * 商品退款 */ public static final int MALL_REFUND = 1703; /** * 撤销商品交易 */ public static final int MALL_NOPASS = 1704; /****************** 统计费用 *****************************/ /** * 公司虚拟户到借款人虚拟户的总额 */ public static final int GSDJKRZE = 1601; /** * 借款人虚拟户到投资人卡的总额; */ public static final int JKRDTZRZE = 1602; /** * 公益标捐款 */ public static final int PUBLIC_GOOD_ID = 1801; /****************** 担保额度 *****************************/ /** * 发标审核担保额度扣除 */ public static final int DB_FB_KC = 1301; /** * 流标担保额度返还 */ public static final int DB_LB_FH = 1302; /** * 还款担保额度返还 */ public static final int DB_HK_FH = 1303; /** * 人工调整担保额度 */ public static final int DB_CZ = 1304; /** * 默认担保额度 */ public static final int DB_MR = 1305; /** * 放款多余担保额度返还 */ public static final int DB_FK_FH = 1306; /** * 购买不良债权担保额度赠送 */ public static final int DB_BLZQGM_ZS = 1307; }
[ "humengmeng@rainiee.com" ]
humengmeng@rainiee.com
6cfe1b781f9a269361592579ba22046f8a9cee6d
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a088/A088015Test.java
427405bd9daf810119c8d098f96db1b08643b983
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a088; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A088015Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
ba24deb0e2781512976b2c8f2646ce79d76f0cca
cf7e9fcaa002d7e3a2e4396831bf122fd1ac7bbc
/engine/src/main/java/org/rnd/jmagic/engine/generators/ManaSpentOn.java
96fb7cfae3deb286847fafb7db00da924fc7ed43
[]
no_license
NorthFury/jmagic
9b28d803ce6f8bf22f22eb41e2a6411bc11c8cdf
efe53d9d02716cc215456e2794a43011759322d9
refs/heads/master
2020-05-28T11:04:50.631220
2014-06-17T09:48:44
2014-06-17T09:48:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
729
java
package org.rnd.jmagic.engine.generators; import org.rnd.jmagic.engine.*; /** * Evaluates to every ManaSymbol spent on an object */ public class ManaSpentOn extends SetGenerator { public static ManaSpentOn instance(SetGenerator what) { return new ManaSpentOn(what); } private final SetGenerator set; private ManaSpentOn(SetGenerator set) { this.set = set; } @Override public MagicSet evaluate(GameState state, Identified thisObject) { MagicSet ret = new MagicSet(); for(GameObject o: this.set.evaluate(state, thisObject).getAll(GameObject.class)) for(Event e: o.getCostsPaid()) if(e.type.equals(EventType.PAY_MANA)) ret.addAll(e.getResult(state).getAll(ManaSymbol.class)); return ret; } }
[ "robyter@gmail" ]
robyter@gmail
a9ffdc41c356e6edb9da52c68e58775fa4e5b445
0e4c02fe73cf6f14b1c9a60f3c4951d32755ae30
/crf-builder-model/src/main/java/org/modelcatalogue/crf/model/MinimalItem.java
f33a0592dfc094c30c93903946bcd7776b40118f
[ "Apache-2.0" ]
permissive
toskrip/crf-builder
fd13f369b074756f20f4ff93dbbc31d8192f21e9
ec3cdc0255ca6c65ecbc5321ec98aa36f7e1c02d
refs/heads/master
2023-04-10T15:14:57.366568
2021-04-20T09:01:56
2021-04-20T09:01:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,093
java
package org.modelcatalogue.crf.model; public interface MinimalItem extends HasPageNumber, HasDisplayStatus { String getName(); void setName(String name); String getDescriptionLabel(); void setDescriptionLabel(String descriptionLabel); String getLeftItemText(); void setLeftItemText(String leftItemText); String getUnits(); void setUnits(String units); String getRightItemText(); void setRightItemText(String rightItemText); Section getSection(); Group getGroup(); String getHeader(); void setHeader(String header); String getSubheader(); void setSubheader(String subheader); Integer getColumnNumber(); void setColumnNumber(Integer columnNumber); String getQuestionNumber(); void setQuestionNumber(String questionNumber); ResponseType getResponseType(); Integer getPhi(); void setPhi(Integer phi); Integer getRequired(); void setRequired(Integer required); ConditionalDisplay getConditionalDisplay(); void setConditionalDisplay(ConditionalDisplay conditionalDisplay); }
[ "vladimir@orany.cz" ]
vladimir@orany.cz
900c462bdb903a2fdc7b1e34038450fe8f795fc5
71cfe0d2d0e78318d5e07b2bcbdf7d085400879d
/plugins/net.bioclipse.reaction/src/net/bioclipse/reaction/wizards/FormWizardContextMenuProvider.java
f62b13bfa09055470ac2faa3b07614e8920d118a
[]
no_license
bioclipse/bioclipse.medea
31988c594ecf7c386c436fe3046c7f5507d730ea
579dba6440d7b50365b3a726d7136e7de198687f
refs/heads/master
2020-04-11T04:23:55.435589
2011-09-17T11:47:24
2011-09-17T11:47:24
833,150
0
0
null
null
null
null
UTF-8
Java
false
false
1,516
java
package net.bioclipse.reaction.wizards; import org.eclipse.gef.ContextMenuProvider; import org.eclipse.gef.EditPartViewer; import org.eclipse.gef.ui.actions.ActionRegistry; import org.eclipse.gef.ui.actions.GEFActionConstants; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IMenuManager; import org.eclipse.ui.actions.ActionFactory; public class FormWizardContextMenuProvider extends ContextMenuProvider { private ActionRegistry actionRegistry; public FormWizardContextMenuProvider(EditPartViewer viewer, ActionRegistry registry) { super(viewer); setActionRegistry(registry); } @Override public void buildContextMenu(IMenuManager menu) { GEFActionConstants.addStandardActionGroups(menu); IAction action = getActionRegistry().getAction(ActionFactory.UNDO.getId()); menu.appendToGroup(GEFActionConstants.GROUP_UNDO, action); action = getActionRegistry().getAction(ActionFactory.REDO.getId()); menu.appendToGroup(GEFActionConstants.GROUP_UNDO, action); action = getActionRegistry().getAction(ActionFactory.DELETE.getId()); menu.appendToGroup(GEFActionConstants.GROUP_EDIT, action); } public ActionRegistry getActionRegistry() { return actionRegistry; } public void setActionRegistry(ActionRegistry registry) { this.actionRegistry = registry; } }
[ "egon.willighagen@gmail.com" ]
egon.willighagen@gmail.com
1cc8dd59c7cda19b8bd71bd06644032fb858b70e
380366cde7f499290a61f8372034744cae137a4e
/common/src/test/java/org/onap/so/client/sdno/beans/SdnoBeansTest.java
6f33c490f680f132d6e37d30ea02af96d022422e
[ "Apache-2.0" ]
permissive
onap/so
82a219ed0e5559a94d630cc9956180dbab0d33b8
43224c4dc5ff3bf67979f480d8628f300497da07
refs/heads/master
2023-08-21T00:09:36.560504
2023-07-03T16:30:22
2023-07-03T16:30:55
115,077,083
18
25
Apache-2.0
2022-03-21T09:59:49
2017-12-22T04:39:28
Java
UTF-8
Java
false
false
2,345
java
/*- * ============LICENSE_START======================================================= * ONAP - SO * ================================================================================ * Copyright (C) 2018 AT&T Intellectual Property. 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. * ============LICENSE_END========================================================= */ package org.onap.so.client.sdno.beans; import org.junit.Test; import com.openpojo.reflection.PojoClass; import com.openpojo.reflection.PojoClassFilter; import com.openpojo.reflection.filters.FilterEnum; import com.openpojo.reflection.filters.FilterPackageInfo; import com.openpojo.validation.Validator; import com.openpojo.validation.ValidatorBuilder; import com.openpojo.validation.rule.impl.GetterMustExistRule; import com.openpojo.validation.rule.impl.SetterMustExistRule; import com.openpojo.validation.test.impl.GetterTester; import com.openpojo.validation.test.impl.SetterTester; public class SdnoBeansTest { private PojoClassFilter filterTestClasses = new FilterTestClasses(); @Test public void pojoStructure() { test("org.onap.so.client.sdno.beans"); } private void test(String pojoPackage) { Validator validator = ValidatorBuilder.create().with(new GetterMustExistRule()).with(new SetterMustExistRule()) .with(new SetterTester()).with(new GetterTester()).build(); validator.validate(pojoPackage, new FilterPackageInfo(), new FilterEnum(), filterTestClasses); } private static class FilterTestClasses implements PojoClassFilter { public boolean include(PojoClass pojoClass) { return !pojoClass.getSourcePath().contains("/test-classes/"); } } }
[ "mb388a@us.att.com" ]
mb388a@us.att.com
f7e6a6352bc340343abbe2c79b48a48022eb2314
678a3d58c110afd1e9ce195d2f20b2531d45a2e0
/sources/com/airbnb/android/core/modules/DeferredAppInitExecutor$$Lambda$10.java
4c14c5402193da62726cf1d69f67e00677a957c4
[]
no_license
jasonnth/AirCode
d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5
d37db1baa493fca56f390c4205faf5c9bbe36604
refs/heads/master
2020-07-03T08:35:24.902940
2019-08-12T03:34:56
2019-08-12T03:34:56
201,842,970
0
2
null
null
null
null
UTF-8
Java
false
false
966
java
package com.airbnb.android.core.modules; import com.airbnb.android.core.PostApplicationCreatedInitializer; final /* synthetic */ class DeferredAppInitExecutor$$Lambda$10 implements Runnable { private final DeferredAppInitExecutor arg$1; private final PostApplicationCreatedInitializer arg$2; private DeferredAppInitExecutor$$Lambda$10(DeferredAppInitExecutor deferredAppInitExecutor, PostApplicationCreatedInitializer postApplicationCreatedInitializer) { this.arg$1 = deferredAppInitExecutor; this.arg$2 = postApplicationCreatedInitializer; } public static Runnable lambdaFactory$(DeferredAppInitExecutor deferredAppInitExecutor, PostApplicationCreatedInitializer postApplicationCreatedInitializer) { return new DeferredAppInitExecutor$$Lambda$10(deferredAppInitExecutor, postApplicationCreatedInitializer); } public void run() { DeferredAppInitExecutor.lambda$null$5(this.arg$1, this.arg$2); } }
[ "thanhhuu2apc@gmail.com" ]
thanhhuu2apc@gmail.com
561516e81c56702ed63aa16030ad460ee7d252d3
76852b1b29410436817bafa34c6dedaedd0786cd
/sources-2020-11-04-tempmail/sources/com/google/android/gms/internal/ads/zzpb.java
1309c348653dda5408744e7e4a2d71fd01c166b9
[]
no_license
zteeed/tempmail-apks
040e64e07beadd8f5e48cd7bea8b47233e99611c
19f8da1993c2f783b8847234afb52d94b9d1aa4c
refs/heads/master
2023-01-09T06:43:40.830942
2020-11-04T18:55:05
2020-11-04T18:55:05
310,075,224
0
0
null
null
null
null
UTF-8
Java
false
false
1,174
java
package com.google.android.gms.internal.ads; import android.text.TextUtils; /* compiled from: com.google.android.gms:play-services-ads@@19.2.0 */ public final class zzpb { public static void a(boolean z) { if (!z) { throw new IllegalArgumentException(); } } public static void b(boolean z, Object obj) { if (!z) { throw new IllegalArgumentException(String.valueOf(obj)); } } public static String c(String str) { if (!TextUtils.isEmpty(str)) { return str; } throw new IllegalArgumentException(); } public static <T> T d(T t) { if (t != null) { return t; } throw null; } public static void e(boolean z) { if (!z) { throw new IllegalStateException(); } } public static void f(boolean z, Object obj) { if (!z) { throw new IllegalStateException(String.valueOf(obj)); } } public static int g(int i, int i2, int i3) { if (i >= 0 && i < i3) { return i; } throw new IndexOutOfBoundsException(); } }
[ "zteeed@minet.net" ]
zteeed@minet.net
56c8ea8aa9f5758d596256a7ca7227d4f4355fa6
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/33/33_566db50f8698ba0c1e5f8f175a3dbdfdbd47bbb1/AStridedMatrix/33_566db50f8698ba0c1e5f8f175a3dbdfdbd47bbb1_AStridedMatrix_s.java
7d56c2068dd2dbb76a15c48c7e924c5bb72b2560
[]
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,295
java
package mikera.matrixx.impl; import mikera.vectorz.AVector; import mikera.vectorz.Vectorz; public abstract class AStridedMatrix extends AArrayMatrix { protected AStridedMatrix(double[] data, int rows, int cols) { super(data, rows, cols); } public abstract int getArrayOffset(); public abstract int rowStride(); public abstract int columnStride(); @Override public AStridedMatrix subMatrix(int rowStart, int rows, int colStart, int cols) { if ((rowStart<0)||(rowStart>=rows)||(colStart<0)||(colStart>=cols)) throw new IndexOutOfBoundsException("Invalid submatrix start position"); if ((rowStart+rows>this.rows)||(colStart+cols>this.cols)) throw new IndexOutOfBoundsException("Invalid submatrix end position"); if ((rows<1)||(cols<1)) throw new IllegalArgumentException("Submatrix has no elements"); return StridedMatrix.wrap(data, rows, cols, getArrayOffset()+rowStart*rowStride()+colStart*columnStride(), this.rowStride(), this.columnStride()); } @Override public AVector getRow(int i) { return Vectorz.wrapStrided(data, getArrayOffset()+i*rowStride(), cols, columnStride()); } @Override public AVector getColumn(int i) { return Vectorz.wrapStrided(data, getArrayOffset()+i*columnStride(), rows, rowStride()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
2808a4c69d3a3bda95220ed94de004c79d5961be
4c9d35da30abf3ec157e6bad03637ebea626da3f
/eclipse/libs_src/org/ripple/bouncycastle/asn1/ua/DSTU4145Params.java
f2bf44c10f282f5dcda27571c61da2fc73685684
[ "LicenseRef-scancode-unknown-license-reference", "MIT", "Apache-2.0" ]
permissive
youweixue/RipplePower
9e6029b94a057e7109db5b0df3b9fd89c302f743
61c0422fa50c79533e9d6486386a517565cd46d2
refs/heads/master
2020-04-06T04:40:53.955070
2015-04-02T12:22:30
2015-04-02T12:22:30
33,860,735
0
0
null
2015-04-13T09:52:14
2015-04-13T09:52:11
null
UTF-8
Java
false
false
2,957
java
package org.ripple.bouncycastle.asn1.ua; import org.ripple.bouncycastle.asn1.ASN1EncodableVector; import org.ripple.bouncycastle.asn1.ASN1Object; import org.ripple.bouncycastle.asn1.ASN1ObjectIdentifier; import org.ripple.bouncycastle.asn1.ASN1OctetString; import org.ripple.bouncycastle.asn1.ASN1Primitive; import org.ripple.bouncycastle.asn1.ASN1Sequence; import org.ripple.bouncycastle.asn1.DEROctetString; import org.ripple.bouncycastle.asn1.DERSequence; public class DSTU4145Params extends ASN1Object { private static final byte DEFAULT_DKE[] = { (byte) 0xa9, (byte) 0xd6, (byte) 0xeb, 0x45, (byte) 0xf1, 0x3c, 0x70, (byte) 0x82, (byte) 0x80, (byte) 0xc4, (byte) 0x96, 0x7b, 0x23, 0x1f, 0x5e, (byte) 0xad, (byte) 0xf6, 0x58, (byte) 0xeb, (byte) 0xa4, (byte) 0xc0, 0x37, 0x29, 0x1d, 0x38, (byte) 0xd9, 0x6b, (byte) 0xf0, 0x25, (byte) 0xca, 0x4e, 0x17, (byte) 0xf8, (byte) 0xe9, 0x72, 0x0d, (byte) 0xc6, 0x15, (byte) 0xb4, 0x3a, 0x28, (byte) 0x97, 0x5f, 0x0b, (byte) 0xc1, (byte) 0xde, (byte) 0xa3, 0x64, 0x38, (byte) 0xb5, 0x64, (byte) 0xea, 0x2c, 0x17, (byte) 0x9f, (byte) 0xd0, 0x12, 0x3e, 0x6d, (byte) 0xb8, (byte) 0xfa, (byte) 0xc5, 0x79, 0x04 }; private ASN1ObjectIdentifier namedCurve; private DSTU4145ECBinary ecbinary; private byte[] dke = DEFAULT_DKE; public DSTU4145Params(ASN1ObjectIdentifier namedCurve) { this.namedCurve = namedCurve; } public DSTU4145Params(DSTU4145ECBinary ecbinary) { this.ecbinary = ecbinary; } public boolean isNamedCurve() { return namedCurve != null; } public DSTU4145ECBinary getECBinary() { return ecbinary; } public byte[] getDKE() { return dke; } public static byte[] getDefaultDKE() { return DEFAULT_DKE; } public ASN1ObjectIdentifier getNamedCurve() { return namedCurve; } public static DSTU4145Params getInstance(Object obj) { if (obj instanceof DSTU4145Params) { return (DSTU4145Params) obj; } if (obj != null) { ASN1Sequence seq = ASN1Sequence.getInstance(obj); DSTU4145Params params; if (seq.getObjectAt(0) instanceof ASN1ObjectIdentifier) { params = new DSTU4145Params( ASN1ObjectIdentifier.getInstance(seq.getObjectAt(0))); } else { params = new DSTU4145Params(DSTU4145ECBinary.getInstance(seq .getObjectAt(0))); } if (seq.size() == 2) { params.dke = ASN1OctetString.getInstance(seq.getObjectAt(1)) .getOctets(); if (params.dke.length != DSTU4145Params.DEFAULT_DKE.length) { throw new IllegalArgumentException("object parse error"); } } return params; } throw new IllegalArgumentException("object parse error"); } public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); if (namedCurve != null) { v.add(namedCurve); } else { v.add(ecbinary); } if (!org.ripple.bouncycastle.util.Arrays.areEqual(dke, DEFAULT_DKE)) { v.add(new DEROctetString(dke)); } return new DERSequence(v); } }
[ "longwind2012@hotmail.com" ]
longwind2012@hotmail.com
6ac3b68aeb141de8bcab82782e60da5f3bf49333
7342e9d64cc5c816f4e3652cbf9569e58c0650d9
/SeatAccommodationService/src/ua/be/dc/services/seatAccommodation/db/service/test/DBSeatTypeServiceTest.java
5ac9d58593622470b61f6c436f647198920f3f6f
[]
no_license
sauloperez/distributed-computing
0e5cda636017d3162655af9ef844d10564cf90bd
31efb6b9089cedd8435be0a6f81e5eee3c3f4167
refs/heads/master
2020-06-07T06:43:22.662434
2013-06-20T16:33:12
2013-06-20T16:33:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,046
java
package ua.be.dc.services.seatAccommodation.db.service.test; import java.util.List; import org.junit.AfterClass; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; import ua.be.dc.services.seatAccommodation.db.service.IDBSeatTypeService; import ua.be.dc.services.seatAccommodation.db.service.exception.DBServiceException; import ua.be.dc.services.seatAccommodation.db.service.impl.DBSeatTypeServiceImpl; import ua.be.dc.services.seatAccommodation.models.SeatType; public class DBSeatTypeServiceTest { private static IDBSeatTypeService dbSeatTypeService; @BeforeClass public static void setup() { dbSeatTypeService = new DBSeatTypeServiceImpl(); } @AfterClass public static void teardown() { dbSeatTypeService = null; } @Test public void testGetById() { SeatType seatType = dbSeatTypeService.getById(1); Assert.assertNotNull(seatType); System.out.println(seatType); } @Test public void testGetByInvalidId() { SeatType seatType = dbSeatTypeService.getById(-1); Assert.assertNull(seatType); } @Test public void testGetAll() { List<SeatType> seatTypes = dbSeatTypeService.getAll(); Assert.assertNotNull(seatTypes); for (SeatType seatType : seatTypes) { System.out.println(seatType); } } @Test public void testInsert() { try { SeatType seatType = new SeatType(); seatType.setName("SeatType name " + System.currentTimeMillis()); dbSeatTypeService.insert(seatType); Assert.assertTrue(seatType.getId() != 0); SeatType createdSeatType = dbSeatTypeService.getById(seatType.getId()); Assert.assertNotNull(createdSeatType); Assert.assertEquals(seatType.getName(), createdSeatType.getName()); } catch (DBServiceException e) { e.printStackTrace(); } } @Test(expected = DBServiceException.class) public void testInserByInvalidSeatType() throws DBServiceException { dbSeatTypeService.insert(new SeatType()); } @Test public void testUpdate() { try { long timestamp = System.currentTimeMillis(); SeatType seatType = dbSeatTypeService.getById(2); seatType.setName("Test name " + timestamp); dbSeatTypeService.update(seatType); SeatType updatedSeatType = dbSeatTypeService.getById(2); Assert.assertEquals(seatType.getName(), updatedSeatType.getName()); } catch (DBServiceException e) { e.printStackTrace(); } } @Test(expected = DBServiceException.class) public void testUpdateByInvalidSeatType() throws DBServiceException { dbSeatTypeService.update(new SeatType()); } @Test public void testDelete() { try { int seatTypeId = 5; SeatType seatType = dbSeatTypeService.getById(seatTypeId); dbSeatTypeService.deleteById(seatType.getId()); SeatType deletedSeatType = dbSeatTypeService.getById(seatTypeId); Assert.assertNull(deletedSeatType); } catch (DBServiceException e) { e.printStackTrace(); } } @Test(expected = DBServiceException.class) public void testDeleteByInvalidId() throws DBServiceException { dbSeatTypeService.deleteById(-1); } }
[ "saulopefa@gmail.com" ]
saulopefa@gmail.com
532dff6908625c90a9f18aedf7db8edfe206d366
2cb9b3b6e0ed58ccb6a84afdd174c629d101c553
/src/spring-mvc3-jdo-blog/src/main/java/com/truward/jdoblog/services/service/BlogService.java
66472f1dea3362f8361d42d5178e8f9f0c701536
[]
no_license
avshabanov/examples
6d2ee2247cf597de3e2d8b1d040155579561357f
98915b67d18f7129c0efefe585d9030470ddd904
refs/heads/master
2021-06-13T16:41:34.681605
2021-03-14T07:48:38
2021-03-14T07:48:38
1,865,187
1
6
null
2021-02-21T02:46:19
2011-06-08T12:48:26
Java
UTF-8
Java
false
false
8,181
java
package com.truward.jdoblog.services.service; import com.truward.jdoblog.services.domain.Account; import com.truward.jdoblog.services.domain.BlogComment; import com.truward.jdoblog.services.domain.BlogPost; import com.truward.jdoblog.services.domain.Role; import com.truward.jdoblog.services.traits.AccountDataId; import org.springframework.dao.DataRetrievalFailureException; import org.springframework.orm.jdo.JdoCallback; import org.springframework.orm.jdo.support.JdoDaoSupport; import javax.jdo.JDOException; import javax.jdo.PersistenceManager; import java.util.Collection; import java.util.Date; import java.util.HashMap; import java.util.Map; /** * All in one: Dao and Service, no interfaces (bad practice, don't do it in production) */ public class BlogService extends JdoDaoSupport { public Collection<Account> getAccounts() { return getJdoTemplate().find(Account.class, null, "created ascending"); } public Account getAccountById(long accountId) { return getJdoTemplate().getObjectById(Account.class, accountId); } public Account getAccountByName(String displayName) { Collection<Account> accounts = getJdoTemplate().find(Account.class, "displayName == givenDisplayName", "String givenDisplayName", displayName); if (accounts.size() != 1) { throw new DataRetrievalFailureException("No or multiple accounts with the name given"); } return accounts.iterator().next(); } /** * Gets roles ordered by their names * @return Roles collection */ public Collection<Role> getRoles() { return getJdoTemplate().find(Role.class, null, "name ascending"); } public void updateAccountData(long accountId, final Map<AccountDataId, ?> accountData) { final Account account = getJdoTemplate().getObjectById(Account.class, accountId); getJdoTemplate().execute(new JdoCallback<Object>() { public Object doInJdo(PersistenceManager pm) throws JDOException { if (accountData.containsKey(AccountDataId.DISPLAY_NAME)) { account.setDisplayName((String) accountData.get(AccountDataId.DISPLAY_NAME)); } if (accountData.containsKey(AccountDataId.AVATAR_URL)) { account.setAvatarUrl((String) accountData.get(AccountDataId.AVATAR_URL)); } return null; } }); } public Collection<BlogPost> getBlogPosts() { return getJdoTemplate().find(BlogPost.class, null, "created ascending"); } public void saveAccount(String displayName, String avatarUrl) { final Account account = new Account(); account.setDisplayName(displayName); account.setAvatarUrl(avatarUrl); account.setCreated(new Date()); getJdoTemplate().makePersistent(account); } public void deleteAccount(long accountId) { final Account account = getAccountById(accountId); getJdoTemplate().deletePersistent(account); } public void saveBlogPost(long authorId, String title, String content) { final Account author = getJdoTemplate().getObjectById(Account.class, authorId); final BlogPost post = new BlogPost(); post.setTitle(title); post.setContent(content); post.setCreated(new Date()); post.setAuthor(author); post.setUpdated(null); author.getPosts().add(post); getJdoTemplate().makePersistent(post); } public void saveComment(long parentPostId, long authorId, Long parentCommentId, String content) { final BlogPost parentPost = getJdoTemplate().getObjectById(BlogPost.class, parentPostId); final Account author = getJdoTemplate().getObjectById(Account.class, authorId); final BlogComment comment = new BlogComment(); comment.setAuthor(author); comment.setParentPost(parentPost); comment.setContent(content); comment.setCreated(new Date()); getJdoTemplate().makePersistent(comment); if (parentCommentId != null) { // bind to the parent comment final BlogComment parentComment = getJdoTemplate().getObjectById(BlogComment.class, parentCommentId); getJdoTemplate().execute(new JdoCallback<Object>() { public Object doInJdo(PersistenceManager pm) throws JDOException { parentComment.getChildComments().add(comment); comment.setParentComment(parentComment); return null; } }); } else { // this comment is a direct reply to the post getJdoTemplate().execute(new JdoCallback<Object>() { public Object doInJdo(PersistenceManager pm) throws JDOException { parentPost.getChildComments().add(comment); return null; } }); } } public BlogComment getComment(String content) { Collection<BlogComment> comments = getJdoTemplate().find(BlogComment.class, "content == givenComment", "String givenComment", content); if (comments.size() != 1) { throw new DataRetrievalFailureException("No such comment or more than one comment"); } return comments.iterator().next(); } /** * Gets the child comments that belongs to the given parent comment * @param parentComment Comment that is parent to the returned ones * @return Child comments */ public Collection<BlogComment> getComments(BlogComment parentComment) { final Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("givenParentComment", parentComment); return getJdoTemplate().find(BlogComment.class, "parentComment == givenParentComment", "BlogComment givenParentComment", parameters, "created ascending"); } public Collection<BlogComment> getComments(BlogPost parentPost) { final Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("givenParentPost", parentPost); return getJdoTemplate().find(BlogComment.class, "givenParentPost.childComments.contains(this)", "BlogPost givenParentPost", parameters, "created ascending"); } public Collection<BlogComment> getComments() { return getJdoTemplate().find(BlogComment.class); } public void deleteComment(long commentId) { final BlogComment comment = getJdoTemplate().getObjectById(BlogComment.class, commentId); getJdoTemplate().deletePersistent(comment); } public Collection<Role> getAccountRoles(long accountId) { final Account account = getJdoTemplate().getObjectById(Account.class, accountId); final Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("givenAccount", account); return getJdoTemplate().find(Role.class, "givenAccount.roles.contains(this)", "Account givenAccount", parameters, "name ascending"); } public void saveRole(String name) { final Role role = new Role(); role.setName(name); getJdoTemplate().makePersistent(role); } public void deleteRole(long roleId) { final Role role = getJdoTemplate().getObjectById(Role.class, roleId); getJdoTemplate().deletePersistent(role); } public void addAccountRole(long accountId, long roleId) { final Account account = getJdoTemplate().getObjectById(Account.class, accountId); final Role role = getJdoTemplate().getObjectById(Role.class, roleId); getJdoTemplate().execute(new JdoCallback<Object>() { public Object doInJdo(PersistenceManager pm) throws JDOException { account.getRoles().add(role); //role.getAssignees().add(account); return null; } }); } }
[ "avshabanov@gmail.com" ]
avshabanov@gmail.com
20b807324eda831b945e927a523854f6a3ebf041
bc639d15bcc35b6e58f97ca02bee2dc66eba894b
/src/com/vmware/vim25/ClusterConfigInfoEx.java
a106acf44c27539e2ebbb841b7fc86634125132d
[ "BSD-3-Clause" ]
permissive
benn-cs/vijava
db473c46f1a4f449e52611055781f9cfa921c647
14fd6b5d2f1407bc981b3c56433c30a33e8d74ab
refs/heads/master
2021-01-19T08:15:17.194988
2013-07-11T05:17:08
2013-07-11T05:17:08
7,495,841
1
0
null
null
null
null
UTF-8
Java
false
false
3,612
java
/*================================================================================ Copyright (c) 2012 Steve Jin. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of VMware, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. 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 com.vmware.vim25; /** * @author Steve Jin (http://www.doublecloud.org) * @version 5.1 */ @SuppressWarnings("all") public class ClusterConfigInfoEx extends ComputeResourceConfigInfo { public ClusterDasConfigInfo dasConfig; public ClusterDasVmConfigInfo[] dasVmConfig; public ClusterDrsConfigInfo drsConfig; public ClusterDrsVmConfigInfo[] drsVmConfig; public ClusterRuleInfo[] rule; public ClusterDpmConfigInfo dpmConfigInfo; public ClusterDpmHostConfigInfo[] dpmHostConfig; public ClusterGroupInfo[] group; public ClusterDasConfigInfo getDasConfig() { return this.dasConfig; } public ClusterDasVmConfigInfo[] getDasVmConfig() { return this.dasVmConfig; } public ClusterDrsConfigInfo getDrsConfig() { return this.drsConfig; } public ClusterDrsVmConfigInfo[] getDrsVmConfig() { return this.drsVmConfig; } public ClusterRuleInfo[] getRule() { return this.rule; } public ClusterDpmConfigInfo getDpmConfigInfo() { return this.dpmConfigInfo; } public ClusterDpmHostConfigInfo[] getDpmHostConfig() { return this.dpmHostConfig; } public ClusterGroupInfo[] getGroup() { return this.group; } public void setDasConfig(ClusterDasConfigInfo dasConfig) { this.dasConfig=dasConfig; } public void setDasVmConfig(ClusterDasVmConfigInfo[] dasVmConfig) { this.dasVmConfig=dasVmConfig; } public void setDrsConfig(ClusterDrsConfigInfo drsConfig) { this.drsConfig=drsConfig; } public void setDrsVmConfig(ClusterDrsVmConfigInfo[] drsVmConfig) { this.drsVmConfig=drsVmConfig; } public void setRule(ClusterRuleInfo[] rule) { this.rule=rule; } public void setDpmConfigInfo(ClusterDpmConfigInfo dpmConfigInfo) { this.dpmConfigInfo=dpmConfigInfo; } public void setDpmHostConfig(ClusterDpmHostConfigInfo[] dpmHostConfig) { this.dpmHostConfig=dpmHostConfig; } public void setGroup(ClusterGroupInfo[] group) { this.group=group; } }
[ "sjin2008@3374d856-466b-4dc9-8cc5-e1e8506a9ea1" ]
sjin2008@3374d856-466b-4dc9-8cc5-e1e8506a9ea1
0bc2785b3c7de6e54d256790a270917a57de6f72
8861d5a6ed129350db0ac5ddb8a402df88a76e3b
/plugin/org.seasar.kvasir.page.search/src/main/java/org/seasar/kvasir/page/search/impl/PositionRecorderImpl.java
e67c2c5fe15f22c9a58b573505994928bab78cb5
[]
no_license
seasarorg/test-kvasir-package-1
01a8726126a20124eb9678e09a413641af0ee3f4
99595d1da154c924acdb8e0821e84f4293f76ff5
refs/heads/master
2016-09-03T07:28:21.262021
2013-10-09T04:08:41
2013-10-09T04:08:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
916
java
package org.seasar.kvasir.page.search.impl; import java.util.SortedMap; import java.util.TreeMap; import org.seasar.kvasir.page.search.PositionRecorder; public class PositionRecorderImpl implements PositionRecorder { private SortedMap<Integer, Integer> cookedRawMap_ = new TreeMap<Integer, Integer>(); public PositionRecorderImpl() { cookedRawMap_.put(0, 0); } public int getRawPosition(int cookedPositon) { SortedMap<Integer, Integer> map = cookedRawMap_.subMap(0, cookedPositon + 1); int nearestCookedPosition = map.lastKey(); int nearestRawPosition = map.get(nearestCookedPosition); return nearestRawPosition + (cookedPositon - nearestCookedPosition); } public void record(int cookedPosition, int rawPosition) { cookedRawMap_.put(cookedPosition, rawPosition); } }
[ "skirnir@gmail.com" ]
skirnir@gmail.com
92148a923965a2965678b1d0afc0948013abc4cb
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/29/29_f9f2d6547792c37615e00dbc6fed2ea0f8110b58/PipelineNamedReplyQueuesJmsTests/29_f9f2d6547792c37615e00dbc6fed2ea0f8110b58_PipelineNamedReplyQueuesJmsTests_t.java
4045c28e4ba8e14e81d4002958bede78ae128c36
[]
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
6,933
java
/* * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.integration.jms.request_reply; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executor; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import org.junit.Test; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.integration.MessageTimeoutException; import org.springframework.integration.gateway.RequestReplyExchanger; import org.springframework.integration.jms.config.ActiveMqTestUtils; import org.springframework.integration.message.GenericMessage; /** * @author Oleg Zhurakousky * @author Gary Russell * @author Artem Bilan */ public class PipelineNamedReplyQueuesJmsTests { private final Executor executor = Executors.newFixedThreadPool(30); int requests = 50; /** * jms:out(reply-destination-name="pipeline01-01") -> jms:in -> randomTimeoutProcess -> * jms:out -> jms:in */ @Test public void testPipeline1() throws Exception{ this.test("pipeline-named-queue-01.xml"); } /** * jms:out(reply-destination-name="pipeline02-01") -> jms:in -> randomTimeoutProcess -> * jms:out(reply-destination-name="pipeline02-02") -> jms:in -> * jms:out(reply-destination-name="pipeline02-03") -> jms:in */ @Test public void testPipeline2() throws Exception{ this.test("pipeline-named-queue-02.xml"); } /** * Same as {@link #testPipeline2()} except all gateways use the same reply queue. * and zero failures expected (no timeouts on server). * jms:out(reply-destination-name="pipeline02a-01") -> jms:in -> zeroTimeoutProcess -> * jms:out(reply-destination-name="pipeline02a-01") -> jms:in -> * jms:out(reply-destination-name="pipeline02a-01") -> jms:in */ @Test public void testPipeline2a() throws Exception{ int timeouts = this.test("pipeline-named-queue-02a.xml"); assertEquals(0, timeouts); } /** * jms:out(reply-destination-name="pipeline03-01", correlation-key="JMSCorrelationID") -> jms:in -> randomTimeoutProcess -> * jms:out(reply-destination-name="pipeline03-02") -> jms:in -> * jms:out(reply-destination-name="pipeline03-03") -> jms:in */ @Test public void testPipeline3() throws Exception{ this.test("pipeline-named-queue-03.xml"); } /** * Same as {@link #testPipeline3()} except all gateways use the same reply queue. * Ensures the correlation id is not propagated. No timeouts expected. * jms:out(reply-destination-name="pipeline03a-01", correlation-key="JMSCorrelationID") -> jms:in -> zeroTimeoutProcess -> * jms:out(reply-destination-name="pipeline03a-01") -> jms:in -> * jms:out(reply-destination-name="pipeline03a-01") -> jms:in * Ensures reply came from service after third gateway */ @Test public void testPipeline3a() throws Exception{ int timeouts = this.test("pipeline-named-queue-03a.xml", 20000); assertEquals(0, timeouts); } /** * jms:out(reply-destination-name="pipeline04-01", correlation-key="foo") -> jms:in(correlation-key="foo") -> randomTimeoutProcess -> * jms:out(reply-destination-name="pipeline04-02") -> jms:in */ @Test public void testPipeline4() throws Exception{ this.test("pipeline-named-queue-04.xml"); } /** * jms:out(reply-destination-name="pipeline05-01", correlation-key="foo") -> jms:in(correlation-key="foo") -> randomTimeoutProcess -> * jms:out(reply-destination-name="pipeline05-02", correlation-key="JMSCorrelationID") -> jms:in */ @Test public void testPipeline5() throws Exception{ this.test("pipeline-named-queue-05.xml"); } /** * jms:out(reply-destination-name="pipeline06-01", correlation-key="JMSCorrelationID") -> jms:in -> randomTimeoutProcess -> * jms:out(reply-destination-name="pipeline06-02", correlation-key="foo") -> jms:in(correlation-key="foo") */ @Test public void testPipeline6() throws Exception{ this.test("pipeline-named-queue-06.xml"); } /** * jms:out(reply-destination-name="pipeline07-01", correlation-key="JMSCorrelationID") -> jms:in -> randomTimeoutProcess -> * jms:out(reply-destination-name="pipeline07-02", correlation-key="foo") -> jms:in(correlation-key="foo") */ @Test public void testPipeline7() throws Exception{ this.test("pipeline-named-queue-07.xml"); } public int test(String contextConfig) throws Exception { return test(contextConfig, 0); } public int test(String contextConfig, final int offset) throws Exception { ActiveMqTestUtils.prepare(); ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(contextConfig, this.getClass()); final AtomicInteger successCounter = new AtomicInteger(); final AtomicInteger timeoutCounter = new AtomicInteger(); final AtomicInteger failureCounter = new AtomicInteger(); try { final RequestReplyExchanger gateway = context.getBean(RequestReplyExchanger.class); final CountDownLatch latch = new CountDownLatch(requests); for (int i = 0; i < requests; i++) { final int y = i; executor.execute(new Runnable() { public void run() { try { assertEquals(y + offset, gateway.exchange(new GenericMessage<Integer>(y)).getPayload()); successCounter.incrementAndGet(); } catch (MessageTimeoutException e) { timeoutCounter.incrementAndGet(); } catch (Throwable t) { t.printStackTrace(); failureCounter.incrementAndGet(); } finally { latch.countDown(); } } }); } assertTrue(latch.await(60, TimeUnit.SECONDS)); // technically all we care that its > 0, // but reality of this test it has to be something more then 0 assertTrue(successCounter.get() > 10); assertEquals(0, failureCounter.get()); assertEquals(requests, successCounter.get() + timeoutCounter.get()); return timeoutCounter.get(); } finally { System.out.println(contextConfig); System.out.println("Success: " + successCounter.get()); System.out.println("Timeout: " + timeoutCounter.get()); System.out.println("Failure: " + failureCounter.get()); context.destroy(); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
23855039cf48a22c59797712dad031d9a18f34cb
872c26c7040df1c5b1a0c1a9925a1e51d2a229ec
/GuideView/app/src/main/java/com/demo/aty/FragActivity.java
536e38f9b8d1d27644b3ff9504e1671dfa80d2d9
[ "Apache-2.0" ]
permissive
ranshao0121/AndroidCode
558fc898015f3b2a2cbe92c1442d2a99cd0c9955
e7cbb5d3491b6a836838eddb9f7eb47ca70514aa
refs/heads/master
2020-09-08T12:52:27.142900
2019-10-08T03:00:01
2019-10-08T03:00:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
788
java
package com.demo.aty; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import com.demo.guide.R; //遮罩整个fragment public class FragActivity extends FragmentActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_frag); switch (getIntent().getIntExtra("fragmentId", -1)) { case 0: getSupportFragmentManager().beginTransaction().add(R.id.frame, new MyFragment()).commit(); break; case 1: getSupportFragmentManager().beginTransaction().add(R.id.frame, new MyFragment2()).commit(); break; default: getSupportFragmentManager().beginTransaction().add(R.id.frame, new MyFragment()).commit(); } } }
[ "420209677@qq.com" ]
420209677@qq.com
55c20f58a927db263b60f806928beab348e5d953
68fe819ee972381a6fbb85c1c37743d1f4f44836
/src/ch/eiafr/gmd/MainPanel.java
cff2c8365dde31cc22c9b6cb253e567aeba8f2d7
[]
no_license
wichtounet/GraphMyData
8c8ce4181f93c45a0597a22e02de96ef87a5216a
dc8d7d1ab1ffa66aa728ee9c11d6edfed49685fe
refs/heads/master
2016-09-05T16:38:03.908649
2010-12-22T11:43:11
2010-12-22T11:43:11
1,053,774
0
0
null
null
null
null
UTF-8
Java
false
false
2,691
java
package ch.eiafr.gmd; import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.SwingUtilities; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; public final class MainPanel extends JPanel implements StatsListener { public MainPanel(Stats stats, StatsController controller) { super(new GridBagLayout()); build(stats, controller); } private void build(Stats stats, StatsController controller) { GridBagConstraints constraints = new GridBagConstraints(); constraints.gridx = 1; constraints.gridy = 1; constraints.gridheight = GridBagConstraints.REMAINDER; constraints.gridwidth = 1; constraints.fill = GridBagConstraints.VERTICAL; constraints.insets = new Insets(25, 10, 10, 10); constraints.weighty = 1.0; constraints.weightx = 0.0; add(new DataView(stats, controller), constraints); constraints.fill = GridBagConstraints.HORIZONTAL; constraints.gridx = 2; constraints.gridy = 1; constraints.gridheight = 1; constraints.gridwidth = GridBagConstraints.REMAINDER; constraints.insets = new Insets(25, 0, 0, 0); constraints.weighty = 0.0; constraints.weightx = 1.0; TextView textView = new TextView(stats); stats.addStatsListener(textView); add(textView, constraints); constraints.fill = GridBagConstraints.BOTH; constraints.insets = new Insets(10, 0, 0, 0); constraints.gridx = 2; constraints.gridy = 2; constraints.gridheight = 1; constraints.gridheight = GridBagConstraints.RELATIVE; constraints.gridwidth = GridBagConstraints.REMAINDER; constraints.weighty = 0.5; constraints.weightx = 1.0; PieChartView pieChartView = new PieChartView(stats); stats.addStatsListener(pieChartView); add(pieChartView, constraints); constraints.gridx = 2; constraints.gridy = 3; constraints.gridheight = GridBagConstraints.REMAINDER; constraints.gridwidth = GridBagConstraints.REMAINDER; constraints.insets = new Insets(10, 10, 10, 10); HistogramView histogramView = new HistogramView(stats); stats.addStatsListener(histogramView); JScrollPane scroll = new JScrollPane(histogramView); scroll.setBorder(BorderFactory.createEmptyBorder()); add(scroll, constraints); stats.addStatsListener(this); } @Override public void fireStatsModified() { SwingUtilities.updateComponentTreeUI(this); } }
[ "baptistewicht@gmail.com" ]
baptistewicht@gmail.com
26be5190eb9c6f2f445f520abb1497078b730787
5786b8c28f069ae9b9b7f850edf4d4c1b5cf976c
/languages/CSharp/source_gen/CSharp/textGen/Member_initializer_block_1_1_1_TextGen.java
0d34dee765e5497908b7733f7fb11bf6b6ba285d
[ "Apache-2.0" ]
permissive
vaclav/MPS_CSharp
681ea277dae2e7503cd0f2d21cb3bb7084f6dffc
deea11bfe3711dd241d9ca3f007b810d574bae76
refs/heads/master
2021-01-13T14:36:41.949662
2019-12-03T15:26:21
2019-12-03T15:26:21
72,849,927
19
5
null
null
null
null
UTF-8
Java
false
false
962
java
package CSharp.textGen; /*Generated by MPS */ import jetbrains.mps.text.rt.TextGenDescriptorBase; import jetbrains.mps.text.rt.TextGenContext; import jetbrains.mps.text.impl.TextGenSupport; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; public class Member_initializer_block_1_1_1_TextGen extends TextGenDescriptorBase { @Override public void generateText(final TextGenContext ctx) { final TextGenSupport tgs = new TextGenSupport(ctx); if (SLinkOperations.getTarget(ctx.getPrimaryInput(), MetaAdapterFactory.getContainmentLink(0x5f522167449a4486L, 0x94654f30de6e5cecL, 0x70aadf795f705fL, 0x70aadf795f7374L, "Identifier_1")) != null) { tgs.appendNode(SLinkOperations.getTarget(ctx.getPrimaryInput(), MetaAdapterFactory.getContainmentLink(0x5f522167449a4486L, 0x94654f30de6e5cecL, 0x70aadf795f705fL, 0x70aadf795f7374L, "Identifier_1"))); } } }
[ "vaclav.pech@gmail.com" ]
vaclav.pech@gmail.com
61f8956ce355b847546d1513010bde19c6a6cfd9
c885ef92397be9d54b87741f01557f61d3f794f3
/tests-without-trycatch/Jsoup-92/org.jsoup.parser.ParseSettings/BBC-F0-opt-20/1/org/jsoup/parser/ParseSettings_ESTest.java
861b320f1573d3f588f16d07c804742abb652c41
[ "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
4,552
java
/* * This file was automatically generated by EvoSuite * Wed Oct 13 20:30:15 GMT 2021 */ package org.jsoup.parser; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.jsoup.nodes.Attributes; import org.jsoup.parser.ParseSettings; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) public class ParseSettings_ESTest extends ParseSettings_ESTest_scaffolding { @Test(timeout = 4000) public void test00() throws Throwable { ParseSettings parseSettings0 = ParseSettings.preserveCase; boolean boolean0 = parseSettings0.preserveTagCase(); assertTrue(boolean0); } @Test(timeout = 4000) public void test01() throws Throwable { ParseSettings parseSettings0 = ParseSettings.preserveCase; Attributes attributes0 = parseSettings0.normalizeAttributes((Attributes) null); assertNull(attributes0); } @Test(timeout = 4000) public void test02() throws Throwable { ParseSettings parseSettings0 = ParseSettings.preserveCase; Attributes attributes0 = new Attributes(); attributes0.put("", ""); Attributes attributes1 = parseSettings0.normalizeAttributes(attributes0); assertEquals(1, attributes1.size()); } @Test(timeout = 4000) public void test03() throws Throwable { ParseSettings parseSettings0 = ParseSettings.preserveCase; // Undeclared exception! // try { parseSettings0.normalizeTag((String) null); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("org.jsoup.parser.ParseSettings", e); // } } @Test(timeout = 4000) public void test04() throws Throwable { ParseSettings parseSettings0 = new ParseSettings(false, false); // Undeclared exception! // try { parseSettings0.normalizeAttributes((Attributes) null); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("org.jsoup.parser.ParseSettings", e); // } } @Test(timeout = 4000) public void test05() throws Throwable { ParseSettings parseSettings0 = ParseSettings.htmlDefault; // Undeclared exception! // try { parseSettings0.normalizeAttribute((String) null); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("org.jsoup.parser.ParseSettings", e); // } } @Test(timeout = 4000) public void test06() throws Throwable { ParseSettings parseSettings0 = new ParseSettings(false, false); Attributes attributes0 = new Attributes(); parseSettings0.preserveCase.normalizeAttributes(attributes0); } @Test(timeout = 4000) public void test07() throws Throwable { ParseSettings parseSettings0 = new ParseSettings(false, false); parseSettings0.htmlDefault.normalizeAttribute(" />"); assertFalse(parseSettings0.preserveTagCase()); } @Test(timeout = 4000) public void test08() throws Throwable { ParseSettings parseSettings0 = new ParseSettings(false, true); parseSettings0.normalizeAttribute(""); assertFalse(parseSettings0.preserveTagCase()); } @Test(timeout = 4000) public void test09() throws Throwable { ParseSettings parseSettings0 = new ParseSettings(false, true); parseSettings0.preserveCase.normalizeTag(""); assertFalse(parseSettings0.preserveTagCase()); } @Test(timeout = 4000) public void test10() throws Throwable { ParseSettings parseSettings0 = new ParseSettings(false, false); String string0 = parseSettings0.normalizeTag("2*vZ\u0006\\;v7%<A"); assertEquals("2*vz\u0006\\;v7%<a", string0); } @Test(timeout = 4000) public void test11() throws Throwable { ParseSettings parseSettings0 = ParseSettings.htmlDefault; boolean boolean0 = parseSettings0.preserveTagCase(); assertFalse(boolean0); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
afaaaf42db05976e68a6f40085e256b92bc79e84
5cfaeebdc7c50ca23ee368fa372d48ed1452dfeb
/xd-course-2b/src/main/java/com/xiaodou/course/web/response/product/UserProductOrderResponse.java
854a8b36f2ca077c32d5399bf0e5f2f317901fce
[]
no_license
zdhuangelephant/xd_pro
c8c8ff6dfcfb55aead733884909527389e2c8283
5611b036968edfff0b0b4f04f0c36968333b2c3b
refs/heads/master
2022-12-23T16:57:28.306580
2019-12-05T06:05:43
2019-12-05T06:05:43
226,020,526
0
2
null
2022-12-16T02:23:20
2019-12-05T05:06:27
JavaScript
UTF-8
Java
false
false
639
java
package com.xiaodou.course.web.response.product; import com.xiaodou.course.web.response.BaseResponse; import com.xiaodou.course.web.response.resultType.ProductResType; import com.xiaodou.summer.vo.out.ResultType; import com.xiaodou.ucerCenter.agent.response.resultype.UcenterResType; public class UserProductOrderResponse extends BaseResponse { public UserProductOrderResponse(ResultType resultType) { super(resultType); } public UserProductOrderResponse(ProductResType resultType) { super(resultType); } public UserProductOrderResponse(UcenterResType resultType) { super(resultType); } }
[ "zedong.huang@bitmain.com" ]
zedong.huang@bitmain.com
df41147c62002380d09e8799348b742c9e4ace41
8f260ee35a71bc21b714dec05be67354236075f2
/ddd-alone-3/src/main/java/io/github/wotjd243/pokemon/trainer/domain/TrainerRepository.java
a205aff76270c20dd53b6932921ff9f98f786c14
[ "MIT" ]
permissive
ccf05017/fastcampus.ddd-alone
48ec79279379214e019a1f868f6d87461785cf11
80978c1b0e3b3f42c610f0b3b3342dd336302f68
refs/heads/master
2020-12-14T19:04:24.031669
2020-01-19T16:01:23
2020-01-19T16:01:23
234,842,829
0
0
MIT
2020-01-19T04:58:56
2020-01-19T04:58:56
null
UTF-8
Java
false
false
327
java
package io.github.wotjd243.pokemon.trainer.domain; import org.springframework.data.jpa.repository.JpaRepository; // Data JPA는 굉장히 자연스럽게 이미 DPI를 실현시키고 있다. (인프라가 도메인에 의존하는 형태 형성) public interface TrainerRepository extends JpaRepository<Trainer, String> { }
[ "saul@BcTech-Saului-MacBookPro.local" ]
saul@BcTech-Saului-MacBookPro.local
1267f2ba1dd9a933e06cf508c746c6aa45f987ab
e75be673baeeddee986ece49ef6e1c718a8e7a5d
/submissions/blizzard/Corpus/eclipse.jdt.core/1895.java
e141fde4680cc8928c4249885c8179c319d0ca26
[ "MIT" ]
permissive
zhendong2050/fse18
edbea132be9122b57e272a20c20fae2bb949e63e
f0f016140489961c9e3c2e837577f698c2d4cf44
refs/heads/master
2020-12-21T11:31:53.800358
2018-07-23T10:10:57
2018-07-23T10:10:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
147
java
package test0173; import java.util.*; public class Test { int foo() { int i = 0; i++; return i; } }
[ "tim.menzies@gmail.com" ]
tim.menzies@gmail.com
530cd12b6ba92d54c42b34d08dea90c5596eff4d
e88215712898c8faad7aa4b7b7278cbb3a47e162
/src/com/eoulu/controller/NormalizeServlet.java
72aaf4474d771a73a2b5247e1ba970e7a833b10c
[]
no_license
LGDHuaOPER/HuaFEEng_Goose
f482fff96aaf8d1910b3ee11a181d8423c276b9b
318ca4377a0d37c9dcebb925456591ddf264e23d
refs/heads/master
2020-03-27T23:12:46.256068
2018-09-29T10:13:27
2018-09-29T10:13:27
147,301,655
2
1
null
null
null
null
UTF-8
Java
false
false
1,330
java
package com.eoulu.controller; import java.io.IOException; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.eoulu.service.QuoteSystemService; import com.eoulu.service.impl.QuoteSystemServiceImpl; import com.eoulu.service.impl.QuotesServiceImpl; import com.google.gson.Gson; @WebServlet("/Normalize") public class NormalizeServlet extends HttpServlet{ private static final long serialVersionUID = 1L; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { super.doGet(req, resp); } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { long beginTime = System.currentTimeMillis(); String[] modelList = req.getParameterValues("ModelList[]"); QuoteSystemService service = new QuoteSystemServiceImpl(); Map<String, String[]> resultMap = service.getRaderByNames(modelList); long endTime = System.currentTimeMillis(); long costTime = endTime - beginTime; System.out.println("花费时间为:"+costTime); resp.getWriter().write(new Gson().toJson(resultMap)); } }
[ "LGD_HuaOPER@gmail.com" ]
LGD_HuaOPER@gmail.com