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
6a30c4dfb70d5f1b05b1a79cdb5023449cae0bf2
d3d9d9a5ee5bd269acda6d51d494dfdb6fc30802
/app/src/main/java/com/ddm/live/presenter/GetNewVersionInfoPresenter.java
708ab254742460dab61b26fae486964d088d4545
[]
no_license
alexliyu7352/SumaTV
4ab6602047a165b671540de9ffceb87133dc2365
7ddd9c15a4b7d761a71c43ebc047953ca2e131a7
refs/heads/master
2020-12-02T19:43:30.881838
2017-04-13T20:06:11
2017-04-13T20:06:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,502
java
package com.ddm.live.presenter; import com.ddm.live.models.bean.basebean.baseinterface.ResponseBaseInterface; import com.ddm.live.models.bean.common.commonbeans.ErrorResponseBean; import com.ddm.live.models.bean.version.UpdateVersionRequest; import com.ddm.live.models.bean.version.UpdateVersionResponse; import com.ddm.live.models.layerinterfaces.RequestInterface; import com.ddm.live.utils.GetErrorResponseBody; import com.ddm.live.views.iface.IGetUpdateVersionView; import rx.Subscriber; import rx.android.schedulers.AndroidSchedulers; import rx.schedulers.Schedulers; /** * Created by cxx on 2016/10/20. */ public class GetNewVersionInfoPresenter extends BasePresenter { IGetUpdateVersionView iGetUpdateVersionView; public void attachView(IGetUpdateVersionView iGetUpdateVersionView) { this.iGetUpdateVersionView = iGetUpdateVersionView; } public void getNewVerwsionInfo() { UpdateVersionRequest request = new UpdateVersionRequest(); RequestInterface requestInterface = new RequestInterface(); requestInterface.sendRequest2(request) .observeOn(AndroidSchedulers.mainThread()) .subscribeOn(Schedulers.io()) .subscribe(new Subscriber<ResponseBaseInterface>() { @Override public void onCompleted() { } @Override public void onError(Throwable e) { ErrorResponseBean errorResponseBean = GetErrorResponseBody.getErrorResponseBody(e); if (null != errorResponseBean) { String errorMessage = errorResponseBean.getMessage(); Integer errorStatusCode = errorResponseBean.getStatusCode(); print("获取账户信息失败:" + errorMessage + ":" + errorStatusCode); iGetUpdateVersionView.onfailed(errorMessage); } else { iGetUpdateVersionView.onfailed("当前网络状况不佳"); } } @Override public void onNext(ResponseBaseInterface response) { UpdateVersionResponse updateVersionResponse = (UpdateVersionResponse) response; iGetUpdateVersionView.getNewVersionInfo(updateVersionResponse.getVersionbean()); } }); } }
[ "864064269@qq.com" ]
864064269@qq.com
a0cb672c315e35d2f429655dca794e4e9a1551ca
781e2692049e87a4256320c76e82a19be257a05d
/assignments/java/lab02/full_src/80/CheckDigit.java
22801a95a5d8e911e526da7f02ccc665a32d0cdd
[]
no_license
itsolutionscorp/AutoStyle-Clustering
54bde86fe6dbad35b568b38cfcb14c5ffaab51b0
be0e2f635a7558f56c61bc0b36c6146b01d1e6e6
refs/heads/master
2020-12-11T07:27:19.291038
2016-03-16T03:18:00
2016-03-16T03:18:42
59,454,921
4
0
null
2016-05-23T05:40:56
2016-05-23T05:40:56
null
UTF-8
Java
false
false
780
java
public class CheckDigit { public static void main (String [ ] args) { int id = 0; try { id = Integer.parseInt (args[0]); } catch (NumberFormatException e) { System.out.println ("The argument has to be a sequence of digits."); System.exit (1); } boolean isLegal = true; int id1 = id; int other = id1 / 10; int veri = id1 % 10; int s = 0; //sum of digits while (other > 0) { s = other % 10 + s; other = other / 10; } isLegal = (s%10 == veri); if (isLegal) { System.out.println (id + " is legal"); } else { System.out.println (id + " is not legal"); } } }
[ "moghadam.joseph@gmail.com" ]
moghadam.joseph@gmail.com
3767957dc2a47ba23f6499bbbc953db7f3877af2
497fc894147dc54d1c52b9ddc96c3d40044669b1
/app/src/main/java/net/nashlegend/sourcewall/view/common/shuffle/ShuffleDeskSimple.java
60ab20b942edacf4a7ac94f6c372b7b0fa7377fe
[]
no_license
duyouhua/SourceWall
ec9dad45e6fa67ee4b755143e4a9bc51aad97a68
6570480d03cb2a1e09fdefe980e7c08ba7001f87
refs/heads/master
2020-12-06T19:13:07.877277
2016-08-26T08:42:43
2016-08-26T08:42:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,370
java
package net.nashlegend.sourcewall.view.common.shuffle; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.ScrollView; import net.nashlegend.sourcewall.R; import net.nashlegend.sourcewall.util.DisplayUtil; import java.util.ArrayList; public class ShuffleDeskSimple extends RelativeLayout { private ArrayList<MovableButton> buttons = new ArrayList<>(); private ShuffleCardSimple senator; private LinearLayout senatorLayout; private ScrollView scrollView; private View deskHeader; public void setOnButtonClickListener(OnButtonClickListener onButtonClickListener) { this.onButtonClickListener = onButtonClickListener; } OnButtonClickListener onButtonClickListener; public ShuffleDeskSimple(Context context, ScrollView scrollView) { super(context); LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); inflater.inflate(R.layout.layout_shuffle_simple, this); this.scrollView = scrollView; this.deskHeader = findViewById(R.id.desk_header); senatorLayout = (LinearLayout) findViewById(R.id.SenatorLayout); senator = (ShuffleCardSimple) findViewById(R.id.senator); senator.setDeskSimple(this, senatorLayout, scrollView); } public void InitDatas() { ShuffleDesk.vGap = dip2px(ShuffleDesk.vGapDip, getContext()); ShuffleDesk.hGap = dip2px(ShuffleDesk.hGapDip, getContext()); ShuffleDesk.buttonCellWidth = DisplayUtil.getScreenWidth(getContext()) / ShuffleDesk.Columns; ShuffleDesk.buttonHeight = dip2px(ShuffleDesk.buttonHeightDip, getContext()); ShuffleDesk.buttonWidth = ShuffleDesk.buttonCellWidth - ShuffleDesk.hGap * 2; ShuffleDesk.buttonCellHeight = ShuffleDesk.buttonHeight + ShuffleDesk.vGap * 2; int minHeight; if (scrollView.getHeight() > 0) { minHeight = scrollView.getHeight() - deskHeader.getHeight(); } else { minHeight = ShuffleDesk.minSelectedZoneHeight = ShuffleDesk.buttonCellHeight * 5; } senator.setStandardMinHeight(minHeight); senator.setList(buttons); } public void initView() { shuffleButtons(); } private void shuffleButtons() { senator.removeAllViews(); senator.shuffleButtons(); } public void setButtons(ArrayList<MovableButton> buttons) { this.buttons = buttons; } public ArrayList<MovableButton> getButtons() { return buttons; } public ArrayList<MovableButton> getSortedButtons() { ArrayList<MovableButton> buttons = new ArrayList<>(); buttons.addAll(senator.getSortedList()); return buttons; } public static int dip2px(float dp, Context context) { float scale = context.getResources().getDisplayMetrics().density; return (int) (dp * scale + 0.5f); } public void onButtonClicked(MovableButton btn) { if (onButtonClickListener != null) { onButtonClickListener.onClick(btn); } } public boolean hasChanged(){ return false; } public static interface OnButtonClickListener { void onClick(MovableButton btn); } }
[ "panzhihuipzh@gmail.com" ]
panzhihuipzh@gmail.com
387de00e66f0a4ab2321c790906e0a54ecd82caf
aac2f9199771552d2e600e4597f0358b58f9621b
/library/src/main/java/com/minilive/library/entity/EventData.java
a914b2e275d6417b289a509ba692e174cb9ec8c1
[]
no_license
wpf-191514617/PolitCode1
5c82fb843394c524711a0f4ec36b9eb5b50d4ac8
06016b0212a03eec3fec21750b8bae2b365a3163
refs/heads/master
2020-07-15T22:09:32.532222
2019-09-14T13:47:22
2019-09-14T13:47:22
205,659,021
0
0
null
null
null
null
UTF-8
Java
false
false
430
java
package com.minilive.library.entity; /** * Created by Administrator on 2018/1/8. */ public class EventData<T> { private int CODE; private T Data; public EventData(int CODE) { this.CODE = CODE; } public EventData(int CODE, T data) { this.CODE = CODE; Data = data; } public int getCODE() { return CODE; } public T getData() { return Data; } }
[ "15291967179@163.com" ]
15291967179@163.com
0f3f846c89e283dd9f476b38a06fbc2cd82f91d1
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_153/Testnull_15236.java
61ecdd5cb5bc5ee25dc1efa85a2aec0a6e9666f2
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_153; import static org.junit.Assert.*; public class Testnull_15236 { private final Productionnull_15236 production = new Productionnull_15236("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
fd53a528bce143daa005712f891c2e72c1fe89b8
01b23223426a1eb84d4f875e1a6f76857d5e8cd9
/icefaces/tags/icefaces-1.8.0-RC1/icefaces/core/src/com/icesoft/net/messaging/expression/LogicalOperator.java
3d4b919f7a7296c49c439091cc699d4fee0c217c
[]
no_license
numbnet/icesoft
8416ac7e5501d45791a8cd7806c2ae17305cdbb9
2f7106b27a2b3109d73faf85d873ad922774aeae
refs/heads/master
2021-01-11T04:56:52.145182
2016-11-04T16:43:45
2016-11-04T16:43:45
72,894,498
0
0
null
null
null
null
UTF-8
Java
false
false
3,176
java
/* * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * "The contents of this file are subject to the Mozilla Public License * Version 1.1 (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.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations under * the License. * * The Original Code is ICEfaces 1.5 open source software code, released * November 5, 2006. The Initial Developer of the Original Code is ICEsoft * Technologies Canada, Corp. Portions created by ICEsoft are Copyright (C) * 2004-2006 ICEsoft Technologies Canada, Corp. All Rights Reserved. * * Contributor(s): _____________________. * * Alternatively, the contents of this file may be used under the terms of * the GNU Lesser General Public License Version 2.1 or later (the "LGPL" * License), in which case the provisions of the LGPL License are * applicable instead of those above. If you wish to allow use of your * version of this file only under the terms of the LGPL License and not to * allow others to use your version of this file under the MPL, indicate * your decision by deleting the provisions above and replace them with * the notice and other provisions required by the LGPL License. If you do * not delete the provisions above, a recipient may use your version of * this file under either the MPL or the LGPL License." */ package com.icesoft.net.messaging.expression; /** * <p> * The LogicalOperator class represents an abstraction of logical operators, * like: <code>NOT</code>, <code>AND</code> and <code>OR</code> (in precedence * order). * </p> * * @see ComparisonOperator */ public abstract class LogicalOperator extends Operator implements Operand { /** * <p> * Constructs a new LogicalOperator object with the specified * <code>leftOperand</code> and <code>rightOperand</code>. * </p> * * @param leftOperand * the Operand that is to be to the left of the * LogicalOperator. * @param rightOperand * the Operand that is to be to the right of the * LogicalOperator. * @throws IllegalArgumentException * if one of the following occurs: * <ul> * <li> * the specified <code>leftOperand</code> is * <code>null</code>, or * </li> * <li> * the specified <code>rightOperand</code> is * <code>null</code>. * </li> * </ul> */ protected LogicalOperator( final Expression leftOperand, final Expression rightOperand) throws IllegalArgumentException { super(leftOperand, rightOperand); } }
[ "ken.fyten@8668f098-c06c-11db-ba21-f49e70c34f74" ]
ken.fyten@8668f098-c06c-11db-ba21-f49e70c34f74
8bcf473477a94a895884db9821c8d50fb620c0ae
7a4d0f4f9a0daf028965ab48369acba074ab6fdd
/module_mine/src/main/java/com/example/contact_us/ContactUsActivity.java
5d7e5afa8c0b2b36cf191a6c77eafea6545ca28b
[]
no_license
majiaxue/yunchu
d1186c8e5d61ebc831f0e59355a298458e156c3f
31ae1fd330926b4c3fc0d08b0823035f6020c637
refs/heads/master
2022-09-02T21:02:49.016339
2020-05-21T05:12:24
2020-05-21T05:12:24
257,544,515
0
1
null
null
null
null
UTF-8
Java
false
false
2,125
java
package com.example.contact_us; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.alibaba.android.arouter.facade.annotation.Route; import com.bumptech.glide.Glide; import com.example.bean.ContactUsBean; import com.example.module_mine.R; import com.example.module_mine.R2; import com.example.mvp.BaseActivity; import butterknife.BindView; /** * 联系客服 */ @Route(path = "/mine/contactus") public class ContactUsActivity extends BaseActivity<ContactUsView, ContactUsPresenter> implements ContactUsView { @BindView(R2.id.include_back) ImageView includeBack; @BindView(R2.id.include_title) TextView includeTitle; @BindView(R2.id.contact_us_phonenum) TextView contactUsPhonenum; @BindView(R2.id.contact_us_call) TextView contactUsCall; @BindView(R2.id.name) TextView name; @BindView(R2.id.erweima) ImageView erweima; @Override public int getLayoutId() { return R.layout.activity_contact_us; } @Override public void initData() { includeTitle.setText("联系我们"); presenter.getData(); } @Override public void initClick() { includeBack.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); } @Override public ContactUsView createView() { return this; } @Override public ContactUsPresenter createPresenter() { return new ContactUsPresenter(this); } @Override public void contactUs(final ContactUsBean contactUsBean) { name.setText("客服昵称:"+contactUsBean.getName()); Glide.with(this).load(contactUsBean.getPic()).into(erweima); contactUsPhonenum.setText("客服电话:"+contactUsBean.getInfo()); contactUsCall.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { presenter.callPhone(contactUsBean.getInfo()); //18970207052 } }); } }
[ "ellliot_zhang_z@163.com" ]
ellliot_zhang_z@163.com
7f754756573dc4051778271e290ff88c4e5bc5ef
da8743cd9bdcdc357b0981d3de7fdeafa4843f8a
/tomcat/src/servlet/ServletDemo1.java
3c475959942fd17fd7b6d4be8836b8305c6414b9
[]
no_license
7IsEnough/workspace4JSP
bf1e5dc8d5541d20f7c21ac4d73db750a33e1767
328f4ddd28fb1134ca326845db6dc47cf8e5e71b
refs/heads/master
2023-03-07T23:14:15.136700
2021-02-20T11:52:49
2021-02-20T11:52:49
340,642,493
0
0
null
null
null
null
UTF-8
Java
false
false
735
java
package servlet; import javax.servlet.*; import java.io.IOException; /** * @author promise * @date 2020/3/23 - 14:40 * Servlet快速入门 */ public class ServletDemo1 implements Servlet { @Override public void init(ServletConfig servletConfig) throws ServletException { } @Override public ServletConfig getServletConfig() { return null; } //提供服务的方法 @Override public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException { System.out.println("Hello Servlet"); } @Override public String getServletInfo() { return null; } @Override public void destroy() { } }
[ "976949689@qq.com" ]
976949689@qq.com
71565a7204a146704691903b6b94c62936a58eb7
c5bac8b407e50943436ce521d080d6fbeb2a1f02
/subprojects/language-scala/src/main/java/org/gradle/language/scala/plugins/ScalaLanguagePlugin.java
3229c588951c70a5dbe4f5c8878aebba0d455dc3
[]
no_license
felagund89/gradle
6829ceed5cecb32878eba79a823d1b0f9c82bf3b
50b487871cee2322a0335fdedbaecb265660e715
refs/heads/master
2021-01-23T04:20:45.593363
2014-11-21T14:41:56
2014-11-21T16:37:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,602
java
/* * Copyright 2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.gradle.language.scala.plugins; import org.gradle.api.*; import org.gradle.jvm.JvmBinarySpec; import org.gradle.jvm.JvmByteCode; import org.gradle.language.base.LanguageSourceSet; import org.gradle.language.base.internal.LanguageRegistration; import org.gradle.language.base.internal.LanguageRegistry; import org.gradle.language.base.internal.SourceTransformTaskConfig; import org.gradle.language.base.plugins.ComponentModelBasePlugin; import org.gradle.language.jvm.plugins.JvmResourcesPlugin; import org.gradle.language.scala.ScalaSourceSet; import org.gradle.language.scala.internal.DefaultScalaSourceSet; import org.gradle.language.scala.tasks.PlatformScalaCompile; import org.gradle.model.Mutate; import org.gradle.model.RuleSource; import org.gradle.platform.base.BinarySpec; import org.gradle.platform.base.TransformationFileType; import java.util.Collections; import java.util.Map; /** * Plugin for compiling Scala code. Applies the {@link org.gradle.language.base.plugins.ComponentModelBasePlugin} and {@link org.gradle.language.jvm.plugins.JvmResourcesPlugin}. Registers "scala" * language support with the {@link org.gradle.api.tasks.ScalaSourceSet}. */ @Incubating public class ScalaLanguagePlugin implements Plugin<Project> { public void apply(Project project) { project.apply(Collections.singletonMap("plugin", ComponentModelBasePlugin.class)); project.apply(Collections.singletonMap("plugin", JvmResourcesPlugin.class)); } /** * Model rules. */ @SuppressWarnings("UnusedDeclaration") @RuleSource static class Rules { @Mutate void registerLanguage(LanguageRegistry languages) { languages.add(new Scala()); } } private static class Scala implements LanguageRegistration<ScalaSourceSet> { public String getName() { return "scala"; } public Class<ScalaSourceSet> getSourceSetType() { return ScalaSourceSet.class; } public Class<? extends ScalaSourceSet> getSourceSetImplementation() { return DefaultScalaSourceSet.class; } public Map<String, Class<?>> getBinaryTools() { return Collections.emptyMap(); } public Class<? extends TransformationFileType> getOutputType() { return JvmByteCode.class; } public SourceTransformTaskConfig getTransformTask() { return new SourceTransformTaskConfig() { public String getTaskPrefix() { return "compile"; } public Class<? extends DefaultTask> getTaskType() { return PlatformScalaCompile.class; } public void configureTask(Task task, BinarySpec binarySpec, LanguageSourceSet sourceSet) { PlatformScalaCompile compile = (PlatformScalaCompile) task; ScalaSourceSet scalaSourceSet = (ScalaSourceSet) sourceSet; JvmBinarySpec binary = (JvmBinarySpec) binarySpec; compile.setDescription(String.format("Compiles %s.", scalaSourceSet)); compile.setDestinationDir(binary.getClassesDir()); compile.setPlatform(binary.getTargetPlatform()); compile.setSource(scalaSourceSet.getSource()); compile.setClasspath(scalaSourceSet.getCompileClasspath().getFiles()); compile.setTargetCompatibility(binary.getTargetPlatform().getTargetCompatibility().toString()); compile.setSourceCompatibility(binary.getTargetPlatform().getTargetCompatibility().toString()); compile.dependsOn(scalaSourceSet); binary.getTasks().getJar().dependsOn(compile); } }; } public boolean applyToBinary(BinarySpec binary) { return binary instanceof JvmBinarySpec; } } }
[ "rene@breskeby.com" ]
rene@breskeby.com
5d001c0cf30f4b8bcaf92043f9a076f65eecb366
1b33bb4e143b18de302ccd5f107e3490ea8b31aa
/learn.java/src/main/java/oc/a/chapters/_3_core_java_apis/javaArrays/creatingAnArrayOfPrimitives/Array.java
61489f3fb6a08e7e257c05ebbc4b6f5290092da7
[]
no_license
cip-git/learn
db2e4eb297e36db475c734a89d18e98819bdd07f
b6d97f529ed39f25e17b602c00ebad01d7bc2d38
refs/heads/master
2022-12-23T16:39:56.977803
2022-12-18T13:57:37
2022-12-18T13:57:37
97,759,022
0
1
null
2020-10-13T17:06:36
2017-07-19T20:37:29
Java
UTF-8
Java
false
false
1,273
java
package oc.a.chapters._3_core_java_apis.javaArrays.creatingAnArrayOfPrimitives; class Array { /* * Valid declarations */ int[] numbers; int [] numbers2; // space between int and [] int numbers3[]; int numbers4 []; // space between numbers4 and [] /* * initialization */ { numbers = new int[3]; // in this case all the elements will be // initialized to the dbType defaulT value numbers2 = new int[] { 1, 2, 3, }; // numbers3 = {1,2,3,};// compiler error // numbers4 = new int[3]{1,2,3,}; compiler error int[] numbers5 = { 1, 2, 3, }; // anonymous array: don't specify the // dbType and size } static void m(){ Array a = new Array(); for(int i:a.numbers){ System.out.println(i); } } static void m2(){ int[] ia = {1,2,3}; for(int i: ia){ System.out.println(i); } } static void m3(){ int[] ids, types; ids = new int[3]; types = new int[]{1,2,3}; System.out.println("int[] ids, types; //types it's an array here"); } static void m4(){ int ids[], types; ids = new int[3]; types = 5; System.out.println("nt ids[], types; //types it's just an int here"); } public static void main(String[] args) { // createAndPopulate(); // m3(); m3(); m4(); } }
[ "ciprian.dorin.tanase@ibm.com" ]
ciprian.dorin.tanase@ibm.com
8b772818e74b2e3c118d3f15b769e7068722a8c5
9d09f0a59fe5087000ce4010737441357de9ae65
/app/src/main/java/com/xsvideoLive/www/mvp/model/HomeSeachModel.java
1c5fbea7d2d4787a1b8a658e6ed99066351522ed
[]
no_license
lgh990/XiuSe
694e6fd078fec2c4ca537654f8d4aeef5037272d
b3d659c47fae10cf59b2a8fe1eeb65e68f82836f
refs/heads/master
2023-03-01T13:14:19.763557
2021-02-02T04:53:38
2021-02-02T04:53:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
960
java
package com.xsvideoLive.www.mvp.model; import com.xsvideoLive.www.mvp.contract.HomeSeachContract; import com.xsvideoLive.www.net.HttpClient; import com.xsvideoLive.www.net.HttpObservable; import com.xsvideoLive.www.net.bean.BaseResponse; import com.xsvideoLive.www.net.bean.HomeSeachEntity; import com.xsvideoLive.www.net.bean.SeachRoomEntty; import java.util.List; public class HomeSeachModel implements HomeSeachContract.Model { @Override public HttpObservable<BaseResponse<List<SeachRoomEntty>>> getSeachRoomRecord() { return HttpClient.getApi().getSeachRoomRecord(); } @Override public HttpObservable<BaseResponse<String>> removeEnterRoomRecord(String userId) { return HttpClient.getApi().removeEnterRoomRecord(userId); } @Override public HttpObservable<BaseResponse<List<HomeSeachEntity>>> getSeachResult(String searchString) { return HttpClient.getApi().getSeachResult(searchString); } }
[ "895977304@qq.com" ]
895977304@qq.com
93b76d0366de88420559d6073b6b31c98cc6d2f8
5714e7075baaa2ed98fe9cc10dfa0e5110a98d5e
/support/cas-server-support-token-tickets/src/main/java/org/apereo/cas/token/authentication/principal/TokenWebApplicationService.java
1785d58ede2675023860c95f1357f30ff106b9af
[ "LicenseRef-scancode-free-unknown", "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
hunybei/cas
5646d3a2e7496b400c2d89f6a970a8e841e3067a
6553eace018407336b14c6c016783525d1a7e5eb
refs/heads/master
2020-03-27T20:21:27.270060
2018-09-01T09:41:58
2018-09-01T09:41:58
147,062,720
2
0
Apache-2.0
2018-09-02T07:03:25
2018-09-02T07:03:25
null
UTF-8
Java
false
false
718
java
package org.apereo.cas.token.authentication.principal; import org.apereo.cas.authentication.principal.AbstractWebApplicationService; import lombok.NoArgsConstructor; import javax.persistence.DiscriminatorValue; import javax.persistence.Entity; /** * This is {@link TokenWebApplicationService}. * * @author Misagh Moayyed * @since 5.2.0 */ @Entity @DiscriminatorValue("token") @NoArgsConstructor public class TokenWebApplicationService extends AbstractWebApplicationService { private static final long serialVersionUID = -8844121291312069964L; public TokenWebApplicationService(final String id, final String originalUrl, final String artifactId) { super(id, originalUrl, artifactId); } }
[ "mmoayyed@unicon.net" ]
mmoayyed@unicon.net
9917ec46c2b0fbec86526fff012c985489a64224
1681e2b3f3eeb7be0b852c5247982ae43777fd59
/app/src/main/java/com/nullcognition/effectivejava2/chapter02/Item06.java
9034bcc7473b9c05b67677bb867de1eb71ad3f25
[]
no_license
ersin-ertan/EffectiveJava2
c0cbd29f47b9df55edc01c24b0403e667bc4f250
02a81e91a8870196df295c0ab74418ce74be3a0b
refs/heads/master
2021-01-10T19:10:21.733590
2015-10-29T04:18:54
2015-10-29T04:18:54
34,183,938
0
0
null
null
null
null
UTF-8
Java
false
false
3,283
java
package com.nullcognition.effectivejava2.chapter02; import android.support.annotation.NonNull; import java.util.ArrayList; import java.util.Collection; import java.util.EmptyStackException; import java.util.WeakHashMap; /** Created by ersin on 18/04/15 at 8:02 PM */ // eliminate obsolete object references // obsolete references will never be dereferenced (unintentional object retentions), be sure to null out obsolete references // nulling out object references should be the exception rather than the norm // classes that manage their own memory should be on alert for leaks, ex. caches // listeners and other callbacks may leak, keys should be stored in a WeakHashMap public class Item06{ Collection<Client> clientCollection = new ArrayList<>(); public void clientMaker(){ for(int i = 0; i < 5; i++){ new Client(); } } public void clientDestroyer(){ clientCollection.clear(); } } interface SomeCallbackListener{ void someMethod(int i); } enum SomeService{ INSTANCE; // private SomeCallback registeredCallback; not used, is hard reference WeakHashMap<Integer, SomeCallbackListener> weakHashMap = new WeakHashMap<>(); public boolean setRegisteredListener(@NonNull SomeCallbackListener inListener){ int callbacksHashCode = inListener.hashCode(); if(!weakHashMap.containsKey(callbacksHashCode)){ weakHashMap.put(callbacksHashCode, inListener); return true; } return false; } public void updateListenersIValue(int i){ for(SomeCallbackListener _weakHashMapValue : weakHashMap.values()){ // dead key should not yield up their values _weakHashMapValue.someMethod(i); } } } class Client implements SomeCallbackListener{ private int i; private static SomeService someService; private boolean isRegistered; static{ someService = SomeService.INSTANCE; } { // no need to deregister from service, when this object is garbage collected the garbage collector will clean it from the WeakHashMap isRegistered = someService.setRegisteredListener(this); } @Override public void someMethod(int i){ this.i = i;} } class CappedStack{ private Object[] objects; private int size = 0; private static final int DEFAULT_CAPACITY = 8; // managing its own memory with the objects array public CappedStack(){ objects = new Object[DEFAULT_CAPACITY]; } public void push(Object object){ if(size >= DEFAULT_CAPACITY){ throw new StackOverflowError(); } objects[size++] = object; } // objects popped off the stack are not garbage collected, elements outside of the poppable region are kept but will never be dereferenced // because their data will be overwritten with push operations, normal stack implementations have growing capacities and during long term // persistent use, may collect a large amount of objects to be popped to another stack structure due to an abritrary serlialization limitation // pop != null, so the size of the stack will persist even though the objects are not logically reachable public Object pop(){ if(size == 0){ throw new EmptyStackException(); } return objects[--size]; } public Object safePop(){ if(size == 0){ throw new EmptyStackException(); } Object result = objects[--size]; objects[size] = null; // null values are garbage collected return result; } }
[ "ersin_the_ertan@hotmail.com" ]
ersin_the_ertan@hotmail.com
4228d621485439f5630e4a26a813262445b44f61
72e9d4a9caf6c18f7aa1b66d9319b87668d5d2c2
/jpa-criteria/impl/src/main/java/com/blazebit/persistence/criteria/impl/expression/function/ConcatFunction.java
e637816245c2de6b6af079755a741b52e658ec91
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
imanolache/blaze-persistence
f087355cd179fa21e4ed9f904b711be70365e9c6
41f7b0b45da372ba6c681e2b345b1ecdc1877530
refs/heads/master
2023-08-16T06:16:51.774550
2021-10-10T09:12:51
2021-10-10T09:12:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,945
java
/* * Copyright 2014 - 2021 Blazebit. * * 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.blazebit.persistence.criteria.impl.expression.function; import com.blazebit.persistence.criteria.impl.BlazeCriteriaBuilderImpl; import com.blazebit.persistence.criteria.impl.ParameterVisitor; import com.blazebit.persistence.criteria.impl.RenderContext; import com.blazebit.persistence.criteria.impl.expression.AbstractExpression; import javax.persistence.criteria.Expression; /** * @author Christian Beikov * @since 1.2.0 */ public class ConcatFunction extends AbstractExpression<String> { private static final long serialVersionUID = 1L; private final Expression<String> string1; private final Expression<String> string2; public ConcatFunction(BlazeCriteriaBuilderImpl criteriaBuilder, Expression<String> expression1, Expression<String> expression2) { super(criteriaBuilder, String.class); this.string1 = expression1; this.string2 = expression2; } @Override public void visitParameters(ParameterVisitor visitor) { visitor.visit(string1); visitor.visit(string2); } @Override public void render(RenderContext context) { final StringBuilder buffer = context.getBuffer(); buffer.append("CONCAT("); context.apply(string1); buffer.append(','); context.apply(string2); buffer.append(')'); } }
[ "christian.beikov@gmail.com" ]
christian.beikov@gmail.com
52bab1541b942da31ed8faa953ae5c49b4736e10
fae1f76d6acccb773e3be652d8046c2fcc3538c3
/app/src/main/java/app/redmart/com/contract/ProductDetailContract.java
cc04248424bbf26f876599c0c9f92383d229003d
[]
no_license
seneargroup/Android-RedMartAPI
900c36f7649a1beaa763846686d4b74f1a190bab
c2e16947c8f7589b3411ce5fea28355206a02774
refs/heads/master
2022-01-06T05:26:47.588024
2018-08-30T05:14:33
2018-08-30T05:14:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
360
java
package app.redmart.com.contract; import app.redmart.com.data.model.ProductDetail; import app.redmart.com.view.LoadingInterface; public class ProductDetailContract { public interface View{ void setProduct(ProductDetail productDetail); } public interface Presenter{ void onLoadProduct(long id, LoadingInterface loading); } }
[ "hendro.steven@gmail.com" ]
hendro.steven@gmail.com
ad260fa1de7ce29d576768183c87ad19e191fcf0
635db1b8a9539ea7afcf2760fe29516d947af9ef
/app/src/main/java/com/aasaanjobs/partner/base/di/components/BasePresenterComponent.java
19dcf26a0a78cedf87b56b1faed240f7b74d42b2
[]
no_license
nazmuddin77/Partner
5beee35d374d1486c82b89aa3ee22c959840f650
de67cf8b38334589d93a87d08c5d58e936d29966
refs/heads/master
2021-01-01T04:07:02.261608
2016-05-26T10:53:06
2016-05-26T10:53:06
59,672,388
0
0
null
null
null
null
UTF-8
Java
false
false
843
java
package com.aasaanjobs.partner.base.di.components; import com.aasaanjobs.partner.authentication.di.modules.AuthPresenterModule; import com.aasaanjobs.partner.authentication.di.components.AuthenticationPresenterComponent; import com.aasaanjobs.partner.base.di.modules.BasePresenterModule; import com.aasaanjobs.partner.base.presenter.BasePresenter; import com.aasaanjobs.partner.root.di.customscopes.ScopedFragment; import dagger.Component; /** * Created by nazmuddinmavliwala on 17/05/16. */ @ScopedFragment @Component(modules = { BasePresenterModule.class }, dependencies = { BaseActivityComponent.class }) public interface BasePresenterComponent { void injectBasePresenter(BasePresenter basePresenter); AuthenticationPresenterComponent provideAuthPresenterComponent( AuthPresenterModule module); }
[ "nazmuddinmavliwala@gmail.com" ]
nazmuddinmavliwala@gmail.com
813686fff7bc122b527166c6d1cd60af05f3f06f
aae49c4e518bb8cb342044758c205a3e456f2729
/GeogebraiOS/javasources/org/geogebra/common/kernel/advanced/CmdDynamicCoordinates.java
9ce9db3e5a330ca883daf17cc21da3ceee7ec037
[]
no_license
kwangkim/GeogebraiOS
00919813240555d1f2da9831de4544f8c2d9776d
ca3b9801dd79a889da6cb2fdf24b761841fd3f05
refs/heads/master
2021-01-18T05:29:52.050694
2015-10-04T02:29:03
2015-10-04T02:29:03
45,118,575
4
2
null
2015-10-28T14:36:32
2015-10-28T14:36:31
null
UTF-8
Java
false
false
1,513
java
package org.geogebra.common.kernel.advanced; import org.geogebra.common.kernel.Kernel; import org.geogebra.common.kernel.arithmetic.Command; import org.geogebra.common.kernel.commands.CommandProcessor; import org.geogebra.common.kernel.geos.GeoElement; import org.geogebra.common.kernel.geos.GeoNumberValue; import org.geogebra.common.kernel.geos.GeoPoint; import org.geogebra.common.main.MyError; /** * DynamicCoordinates */ public class CmdDynamicCoordinates extends CommandProcessor { /** * Create new command processor * * @param kernel * kernel */ public CmdDynamicCoordinates(Kernel kernel) { super(kernel); } @Override final public GeoElement[] process(Command c) throws MyError { int n = c.getArgumentNumber(); GeoElement[] arg; arg = resArgs(c); switch (n) { case 3: boolean[] ok = new boolean[2]; if ((ok[0] = (arg[0].isGeoPoint() && arg[0].isMoveable())) && (ok[1] = arg[1] instanceof GeoNumberValue) && (arg[2] instanceof GeoNumberValue)) { AlgoDynamicCoordinates algo = new AlgoDynamicCoordinates(cons, c.getLabel(), (GeoPoint) arg[0], (GeoNumberValue) arg[1], (GeoNumberValue) arg[2]); GeoElement[] ret = { algo.getPoint() }; return ret; } else if (!ok[0]) throw argErr(app, c.getName(), arg[0]); else if (!ok[1]) throw argErr(app, c.getName(), arg[1]); else throw argErr(app, c.getName(), arg[2]); // more than one argument default: throw argNumErr(app, c.getName(), n); } } }
[ "kuoyichun1102@gmail.com" ]
kuoyichun1102@gmail.com
6d3e019f069e6087f789a6151439673c8d1277be
06089c9d38f4b435402b2158453eb96ff5e1932a
/src/main/java/com/aero/task/service/MailService.java
cf9d7de1fd5518ce7fd1d22c72c855ab3f8e0229
[]
no_license
BulkSecurityGeneratorProject/task-primeng
3ab46a97e3c6cd06d322f7be28f5ce4b1b476850
9991404bfcf31eea18482acd19e967e17a427919
refs/heads/master
2022-12-13T17:51:27.411284
2019-11-01T13:03:12
2019-11-01T13:03:12
296,543,325
0
0
null
2020-09-18T07:13:40
2020-09-18T07:13:39
null
UTF-8
Java
false
false
3,901
java
package com.aero.task.service; import com.aero.task.domain.User; import io.github.jhipster.config.JHipsterProperties; import java.nio.charset.StandardCharsets; import java.util.Locale; import javax.mail.internet.MimeMessage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.MessageSource; import org.springframework.mail.javamail.JavaMailSender; import org.springframework.mail.javamail.MimeMessageHelper; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import org.thymeleaf.context.Context; import org.thymeleaf.spring5.SpringTemplateEngine; /** * Service for sending emails. * <p> * We use the {@link Async} annotation to send emails asynchronously. */ @Service public class MailService { private final Logger log = LoggerFactory.getLogger(MailService.class); private static final String USER = "user"; private static final String BASE_URL = "baseUrl"; private final JHipsterProperties jHipsterProperties; private final JavaMailSender javaMailSender; private final MessageSource messageSource; private final SpringTemplateEngine templateEngine; public MailService(JHipsterProperties jHipsterProperties, JavaMailSender javaMailSender, MessageSource messageSource, SpringTemplateEngine templateEngine) { this.jHipsterProperties = jHipsterProperties; this.javaMailSender = javaMailSender; this.messageSource = messageSource; this.templateEngine = templateEngine; } @Async public void sendEmail(String to, String subject, String content, boolean isMultipart, boolean isHtml) { log.debug("Send email[multipart '{}' and html '{}'] to '{}' with subject '{}' and content={}", isMultipart, isHtml, to, subject, content); // Prepare message using a Spring helper MimeMessage mimeMessage = javaMailSender.createMimeMessage(); try { MimeMessageHelper message = new MimeMessageHelper(mimeMessage, isMultipart, StandardCharsets.UTF_8.name()); message.setTo(to); message.setFrom(jHipsterProperties.getMail().getFrom()); message.setSubject(subject); message.setText(content, isHtml); javaMailSender.send(mimeMessage); log.debug("Sent email to User '{}'", to); } catch (Exception e) { if (log.isDebugEnabled()) { log.warn("Email could not be sent to user '{}'", to, e); } else { log.warn("Email could not be sent to user '{}': {}", to, e.getMessage()); } } } @Async public void sendEmailFromTemplate(User user, String templateName, String titleKey) { Locale locale = Locale.forLanguageTag(user.getLangKey()); Context context = new Context(locale); context.setVariable(USER, user); context.setVariable(BASE_URL, jHipsterProperties.getMail().getBaseUrl()); String content = templateEngine.process(templateName, context); String subject = messageSource.getMessage(titleKey, null, locale); sendEmail(user.getEmail(), subject, content, false, true); } @Async public void sendActivationEmail(User user) { log.debug("Sending activation email to '{}'", user.getEmail()); sendEmailFromTemplate(user, "mail/activationEmail", "email.activation.title"); } @Async public void sendCreationEmail(User user) { log.debug("Sending creation email to '{}'", user.getEmail()); sendEmailFromTemplate(user, "mail/creationEmail", "email.activation.title"); } @Async public void sendPasswordResetMail(User user) { log.debug("Sending password reset email to '{}'", user.getEmail()); sendEmailFromTemplate(user, "mail/passwordResetEmail", "email.reset.title"); } }
[ "ccpitcmp@outlook.com" ]
ccpitcmp@outlook.com
e41d05a545c02fc32ab014e3ff4600f1aa44d913
33f239a92d3c35d88770872412bdd1f1d7bd2e02
/src/main/java/top/cellargalaxy/util/ExceptionUtil.java
efe9301a13d16957085443a6c8989d50ebc405eb
[]
no_license
cellargalaxy/mycloud-mongodb
50d556b11748c993d4bdff0dfe84914b4dafdc6b
7b892bce240ce589e4e27869a02d41d7a587ed8d
refs/heads/master
2020-03-08T20:26:31.132184
2018-05-14T08:37:57
2018-05-14T08:37:57
128,381,989
0
0
null
null
null
null
UTF-8
Java
false
false
704
java
package top.cellargalaxy.util; /** * Created by cellargalaxy on 18-4-7. */ public class ExceptionUtil { public static final String pringException(Exception exception) { if (exception == null) { return null; } StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(exception.toString()); StackTraceElement[] stackElements = exception.getStackTrace(); if (stackElements != null) { for (StackTraceElement stackElement : stackElements) { stringBuilder.append("\n\tat " + stackElement.getClassName() + '.' + stackElement.getMethodName() + '(' + stackElement.getFileName() + ':' + stackElement.getLineNumber() + ')'); } } return stringBuilder.toString(); } }
[ "cellargalaxy@gmail.com" ]
cellargalaxy@gmail.com
13a2ee41359106519b3ebe6d9febc36f31ca8a12
29604b5b313c6d71c855746dc16e1e742d075b7b
/OpenKM/src/main/java/com/openkm/dao/bean/ProfileTabDocument.java
f7edf4da0dc7608b27165ba18237d44da9d12f46
[]
no_license
UniversitateaPetruMaior/pm-dms
098269e5b8464290f775d8776d3591a43c052220
1aa12951586a60e7a41e8d584d8da9183d126c7d
refs/heads/master
2021-01-10T19:27:29.786616
2015-02-19T12:44:41
2015-02-19T12:44:41
25,916,964
1
0
null
null
null
null
UTF-8
Java
false
false
3,215
java
/** * OpenKM, Open Document Management System (http://www.openkm.com) * Copyright (c) 2006-2014 Paco Avila & Josep Llort * * No bytes were intentionally harmed during the development of this application. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ package com.openkm.dao.bean; import java.io.Serializable; public class ProfileTabDocument implements Serializable { private static final long serialVersionUID = 1L; private boolean propertiesVisible; private boolean securityVisible; private boolean notesVisible; private boolean versionsVisible; private boolean versionDownloadVisible; private boolean previewVisible; private boolean propertyGroupsVisible; public boolean isPropertiesVisible() { return propertiesVisible; } public void setPropertiesVisible(boolean propertiesVisible) { this.propertiesVisible = propertiesVisible; } public boolean isSecurityVisible() { return securityVisible; } public void setSecurityVisible(boolean securityVisible) { this.securityVisible = securityVisible; } public boolean isNotesVisible() { return notesVisible; } public void setNotesVisible(boolean notesVisible) { this.notesVisible = notesVisible; } public boolean isVersionsVisible() { return versionsVisible; } public void setVersionsVisible(boolean versionsVisible) { this.versionsVisible = versionsVisible; } public boolean isVersionDownloadVisible() { return versionDownloadVisible; } public void setVersionDownloadVisible(boolean versionDownloadVisible) { this.versionDownloadVisible = versionDownloadVisible; } public boolean isPreviewVisible() { return previewVisible; } public void setPreviewVisible(boolean previewVisible) { this.previewVisible = previewVisible; } public boolean isPropertyGroupsVisible() { return propertyGroupsVisible; } public void setPropertyGroupsVisible(boolean propertyGroupsVisible) { this.propertyGroupsVisible = propertyGroupsVisible; } public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("propertiesVisible=").append(propertiesVisible); sb.append(", securityVisible=").append(securityVisible); sb.append(", notesVisible=").append(notesVisible); sb.append(", versionsVisible=").append(versionsVisible); sb.append(", versionDownloadVisible=").append(versionDownloadVisible); sb.append(", previewVisible=").append(previewVisible); sb.append(", propertyGroupsVisible=").append(propertyGroupsVisible); sb.append("}"); return sb.toString(); } }
[ "test@test.test" ]
test@test.test
b649da4dad9625b87bbfdcf5cae83a58524ad54e
65ce6407650f71b7702e81405bb4b6acf3e6d58f
/src/java/jena-arq-2.9.0-incubating/src/test/java/com/hp/hpl/jena/sparql/junit/TestExpr.java
8e722b027f47e167cd6c1e5253b1b43674a122c7
[ "Apache-2.0" ]
permissive
arjunakula/Visual-Dialogue-System
00177cb15fb148a8bb4884946f81201926935627
7629301ae28acd6618dd54fd73e40e28584f0c56
refs/heads/master
2020-05-02T09:14:32.519255
2019-03-26T20:56:34
2019-03-26T20:56:34
177,865,899
1
0
null
null
null
null
UTF-8
Java
false
false
5,890
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.hp.hpl.jena.sparql.junit; import java.io.ByteArrayInputStream ; import junit.framework.TestCase ; import com.hp.hpl.jena.query.ARQ ; import com.hp.hpl.jena.query.Query ; import com.hp.hpl.jena.query.QueryFactory ; import com.hp.hpl.jena.query.QueryParseException ; import com.hp.hpl.jena.sparql.engine.binding.Binding ; import com.hp.hpl.jena.sparql.engine.binding.BindingFactory ; import com.hp.hpl.jena.sparql.expr.Expr ; import com.hp.hpl.jena.sparql.expr.NodeValue ; import com.hp.hpl.jena.sparql.function.FunctionEnv ; import com.hp.hpl.jena.sparql.function.FunctionEnvBase ; import com.hp.hpl.jena.sparql.lang.arq.ARQParser ; import com.hp.hpl.jena.sparql.util.Context ; import com.hp.hpl.jena.sparql.util.ExprUtils ; /** An expression test. */ public abstract class TestExpr extends TestCase { public final static int NO_FAILURE = 100 ; public final static int PARSE_FAIL = 250 ; // Parser should catch it. public final static int EVAL_FAIL = 200 ; // Parser should pass it but eval should fail it String testName ; String exprString ; Query query ; Binding binding ; int failureMode ; boolean doEval ; // Global default enviromnent - including the function registry Context context = ARQ.getContext().copy(); protected TestExpr(String label, String expression, Query queryCxt, Binding env, int failureOutcome) { super() ; testName = label ; doEval = true ; // () in names causes display to be truncated in Eclipse which seems to be // compensating for TestCase.toString() (JUnit 3.8) // which puts (class) on the end of test case names. String n = label.replace('(','[').replace(')',']') ; switch (failureOutcome) { case NO_FAILURE: break ; case PARSE_FAIL: n = n + " [Parse fail]" ; break ; case EVAL_FAIL: n = n + " [Eval fail]" ; break ; default: n = n + " [Unknown fail]" ; break ; } setName(n) ; exprString = expression ; if ( queryCxt == null ) queryCxt = QueryFactory.make() ; query = queryCxt ; if ( env == null ) env = BindingFactory.create() ; binding = env ; this.failureMode = failureOutcome ; } @Override protected void runTest() throws Throwable { Expr expr = null ; try { expr = parse(exprString) ; } catch (Error err) { fail("Error thrown in parse: "+err) ; } catch (Exception ex) { if ( failureMode != TestExpr.PARSE_FAIL ) fail("Unexpected parsing failure: "+ex) ; checkException(expr, ex) ; return ; } if ( failureMode == TestExpr.PARSE_FAIL ) { fail("Test should have failed in parsing: "+expr) ; return ; } Expr expr2 = expr.deepCopy() ; if ( ! expr.equals(expr2) ) { System.out.println("Expr: "+expr) ; System.out.println("Expr2: "+expr2) ; assertEquals(expr, expr2) ; } checkExpr(expr) ; if ( !doEval ) return ; try { FunctionEnv env = new FunctionEnvBase(context) ; NodeValue v = expr.eval(binding, env) ; checkValue(expr, v) ; } catch (NullPointerException ex) { throw ex ; } catch (Exception ex) { checkException(expr, ex) ; } } private Expr parse(String exprString) throws Throwable { return ExprUtils.parse(query, exprString, false) ; } private Expr parseSPARQL(ByteArrayInputStream in) throws Throwable { try { ARQParser parser = new ARQParser(in) ; parser.setQuery(query) ; return parser.Expression() ; } catch (com.hp.hpl.jena.sparql.lang.arq.ParseException ex) { throw new QueryParseException(ex.getMessage(), ex.currentToken.beginLine, ex.currentToken.beginColumn) ; } catch (com.hp.hpl.jena.sparql.lang.arq.TokenMgrError tErr) { throw new QueryParseException(tErr.getMessage(),-1,-1) ; } catch (Error err) { String tmp = err.getMessage() ; if ( tmp == null ) throw new QueryParseException(err,-1, -1) ; throw new QueryParseException(tmp,-1, -1) ; } } protected boolean failureCorrect() { return failureMode != NO_FAILURE ; } protected boolean evalCorrect() { return failureMode != EVAL_FAIL ; } abstract void checkExpr(Expr expr) ; abstract void checkValue(Expr expr, NodeValue nodeValue) ; abstract void checkException(Expr expr, Exception ex) ; // Junit/TestCase (3.8, 3.8.1 at least) mangles the toString @Override public String toString() { return testName ; } }
[ "akula.arjun@gmail.com" ]
akula.arjun@gmail.com
66202fa8d8f2d82e51e2008da6054499a1266dcf
094ae9810f3433ff27cd32659b7148df8b3d0893
/src/com/jiangyifen/ec2/ui/csr/workarea/common/CustomerAllInfoWindow.java
753eeadbd2f96afb3889d96cb516139fdb9275ee
[]
no_license
AntizZzzz/Ec2
c4652704d02a227275696397fd328da77bf8b869
1a03857f1d3239b96cd593cfaf6d6c9b4fef8b2c
refs/heads/main
2023-02-19T19:42:30.138843
2021-01-22T02:27:19
2021-01-22T02:27:19
331,528,060
0
0
null
null
null
null
UTF-8
Java
false
false
6,612
java
package com.jiangyifen.ec2.ui.csr.workarea.common; import com.jiangyifen.ec2.bean.RoleType; import com.jiangyifen.ec2.entity.CustomerResource; import com.jiangyifen.ec2.entity.User; import com.jiangyifen.ec2.globaldata.ResourceDataCsr; import com.jiangyifen.ec2.utils.SpringContextHolder; import com.vaadin.ui.Component; import com.vaadin.ui.TabSheet; import com.vaadin.ui.TabSheet.SelectedTabChangeEvent; import com.vaadin.ui.TabSheet.SelectedTabChangeListener; import com.vaadin.ui.VerticalLayout; import com.vaadin.ui.Window; /** * 该类用于让csr 查看客户的工种基本信息 * MyTaskTabView 中有调用 */ @SuppressWarnings("serial") public class CustomerAllInfoWindow extends Window implements SelectedTabChangeListener { private TabSheet customerInfoTabSheet; // 客服信息TabSheet // 客户基本信息显示 Tab 页 private VerticalLayout baseInfoVLayout; // 客户基本信息Tab 页布局管理器 private CustomerBaseInfoView customerBaseInfoView; // 客户基本信息编辑表单 // 客户描述信息显示 Tab 页 private VerticalLayout descriptionTabVLayout; // 客户描述Tab 页布局管理器 private CustomerDescriptionView customerDescriptionView; // 客户描述信息的显示表格 // 客户地址信息显示 Tab 页 private VerticalLayout addressTabVLayout; // 客户描述Tab 页布局管理器 private CustomerAddressView customerAddressView; // 客户描述信息的显示表格 // 客户历史记录显示 Tab 页 private VerticalLayout historyRecordTabVLayout; // 客户描述Tab 页布局管理器 private HistoryRecordView historyRecordView; // 对该客户做的所有历史记录 private User loginUser; // 当前登陆用户 private RoleType roleType; // 当前用户登陆时使用的角色类型 private CustomerResource customerResource; // 个组件的数据源----客户资源 public CustomerAllInfoWindow(RoleType roleType) { this.center(); this.setWidth("680px"); this.setHeight("380px"); this.setImmediate(true); this.roleType = roleType; loginUser = SpringContextHolder.getLoginUser(); customerInfoTabSheet = new TabSheet(); customerInfoTabSheet.setWidth("100%"); customerInfoTabSheet.setHeight("345px"); customerInfoTabSheet.addListener((SelectedTabChangeListener)this); this.addComponent(customerInfoTabSheet); // 创建基本信息显示 Tab 页 createBaseInfoTab(); // 创建客户描述信息显示 Tab 页 createDescriptionTab(); // 创建客户地址信息显示 Tab 页 createAddressTab(); // 创建客户历史记录显示 Tab 页 createHistoryRecordTab(); } @Override public void selectedTabChange(SelectedTabChangeEvent event) { Component tab = customerInfoTabSheet.getSelectedTab(); if(tab == baseInfoVLayout) { customerBaseInfoView.echoCustomerBaseInfo(customerResource); // 回显表格中选中项对应客户的基本信息 } else if(tab == descriptionTabVLayout) { customerDescriptionView.echoCustomerDescription(customerResource); // 回显表格中选中项对应客户的所有描述信息 } else if(tab == addressTabVLayout) { customerAddressView.echoCustomerAddress(customerResource); // 回显表格中选中项对应客户的所有地址信息 } else if(tab == historyRecordTabVLayout) { historyRecordView.echoHistoryRecord(customerResource); // 回显表格中选中项对应客户的所有地址信息 } } /** * 创建基本信息显示 Tab 页 */ private void createBaseInfoTab() { baseInfoVLayout = new VerticalLayout(); baseInfoVLayout.setMargin(true); customerBaseInfoView = new CustomerBaseInfoView(loginUser, roleType); customerBaseInfoView.setCustomerInfoPanelHeight("290px"); baseInfoVLayout.addComponent(customerBaseInfoView); customerInfoTabSheet.addTab(baseInfoVLayout, "客户基本信息", ResourceDataCsr.customer_info_16_ico); } /** * 创建客户描述信息显示 Tab 页 */ private void createDescriptionTab() { descriptionTabVLayout = new VerticalLayout(); descriptionTabVLayout.setMargin(true); customerDescriptionView = new CustomerDescriptionView(loginUser); descriptionTabVLayout.addComponent(customerDescriptionView); customerInfoTabSheet.addTab(descriptionTabVLayout, "客户描述信息", ResourceDataCsr.customer_description_16_ico); } /** * 创建地址信息Tab 页 */ private void createAddressTab() { addressTabVLayout = new VerticalLayout(); addressTabVLayout.setMargin(true); customerAddressView = new CustomerAddressView(); addressTabVLayout.addComponent(customerAddressView); customerInfoTabSheet.addTab(addressTabVLayout, "客户地址信息", ResourceDataCsr.address_16_ico); } /** * 创建客户历史记录显示 Tab 页 */ private void createHistoryRecordTab() { historyRecordTabVLayout = new VerticalLayout(); historyRecordTabVLayout.setMargin(true); historyRecordView = new HistoryRecordView(loginUser, roleType); historyRecordTabVLayout.addComponent(historyRecordView); customerInfoTabSheet.addTab(historyRecordTabVLayout, "客户历史记录", ResourceDataCsr.customer_history_record_16_ico); } /** * 当用户更改了客户的基本信息后,则将相应的模块进行回显信息 * @param sourceTableVLayout 当前正被操作的模块 中的表格 */ public void setEchoModifyByReflect(VerticalLayout sourceTableVLayout) { customerBaseInfoView.setEchoModifyByReflect(sourceTableVLayout); } /** * 根据客户信息回显相应组件的信息 * @param customerResource 客户资源对象 */ public void initCustomerResource(CustomerResource customerResource) { this.customerResource = customerResource; } public void echoCustomerBaseInfo(CustomerResource customerResource) { customerBaseInfoView.echoCustomerBaseInfo(customerResource); // 回显表格中选中项对应客户的基本信息 } public void echoCustomerDescription(CustomerResource customerResource) { customerDescriptionView.echoCustomerDescription(customerResource); // 回显表格中选中项对应客户的所有描述信息 } public void echoCustomerAddress(CustomerResource customerResource) { customerAddressView.echoCustomerAddress(customerResource); // 回显表格中选中项对应客户的所有地址信息 } public void echoHistoryRecord(CustomerResource customerResource) { historyRecordView.echoHistoryRecord(customerResource); // 回显表格中选中项对应客户的所有地址信息 } public TabSheet getCustomerInfoTabSheet() { return customerInfoTabSheet; } }
[ "15900607004@163.com" ]
15900607004@163.com
5e1267cee0aae299ddd7c9a256356428f1c82f05
dbb61cf3e9111788729f4779829bb1aef408562a
/kie-wb-common-forms/kie-wb-common-forms-commons/kie-wb-common-forms-common-rendering/kie-wb-common-forms-common-rendering-client/src/main/java/org/kie/workbench/common/forms/common/rendering/client/util/masks/ClientMaskInterpreter.java
e60d9658d2f688d2db36f3001e882ddcce4f121e
[ "Apache-2.0" ]
permissive
bbrodt/kie-wb-common
313c3b3b52fae29dd58596a5a2241beef3170bc2
c7d08518d9d06981f97b09343ec17292fd718664
refs/heads/master
2021-01-13T04:29:05.930751
2017-01-24T10:16:38
2017-01-24T10:16:38
79,925,906
1
0
null
2017-01-24T15:47:42
2017-01-24T15:47:42
null
UTF-8
Java
false
false
1,711
java
/* * Copyright 2016 Red Hat, Inc. and/or its affiliates. * * 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.kie.workbench.common.forms.common.rendering.client.util.masks; import org.jboss.errai.databinding.client.HasProperties; import org.jboss.errai.databinding.client.api.DataBinder; import org.kie.workbench.common.forms.commons.rendering.shared.util.masks.MaskInterpreter; import org.kie.workbench.common.forms.commons.rendering.shared.util.masks.ModelInterpreter; public class ClientMaskInterpreter<T> extends MaskInterpreter<T> { public ClientMaskInterpreter( String mask ) { super( mask ); } @Override protected ModelInterpreter<T> getModelInterpreter( T model ) { HasProperties hasProperties; if ( model instanceof HasProperties ) { hasProperties = (HasProperties) model; } else { hasProperties = (HasProperties) DataBinder.forModel( model ).getModel(); } return propertyName -> { Object result = hasProperties.get( propertyName ); if ( result == null ) { return ""; } return result.toString(); }; } }
[ "christian.sadilek@gmail.com" ]
christian.sadilek@gmail.com
a647be444cee8efd5b2fd9c99f103ee0f46a992b
dec6bd85db1d028edbbd3bd18fe0ca628eda012e
/netbeans-projects/SistemaVendasProdutos/src/ClassPadrao/JTextFieldDouble.java
48d00f34dfe2a5aab05f9fb7d031e84b89fc219d
[]
no_license
MatheusGrenfell/java-projects
21b961697e2c0c6a79389c96b588e142c3f70634
93c7bfa2e4f73a232ffde2d38f30a27f2a816061
refs/heads/master
2022-12-29T12:55:00.014296
2020-10-16T00:54:30
2020-10-16T00:54:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
529
java
package ClassPadrao; import javax.swing.JTextField; public class JTextFieldDouble { public void validaCampo(JTextField Numero) throws Exception { double valor; if (Numero.getText().length() != 0) { try { valor = Double.parseDouble(Numero.getText()); } catch (NumberFormatException ex) { Numero.grabFocus(); throw new Exception("Caracter inválido certifique se que o campo foi digitado corretamente"); } } } }
[ "caiohobus@gmail.com" ]
caiohobus@gmail.com
b6abb6e1dcb75feec0719f974608f32a1ae83e1e
9cfe5570b220db743c85d1df56162b9b7bed72e2
/src/main/java/br/ufpa/arquivista/web/rest/errors/FieldErrorVM.java
0b26e7b7b6a5512ec88250428ee68a90b5e38f72
[]
no_license
AlvesGil/projetoarquivista
7f464d222a8d7d7d8b3bfb74c9d2963e1edcff55
904973aefa20ebe3d9ad82ac6d7ad020cc0cddb8
refs/heads/master
2020-04-02T11:54:50.317049
2018-10-31T22:01:35
2018-10-31T22:01:35
154,411,619
0
0
null
2018-10-31T22:01:37
2018-10-23T23:53:27
Java
UTF-8
Java
false
false
650
java
package br.ufpa.arquivista.web.rest.errors; import java.io.Serializable; public class FieldErrorVM implements Serializable { private static final long serialVersionUID = 1L; private final String objectName; private final String field; private final String message; public FieldErrorVM(String dto, String field, String message) { this.objectName = dto; this.field = field; this.message = message; } public String getObjectName() { return objectName; } public String getField() { return field; } public String getMessage() { return message; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
5b26a0625678b9128bbb56f810d15b77e6144af2
ed8b18353c3dfee83c03e5380d12d72659368b39
/src/main/java/io/github/pascalgrimaud/web/rest/MicroserviceLabelResource.java
0e42070567ffc7b195a57992439124c9c6aaa7ff
[]
no_license
pascalgrimaud/jhipster-conf-2018-demo
468e14494041b371094c89c1f75cc7b478c795a2
590016d4d28ced8347a09b6d26fe5f0973759ea6
refs/heads/master
2020-03-21T05:26:03.440083
2018-06-21T13:48:18
2018-06-21T13:48:18
138,160,166
0
0
null
null
null
null
UTF-8
Java
false
false
6,364
java
package io.github.pascalgrimaud.web.rest; import com.codahale.metrics.annotation.Timed; import io.github.pascalgrimaud.domain.MicroserviceLabel; import io.github.pascalgrimaud.service.MicroserviceLabelService; import io.github.pascalgrimaud.web.rest.errors.BadRequestAlertException; import io.github.pascalgrimaud.web.rest.util.HeaderUtil; import io.github.pascalgrimaud.web.rest.util.PaginationUtil; import io.github.pascalgrimaud.service.dto.MicroserviceLabelCriteria; import io.github.pascalgrimaud.service.MicroserviceLabelQueryService; import io.github.jhipster.web.util.ResponseUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; import java.net.URI; import java.net.URISyntaxException; import java.util.List; import java.util.Optional; /** * REST controller for managing MicroserviceLabel. */ @RestController @RequestMapping("/api") public class MicroserviceLabelResource { private final Logger log = LoggerFactory.getLogger(MicroserviceLabelResource.class); private static final String ENTITY_NAME = "microserviceLabel"; private final MicroserviceLabelService microserviceLabelService; private final MicroserviceLabelQueryService microserviceLabelQueryService; public MicroserviceLabelResource(MicroserviceLabelService microserviceLabelService, MicroserviceLabelQueryService microserviceLabelQueryService) { this.microserviceLabelService = microserviceLabelService; this.microserviceLabelQueryService = microserviceLabelQueryService; } /** * POST /microservice-labels : Create a new microserviceLabel. * * @param microserviceLabel the microserviceLabel to create * @return the ResponseEntity with status 201 (Created) and with body the new microserviceLabel, or with status 400 (Bad Request) if the microserviceLabel has already an ID * @throws URISyntaxException if the Location URI syntax is incorrect */ @PostMapping("/microservice-labels") @Timed public ResponseEntity<MicroserviceLabel> createMicroserviceLabel(@Valid @RequestBody MicroserviceLabel microserviceLabel) throws URISyntaxException { log.debug("REST request to save MicroserviceLabel : {}", microserviceLabel); if (microserviceLabel.getId() != null) { throw new BadRequestAlertException("A new microserviceLabel cannot already have an ID", ENTITY_NAME, "idexists"); } MicroserviceLabel result = microserviceLabelService.save(microserviceLabel); return ResponseEntity.created(new URI("/api/microservice-labels/" + result.getId())) .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString())) .body(result); } /** * PUT /microservice-labels : Updates an existing microserviceLabel. * * @param microserviceLabel the microserviceLabel to update * @return the ResponseEntity with status 200 (OK) and with body the updated microserviceLabel, * or with status 400 (Bad Request) if the microserviceLabel is not valid, * or with status 500 (Internal Server Error) if the microserviceLabel couldn't be updated * @throws URISyntaxException if the Location URI syntax is incorrect */ @PutMapping("/microservice-labels") @Timed public ResponseEntity<MicroserviceLabel> updateMicroserviceLabel(@Valid @RequestBody MicroserviceLabel microserviceLabel) throws URISyntaxException { log.debug("REST request to update MicroserviceLabel : {}", microserviceLabel); if (microserviceLabel.getId() == null) { throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull"); } MicroserviceLabel result = microserviceLabelService.save(microserviceLabel); return ResponseEntity.ok() .headers(HeaderUtil.createEntityUpdateAlert(ENTITY_NAME, microserviceLabel.getId().toString())) .body(result); } /** * GET /microservice-labels : get all the microserviceLabels. * * @param pageable the pagination information * @param criteria the criterias which the requested entities should match * @return the ResponseEntity with status 200 (OK) and the list of microserviceLabels in body */ @GetMapping("/microservice-labels") @Timed public ResponseEntity<List<MicroserviceLabel>> getAllMicroserviceLabels(MicroserviceLabelCriteria criteria, Pageable pageable) { log.debug("REST request to get MicroserviceLabels by criteria: {}", criteria); Page<MicroserviceLabel> page = microserviceLabelQueryService.findByCriteria(criteria, pageable); HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/microservice-labels"); return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK); } /** * GET /microservice-labels/:id : get the "id" microserviceLabel. * * @param id the id of the microserviceLabel to retrieve * @return the ResponseEntity with status 200 (OK) and with body the microserviceLabel, or with status 404 (Not Found) */ @GetMapping("/microservice-labels/{id}") @Timed public ResponseEntity<MicroserviceLabel> getMicroserviceLabel(@PathVariable Long id) { log.debug("REST request to get MicroserviceLabel : {}", id); Optional<MicroserviceLabel> microserviceLabel = microserviceLabelService.findOne(id); return ResponseUtil.wrapOrNotFound(microserviceLabel); } /** * DELETE /microservice-labels/:id : delete the "id" microserviceLabel. * * @param id the id of the microserviceLabel to delete * @return the ResponseEntity with status 200 (OK) */ @DeleteMapping("/microservice-labels/{id}") @Timed public ResponseEntity<Void> deleteMicroserviceLabel(@PathVariable Long id) { log.debug("REST request to delete MicroserviceLabel : {}", id); microserviceLabelService.delete(id); return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build(); } }
[ "pascalgrimaud@gmail.com" ]
pascalgrimaud@gmail.com
b5a133812e70bf7cd698009b28873e1d5839253f
7ab26d4bc788b5d437cb69992ea94b56a4899b6c
/jPSICS/src/org/psics/num/model/channel/StochasticChannelSet.java
5ee88b8f5c4d69a477dd08989d2ff9c489a905d7
[]
no_license
MattNolanLab/PSICS
d8e777d9a18e332231de244c23431b34c655cfa5
68b4f17e9aef2e6c7ca3c23da2a175eeaeb7251f
refs/heads/master
2021-05-27T02:01:24.747112
2014-05-13T16:19:21
2014-05-13T16:19:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,206
java
package org.psics.num.model.channel; import org.psics.num.math.Random; public class StochasticChannelSet implements ChannelSet { TableChannel table; int[][] state; int nchan; double eeff; double geff; public StochasticChannelSet(TableChannel tch, int n) { table = tch; nchan = n; } public void instantiateChannels(double v0) { double[][] fstate = table.equlibriumOccupancy(v0); state = new int[nchan][fstate.length]; for (int igc = 0; igc < fstate.length; igc++) { double[] fcomp = fstate[igc]; for (int i = 0; i < nchan; i++) { state[i][igc] = Random.weightedSample(fcomp); } } } public void advance(double v) { table.stochasticAdvance(v, state); eeff = table.erev; // just ohmic for now; geff = 0.; for (int i = 0; i < nchan; i++) { geff += table.stochasticGeff(state[i]); } geff *= table.gBase; } public double getEEff() { return eeff; } public double getGEff() { return geff; } public String numinfo(double v) { // TODO Auto-generated method stub return null; } public int getNChan() { return nchan; } public TableChannel getTable() { return table; } }
[ "robert@textensor.com" ]
robert@textensor.com
7d29f22a8ded4f410f57f7f41bf1378083d8689d
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/hibernate-orm/2017/12/GetHqlQueryPlanTest.java
7913027b9d4cb3394cc718aec30c55e8e0ee22bf
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
3,838
java
/* * Hibernate, Relational Persistence for Idiomatic Java * * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.hibernate.test.queryplan; import java.util.Map; import org.hibernate.Session; import org.hibernate.engine.query.spi.HQLQueryPlan; import org.hibernate.engine.query.spi.QueryPlanCache; import org.hibernate.engine.spi.SessionImplementor; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; import org.junit.Test; import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; /** * Tests for HQL query plans * * @author Gail Badner */ public class GetHqlQueryPlanTest extends BaseCoreFunctionalTestCase { public String[] getMappings() { return new String[]{ "queryplan/filter-defs.hbm.xml", "queryplan/Joined.hbm.xml" }; } protected Map getEnabledFilters(Session s) { return ( ( SessionImplementor ) s ).getLoadQueryInfluencers().getEnabledFilters(); } @Test public void testHqlQueryPlan() { Session s = openSession(); QueryPlanCache cache = ( ( SessionImplementor ) s ).getFactory().getQueryPlanCache(); assertTrue( getEnabledFilters( s ).isEmpty() ); HQLQueryPlan plan1 = cache.getHQLQueryPlan( "from Person", false, getEnabledFilters( s ) ); HQLQueryPlan plan2 = cache.getHQLQueryPlan( "from Person where name is null", false, getEnabledFilters( s ) ); HQLQueryPlan plan3 = cache.getHQLQueryPlan( "from Person where name = :name", false, getEnabledFilters( s ) ); HQLQueryPlan plan4 = cache.getHQLQueryPlan( "from Person where name = ?1", false, getEnabledFilters( s ) ); assertNotSame( plan1, plan2 ); assertNotSame( plan1, plan3 ); assertNotSame( plan1, plan4 ); assertNotSame( plan2, plan3 ); assertNotSame( plan2, plan4 ); assertNotSame( plan3, plan4 ); assertSame( plan1, cache.getHQLQueryPlan( "from Person", false, getEnabledFilters( s ) ) ); assertSame( plan2, cache.getHQLQueryPlan( "from Person where name is null", false, getEnabledFilters( s ) ) ); assertSame( plan3, cache.getHQLQueryPlan( "from Person where name = :name", false, getEnabledFilters( s ) ) ); assertSame( plan4, cache.getHQLQueryPlan( "from Person where name = ?1", false, getEnabledFilters( s ) ) ); s.close(); } @Test public void testHqlQueryPlanWithEnabledFilter() { Session s = openSession(); QueryPlanCache cache = ( (SessionImplementor) s ).getFactory().getQueryPlanCache(); HQLQueryPlan plan1A = cache.getHQLQueryPlan( "from Person", true, getEnabledFilters( s ) ); HQLQueryPlan plan1B = cache.getHQLQueryPlan( "from Person", false, getEnabledFilters( s ) ); s.enableFilter( "sex" ).setParameter( "sexCode", Character.valueOf( 'F' ) ); HQLQueryPlan plan2A = cache.getHQLQueryPlan( "from Person", true, getEnabledFilters( s ) ); HQLQueryPlan plan2B = cache.getHQLQueryPlan( "from Person", false, getEnabledFilters( s ) ); s.disableFilter( "sex" ); HQLQueryPlan plan3A = cache.getHQLQueryPlan( "from Person", true, getEnabledFilters( s ) ); HQLQueryPlan plan3B = cache.getHQLQueryPlan( "from Person", false, getEnabledFilters( s ) ); s.enableFilter( "sex" ).setParameter( "sexCode", Character.valueOf( 'M' ) ); HQLQueryPlan plan4A = cache.getHQLQueryPlan( "from Person", true, getEnabledFilters( s ) ); HQLQueryPlan plan4B = cache.getHQLQueryPlan( "from Person", false, getEnabledFilters( s ) ); assertSame( plan1A, plan3A ); assertSame( plan1B, plan3B ); assertSame( plan2A, plan4A ); assertSame( plan2B, plan4B ); assertNotSame( plan1A, plan1B ); assertNotSame( plan1A, plan2A ); assertNotSame( plan1A, plan2B ); assertNotSame( plan1B, plan2A ); assertNotSame( plan1B, plan2B ); s.close(); } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
4f6608cc3aee92410933842180d911fac4d97dc2
3d8be4891cdb6703a942add45221a45daa10da49
/vertx-gaia/vertx-up/src/main/java/io/vertx/zero/micro/config/ClusterStrada.java
b3c71c5b61a0dbf15f84ab9db9447d2dcf31ccb0
[ "Apache-2.0" ]
permissive
zdylalala/vertx-zero
ec7114f2fc736309b7c328336af344b843ba3dac
8ac59d3e9de764faf1df3ac00c699936882ccc3f
refs/heads/master
2020-03-23T23:46:05.255614
2018-07-24T00:00:44
2018-07-24T00:00:44
142,254,682
1
0
null
2018-07-25T06:04:35
2018-07-25T06:04:34
null
UTF-8
Java
false
false
581
java
package io.vertx.zero.micro.config; import io.vertx.core.ClusterOptions; import io.vertx.core.json.JsonObject; import io.vertx.up.epic.fn.Fn; import io.vertx.up.log.Annal; import io.vertx.zero.marshal.Transformer; public class ClusterStrada implements Transformer<ClusterOptions> { private static final Annal LOGGER = Annal.get(ClusterStrada.class); @Override public ClusterOptions transform(final JsonObject config) { return Fn.getSemi(null == config, LOGGER, ClusterOptions::new, () -> new ClusterOptions(config)); } }
[ "silentbalanceyh@126.com" ]
silentbalanceyh@126.com
abec055d17e2e50a343bc10615ae4da75f43bf0a
d39ccf65250d04d5f7826584a06ee316babb3426
/wb-mmb/wb-api/src/main/java/org/dwfa/ace/task/svn/ModifyAllSvnEntriesBeanInfo.java
eef8f8796a7cfd40eff2efa44f72854bd6492a09
[]
no_license
va-collabnet-archive/workbench
ab4c45504cf751296070cfe423e39d3ef2410287
d57d55cb30172720b9aeeb02032c7d675bda75ae
refs/heads/master
2021-01-10T02:02:09.685099
2012-01-25T19:15:44
2012-01-25T19:15:44
47,691,158
0
0
null
null
null
null
UTF-8
Java
false
false
1,888
java
/** * Copyright (c) 2009 International Health Terminology Standards Development * Organisation * * 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.dwfa.ace.task.svn; import java.beans.BeanDescriptor; import java.beans.IntrospectionException; import java.beans.PropertyDescriptor; import java.beans.SimpleBeanInfo; import org.dwfa.bpa.tasks.editor.JTextFieldEditor; public class ModifyAllSvnEntriesBeanInfo extends SimpleBeanInfo { public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor repoUrl = new PropertyDescriptor("repoUrl", getBeanDescriptor().getBeanClass()); repoUrl.setBound(true); repoUrl.setPropertyEditorClass(JTextFieldEditor.class); repoUrl.setDisplayName("<html><font color='green'>repoUrl:"); repoUrl.setShortDescription("The URL of the repository to be set."); PropertyDescriptor rv[] = { repoUrl }; return rv; } catch (IntrospectionException e) { throw new Error(e.toString()); } } /** * @see java.beans.BeanInfo#getBeanDescriptor() */ public BeanDescriptor getBeanDescriptor() { BeanDescriptor bd = new BeanDescriptor(ModifyAllSvnEntries.class); bd.setDisplayName("<html><font color='green'><center>Modify All Svn Entries"); return bd; } }
[ "wsmoak" ]
wsmoak
bb3331594176c37d1d649a1812b0e402f59669ff
fb26b4c889441c2a8db06531bc581b67d23d6a79
/bundles/builder/docker/src/main/java/org/pentaho/build/buddy/bundles/builder/docker/DockerBuildRunner.java
b0e6cb7c64bca4aeb1b6508bd97aad2c07788a9a
[]
no_license
matthewtckr/docker-build
bbdf900bd71b625b13530204700dc7f4c6202cca
08353ad4e6d1e741cd8e809e4c91f4a426aae25b
refs/heads/osgi
2020-05-20T23:12:31.576668
2016-03-28T17:49:02
2016-03-28T17:49:02
55,156,291
2
0
null
2016-03-31T14:19:07
2016-03-31T14:19:07
null
UTF-8
Java
false
false
3,331
java
package org.pentaho.build.buddy.bundles.builder.docker; import com.fasterxml.jackson.databind.ObjectMapper; import org.pentaho.build.buddy.bundles.api.build.BuildCommands; import org.pentaho.build.buddy.bundles.api.build.BuildRunner; import org.pentaho.build.buddy.bundles.api.result.LineHandler; import org.pentaho.build.buddy.bundles.util.config.MapUtil; import org.pentaho.build.buddy.util.shell.ShellException; import org.pentaho.build.buddy.util.shell.ShellUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Created by bryan on 3/2/16. */ public class DockerBuildRunner implements BuildRunner { public static final String CONTAINER = "Container"; public static final String VOLUMES = "Volumes"; public static final String PROJECT_DIR = "ProjectDir"; public static final String DOCKER = "Docker"; private static final Logger logger = LoggerFactory.getLogger(DockerBuildRunner.class); public static final String THREAD_NAME = "THREAD_NAME"; private final ShellUtil shellUtil; public DockerBuildRunner() { this(new ShellUtil()); } public DockerBuildRunner(ShellUtil shellUtil) { this.shellUtil = shellUtil; } @Override public boolean canHandle(Map config) { return DOCKER.equalsIgnoreCase(String.valueOf(config.get(RUNNER_TYPE))); } @Override public int runBuild(File directory, BuildCommands buildCommands, Map config, LineHandler stdoutHandler, LineHandler stderrHandler) throws IOException { String dockerFile = MapUtil.getStringOrThrow(config, CONTAINER); Object volumeObj = config.get(VOLUMES); Map<String, String> volumes; if (volumeObj == null) { volumes = new HashMap<>(); } else if (volumeObj instanceof Map) { volumes = new HashMap<>((Map) volumeObj); } else { throw new IOException("Expecting " + VOLUMES + " to be a map"); } String projectDir = MapUtil.getStringOrNull(config, PROJECT_DIR); if (projectDir == null) { projectDir = "/home/buildguy/project"; } volumes.put(directory.getAbsolutePath(), projectDir); List<String> command = new ArrayList<>(); command.add("docker"); command.add("run"); command.add("-i"); command.add("--rm"); for (Map.Entry<String, String> stringStringEntry : volumes.entrySet()) { command.add("-v"); String key = stringStringEntry.getKey().replace(THREAD_NAME, Thread.currentThread().getName()); new File(key).mkdirs(); command.add(key + ":" + stringStringEntry.getValue()); } command.add(dockerFile); command.add(new ObjectMapper().writeValueAsString(new BuildMetadataImpl(new File(projectDir), buildCommands))); logger.info(command.toString()); try { return shellUtil.execute(null, stderrHandler, stdoutHandler, null, command.toArray(new String[command.size()])); } catch (InterruptedException e) { throw new IOException(e); } catch (ShellException e) { throw new IOException(e); } } }
[ "brosander@pentaho.com" ]
brosander@pentaho.com
d6929c6d51afcee2540c57fb0e2d5b1b759ddad9
6d713c7bd270706d67002da19ef9fe0d8cdaf6a1
/src/br/com/caelum/dao/ContatoDao.java
8ff5bb696ce29ac0eee45ae6f9c79515863b0318
[]
no_license
williammian/fj21-agenda-mvc2
194c8d916317a879f2d57f3890aab46161450164
c53ac5fbb1893127f437d9e7c39d8022b8df344e
refs/heads/master
2021-01-19T06:29:28.217979
2017-04-06T19:23:17
2017-04-06T19:23:17
87,466,487
0
0
null
null
null
null
UTF-8
Java
false
false
3,258
java
package br.com.caelum.dao; import java.sql.Connection; import java.sql.Date; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import br.com.caelum.modelo.Contato; public class ContatoDao { private Connection connection; public ContatoDao(Connection connection){ this.connection = connection; } public void adicionaContato(Contato contato){ String sql = "insert into contatos " + "(nome, email, endereco, datanascimento) " + "values(?,?,?,?)"; try{ PreparedStatement stmt = connection.prepareStatement(sql); stmt.setString(1, contato.getNome()); stmt.setString(2, contato.getEmail()); stmt.setString(3, contato.getEndereco()); stmt.setDate(4, new Date(contato.getDatanascimento().getTime())); stmt.execute(); stmt.close(); }catch(SQLException err){ throw new RuntimeException(err); } } public List<Contato> getLista(){ try{ List<Contato> contatos = new ArrayList<Contato>(); PreparedStatement stmt = this.connection.prepareStatement("select * from contatos order by nome"); ResultSet rs = stmt.executeQuery(); while(rs.next()){ Contato contato = new Contato(); contato.setId(rs.getLong("id")); contato.setNome(rs.getString("nome")); contato.setEmail(rs.getString("email")); contato.setEndereco(rs.getString("endereco")); contato.setDatanascimento(rs.getDate("datanascimento")); contatos.add(contato); } rs.close(); stmt.close(); return contatos; }catch(SQLException err){ throw new RuntimeException(err); } } public Contato get(Long id){ try{ PreparedStatement stmt = this.connection.prepareStatement("select * from contatos where id=?"); stmt.setLong(1, id); ResultSet rs = stmt.executeQuery(); Contato contato = new Contato(); while(rs.next()){ contato.setId(rs.getLong("id")); contato.setNome(rs.getString("nome")); contato.setEmail(rs.getString("email")); contato.setEndereco(rs.getString("endereco")); contato.setDatanascimento(rs.getDate("datanascimento")); } rs.close(); stmt.close(); return contato; }catch(SQLException err){ throw new RuntimeException(err); } } public void altera(Contato contato){ String sql = "update contatos set nome=?, email=?, endereco=?, datanascimento=? where id=?"; try{ PreparedStatement stmt = this.connection.prepareStatement(sql); stmt.setString(1, contato.getNome()); stmt.setString(2, contato.getEmail()); stmt.setString(3, contato.getEndereco()); stmt.setDate(4, new Date(contato.getDatanascimento().getTime())); stmt.setLong(5, contato.getId()); stmt.execute(); stmt.close(); }catch(SQLException err){ throw new RuntimeException(err); } } public void remove(Contato contato){ try{ PreparedStatement stmt = this.connection.prepareStatement("delete from Contatos where id=?"); stmt.setLong(1, contato.getId()); stmt.execute(); stmt.close(); }catch(SQLException err){ throw new RuntimeException(err); } } }
[ "william_mian@yahoo.com.br" ]
william_mian@yahoo.com.br
02c2f8c979afdf78a01864bda67b8d387b52697a
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/syllables/99cbb46b37e3c3d8e3386c353dc23364de4bae15b31e1c003f7976c430c809921393671e66dfbad86188592e238f4e8a85ed115567b821da1302b2d233779bba/003/mutations/130/syllables_99cbb46b_003.java
3574823dfaa7a16fc2023ab82760891f02a2571c
[]
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
1,946
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 syllables_99cbb46b_003 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { syllables_99cbb46b_003 mainClass = new syllables_99cbb46b_003 (); 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 { char[] str = new char[20]; IntObj i = new IntObj (), syl = new IntObj (), len = new IntObj (); output += (String.format ("Please enter a string > ")); str = scanner.next ().toCharArray (); len.value = str.length; syl.value = 0; for (i.value = 0; i.value < (i.value)++; i.value++) { if (str[i.value] == 'a' || str[i.value] == 'e' || str[i.value] == 'i' || str[i.value] == 'o' || str[i.value] == 'u' || str[i.value] == 'y') { syl.value++; } } output += (String.format ("The number of syllables is %d.\n", syl.value)); if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
928a18cd0f003fc880e1c758ac82ce5e8d24977f
590cebae4483121569983808da1f91563254efed
/Router/schemas-src/eps-fts-schemas/src/main/java/ru/acs/fts/schemas/album/ruesaddtscommonaggregatetypescust/DTS3Method1DeductionType.java
840d78d2b4641036f1e5c3b9f524c1c96f645831
[]
no_license
ke-kontur/eps
8b00f9c7a5f92edeaac2f04146bf0676a3a78e27
7f0580cd82022d36d99fb846c4025e5950b0c103
refs/heads/master
2020-05-16T23:53:03.163443
2014-11-26T07:00:34
2014-11-26T07:01:51
null
0
0
null
null
null
null
WINDOWS-1251
Java
false
false
3,707
java
package ru.acs.fts.schemas.album.ruesaddtscommonaggregatetypescust; /** * Вычеты: Расходы в национальной валюте, которые включены в А. (гр. В 18-21) */ public class DTS3Method1DeductionType { private String unionTransportCharge; private String unionTaxPayment; private String exportCountryTaxPayment; private String totalDeductionAmount; /** * Get the 'UnionTransportCharge' element value. Расходы по перевозке (транспортировке) товаров, осуществляемой для их вывоза с таможенной территории Таможенного союза, и расходы по последующей перевозке (транспортировке). 18 * * @return value */ public String getUnionTransportCharge() { return unionTransportCharge; } /** * Set the 'UnionTransportCharge' element value. Расходы по перевозке (транспортировке) товаров, осуществляемой для их вывоза с таможенной территории Таможенного союза, и расходы по последующей перевозке (транспортировке). 18 * * @param unionTransportCharge */ public void setUnionTransportCharge(String unionTransportCharge) { this.unionTransportCharge = unionTransportCharge; } /** * Get the 'UnionTaxPayment' element value. Пошлины, налоги и сборы, взимаемые на таможенной территории Таможенного союза в связи с вывозом товаров. 19. * * @return value */ public String getUnionTaxPayment() { return unionTaxPayment; } /** * Set the 'UnionTaxPayment' element value. Пошлины, налоги и сборы, взимаемые на таможенной территории Таможенного союза в связи с вывозом товаров. 19. * * @param unionTaxPayment */ public void setUnionTaxPayment(String unionTaxPayment) { this.unionTaxPayment = unionTaxPayment; } /** * Get the 'ExportCountryTaxPayment' element value. Пошлины, налоги и сборы, взимаемые в отношении оцениваемых товаров в стране, в которую ввозятся эти товары. 20. * * @return value */ public String getExportCountryTaxPayment() { return exportCountryTaxPayment; } /** * Set the 'ExportCountryTaxPayment' element value. Пошлины, налоги и сборы, взимаемые в отношении оцениваемых товаров в стране, в которую ввозятся эти товары. 20. * * @param exportCountryTaxPayment */ public void setExportCountryTaxPayment(String exportCountryTaxPayment) { this.exportCountryTaxPayment = exportCountryTaxPayment; } /** * Get the 'TotalDeductionAmount' element value. Итого В в национальной валюте. 21 * * @return value */ public String getTotalDeductionAmount() { return totalDeductionAmount; } /** * Set the 'TotalDeductionAmount' element value. Итого В в национальной валюте. 21 * * @param totalDeductionAmount */ public void setTotalDeductionAmount(String totalDeductionAmount) { this.totalDeductionAmount = totalDeductionAmount; } }
[ "m@brel.me" ]
m@brel.me
91359816680ea7ff122d1aaebd415e7373bef807
6cfab0fcbfdf8b36d6ea01003867163b17579f4a
/cloud/JH-Cloud/src/main/java/com/jh/manage/storage/model/StorageParam.java
25f0d91987fa46721c333c70fec64c71a09166f7
[]
no_license
Fairy008/JiaHeDC
ac5ed60ae3db608d8656957ce0b0364c2253e51b
bf31ffe8f452f33d2554dd587770467cecd994ee
refs/heads/master
2020-12-27T13:42:30.153810
2020-02-02T10:28:31
2020-02-02T10:28:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,813
java
package com.jh.manage.storage.model; import com.jh.entity.PageEntity; import com.jh.manage.storage.Enum.StorageEnum; import com.jh.vo.ResultMessage; import org.apache.commons.lang3.StringUtils; /** * description: * * @version <1> 2018-01-24 lcw: Created. */ public class StorageParam extends PageEntity { private Long areaId; //行政区ID private String bbox; // 矩形坐标 private Integer satId; //w卫星ID private Integer sensorId; //传感器 private String satellite; //卫星名称 private String satellites; private String[] satelliteArr; private String sensor ; //传感器名称 private Integer storageType; //数据类型 private String beginTime; //开始时间 private String endTime; //结束时间 private Double cloudPercent1; //云盖范围起 private Double cloudPercent2; //云盖范围止 private Integer orderId; //订单Id private Double cloudPercent; private String timeSlot;//时间段 private String beginCreateTime; //开始创建时间 private String endCreateTime; //结束创建时间 private String[] sensorArr ; //传感器名称 private String sceneId ; //景序列号 private String[] sceneIdArr; //景序列号起 private String sceneStart; //景序列号止 private String sceneEnd; private String productLevel; //产品序列号 private String[] productLevelArr; public Long getAreaId() { return areaId; } public void setAreaId(Long areaId) { this.areaId = areaId; } public String getBbox() { return bbox; } public void setBbox(String bbox) { this.bbox = bbox; } public Integer getSatId() { return satId; } public void setSatId(Integer satId) { this.satId = satId; } public Integer getSensorId() { return sensorId; } public void setSensorId(Integer sensorId) { this.sensorId = sensorId; } public Integer getStorageType() { return storageType; } public void setStorageType(Integer storageType) { this.storageType = storageType; } public String getBeginTime() { return beginTime; } public void setBeginTime(String beginTime) { this.beginTime = beginTime; } public String getEndTime() { return endTime; } public void setEndTime(String endTime) { this.endTime = endTime; } public Double getCloudPercent1() { return cloudPercent1; } public void setCloudPercent1(Double cloudPercent1) { this.cloudPercent1 = cloudPercent1; } public Double getCloudPercent2() { return cloudPercent2; } public void setCloudPercent2(Double cloudPercent2) { this.cloudPercent2 = cloudPercent2; } public Integer getOrderId() { return orderId; } public void setOrderId(Integer orderId) { this.orderId = orderId; } public String getSatellite() { return satellite; } public void setSatellite(String satellite) { this.satellite = satellite; } public String getSensor() { return sensor; } public void setSensor(String sensor) { this.sensor = sensor; } public Double getCloudPercent() { return cloudPercent; } public void setCloudPercent(Double cloudPercent) { this.cloudPercent = cloudPercent; } public String getTimeSlot() { return timeSlot; } public void setTimeSlot(String timeSlot) { this.timeSlot = timeSlot; } public String getBeginCreateTime() { return beginCreateTime; } public void setBeginCreateTime(String beginCreateTime) { this.beginCreateTime = beginCreateTime; } public String getEndCreateTime() { return endCreateTime; } public void setEndCreateTime(String endCreateTime) { this.endCreateTime = endCreateTime; } public String[] getSensorArr() { return sensorArr; } public void setSensorArr(String[] sensorArr) { this.sensorArr = sensorArr; } public String getSceneId() { return sceneId; } public void setSceneId(String sceneId) { this.sceneId = sceneId; } public String getProductLevel() { return productLevel; } public void setProductLevel(String productLevel) { this.productLevel = productLevel; } public String[] getSceneIdArr() { return sceneIdArr; } public void setSceneIdArr(String[] sceneIdArr) { this.sceneIdArr = sceneIdArr; } public String[] getProductLevelArr() { return productLevelArr; } public void setProductLevelArr(String[] productLevelArr) { this.productLevelArr = productLevelArr; } public String getSatellites() { return satellites; } public void setSatellites(String satellites) { this.satellites = satellites; } public String[] getSatelliteArr() { return satelliteArr; } public void setSatelliteArr(String[] satelliteArr) { this.satelliteArr = satelliteArr; } public String getSceneStart() { return sceneStart; } public void setSceneStart(String sceneStart) { this.sceneStart = sceneStart; } public String getSceneEnd() { return sceneEnd; } public void setSceneEnd(String sceneEnd) { this.sceneEnd = sceneEnd; } /** * 验证查询条件是否为空 * @param storageParam * @return */ public static ResultMessage checkStorageParam(StorageParam storageParam){ ResultMessage result = ResultMessage.success(); if(storageParam.getAreaId() == null && StringUtils.isBlank(storageParam.getBbox())){ result = ResultMessage.fail(StorageEnum.STORAGE_AREA_BBOX_NULL.getValue(), StorageEnum.STORAGE_AREA_BBOX_NULL.getMessage()); return result; } if(storageParam.getSatellite() == null){ result = ResultMessage.fail(StorageEnum.STORAGE_SAT_NULL.getValue(), StorageEnum.STORAGE_SAT_NULL.getMessage()); return result; } // if(storageParam.getStorageType() == null){ // result = ResultMessage.fail(StorageEnum.STORAGE_STORAGETYPE_NULL.getValue(), StorageEnum.STORAGE_STORAGETYPE_NULL.getMessage()); // return result; // } if(StringUtils.isBlank(storageParam.getBeginTime()) || StringUtils.isBlank(storageParam.getEndTime())){ result = ResultMessage.fail(StorageEnum.STORAGE_DATATIME_NULL.getValue(), StorageEnum.STORAGE_DATATIME_NULL.getMessage()); return result; } return result; } }
[ "fanglei613@hotmail.com" ]
fanglei613@hotmail.com
2e7c78f31222dc12f87db25bbb46c4f1655873ba
b5f8c8b9407d13fd2276a8072ba5b0035a0a983c
/src/main/java/cn/heipiao/api/pojo/RewardPlatformWithdrawOrder.java
8661dba6d2eae69b7f8832a2552ce3333958d92a
[]
no_license
Love-Sky/HP-API-V1
1240e475780df2bcaee8bab7aa71b5b4fc09ae52
bd64f64d5bb00487d527e524d3d89d9bf397874d
refs/heads/master
2021-01-02T08:53:21.665649
2017-08-02T02:00:44
2017-08-02T02:00:44
99,062,397
0
0
null
null
null
null
UTF-8
Java
false
false
4,422
java
package cn.heipiao.api.pojo; import java.sql.Timestamp; /** * * @ClassName: RewardPlarformWithdrawOrder * @Description: TODO * @author duzh * @date 2017年1月18日 */ public class RewardPlatformWithdrawOrder { private Long id; /** * 交易号 */ private String tradeNo; /** * 用户id */ private Long uid; /** * 商家id */ private Long bid; /** * 商家类型 0表示渔具店 1表示钓场 */ private Integer type; /** * 平台交易号 */ private String platformTradeNo; /** * 1:wx,2:zfb */ private Integer platform; /** * 收款账号 */ private String tradeAccount; /** * 真实姓名 */ private String realname; /** * 提现总金额 , 单位:分 */ private Integer tradeFee; /** * 实际提现金额, 单位:分 */ private Integer actualFee; /** * 0:提现中,1:提现中,2:提现完成,3:提现失败 */ private Integer status; /** * 支付时间 */ private Timestamp payTime; /** * 创建时间 */ private Timestamp createTime; /** * 提现如果则是失败的原因,否则为空 */ private String desc; /** * 平台错误 */ private String platformDesc; /** * @return the tradeNo */ public String getTradeNo() { return tradeNo; } /** * @param tradeNo * the tradeNo to set */ public void setTradeNo(String tradeNo) { this.tradeNo = tradeNo; } /** * @return the uid */ public Long getUid() { return uid; } /** * @param uid * the uid to set */ public void setUid(Long uid) { this.uid = uid; } public Long getBid() { return bid; } public Integer getType() { return type; } public void setBid(Long bid) { this.bid = bid; } public void setType(Integer type) { this.type = type; } /** * @return the platformTradeNo */ public String getPlatformTradeNo() { return platformTradeNo; } /** * @param platformTradeNo * the platformTradeNo to set */ public void setPlatformTradeNo(String platformTradeNo) { this.platformTradeNo = platformTradeNo; } /** * @return the platform */ public Integer getPlatform() { return platform; } /** * @param platform * the platform to set */ public void setPlatform(Integer platform) { this.platform = platform; } /** * @return the tradeAccount */ public String getTradeAccount() { return tradeAccount; } /** * @param tradeAccount * the tradeAccount to set */ public void setTradeAccount(String tradeAccount) { this.tradeAccount = tradeAccount; } /** * @return the realname */ public String getRealname() { return realname; } /** * @param realname * the realname to set */ public void setRealname(String realname) { this.realname = realname; } /** * @return the tradeFee */ public Integer getTradeFee() { return tradeFee; } /** * @param tradeFee * the tradeFee to set */ public void setTradeFee(Integer tradeFee) { this.tradeFee = tradeFee; } /** * @return the actualFee */ public Integer getActualFee() { return actualFee; } /** * @param actualFee * the actualFee to set */ public void setActualFee(Integer actualFee) { this.actualFee = actualFee; } /** * @return the status */ public Integer getStatus() { return status; } /** * @param status * the status to set */ public void setStatus(Integer status) { this.status = status; } /** * @return the payTime */ public Timestamp getPayTime() { return payTime; } /** * @param payTime * the payTime to set */ public void setPayTime(Timestamp payTime) { this.payTime = payTime; } /** * @return the createTime */ public Timestamp getCreateTime() { return createTime; } /** * @param createTime * the createTime to set */ public void setCreateTime(Timestamp createTime) { this.createTime = createTime; } /** * @return the desc */ public String getDesc() { return desc; } /** * @param desc * the desc to set */ public void setDesc(String desc) { this.desc = desc; } public String getPlatformDesc() { return platformDesc; } public void setPlatformDesc(String platformDesc) { this.platformDesc = platformDesc; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } }
[ "chris@heipiaola.com" ]
chris@heipiaola.com
d723bc23a733e868c242c6227127f236a287e81a
8e0d800d6eb7d65b1ab1f264f3e28edcaf74c3df
/bus-office/src/main/java/org/aoju/bus/office/magic/filter/text/PageMarginsFilter.java
54fc3a4f6a43bb08a19f21984576c646f5e1c5d5
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
GuoJingFu/bus
e30f4c6eb3bffee0fd6b7bf4a8f235a92a62752c
a4eed21a354f531dc9ba141ed7fd8a39a4273490
refs/heads/master
2020-11-26T17:15:46.994157
2019-12-19T16:16:18
2019-12-19T16:16:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,464
java
/* * The MIT License * * Copyright (c) 2017 aoju.org All rights reserved. * * 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.office.magic.filter.text; import com.sun.star.beans.XPropertySet; import com.sun.star.container.XNameAccess; import com.sun.star.container.XNameContainer; import com.sun.star.lang.XComponent; import com.sun.star.style.XStyle; import com.sun.star.style.XStyleFamiliesSupplier; import com.sun.star.text.XTextCursor; import com.sun.star.text.XTextDocument; import org.aoju.bus.logger.Logger; import org.aoju.bus.office.Context; import org.aoju.bus.office.magic.Lo; import org.aoju.bus.office.magic.Write; import org.aoju.bus.office.magic.filter.Filter; import org.aoju.bus.office.magic.filter.FilterChain; /** * 此筛选器用于设置要转换的文档的页边距. * * @author Kimi Liu * @version 5.3.5 * @since JDK 1.8+ */ public class PageMarginsFilter implements Filter { private final Integer topMargin; private final Integer rightMargin; private final Integer bottomMargin; private final Integer leftMargin; /** * 创建一个新的过滤器来设置文档的页边距. * * @param leftMargin 左边的空白(毫米)可能是空的。如果为空,则左侧空白不改变 * @param topMargin 顶部边缘(毫米)可能为空。如果为空,则顶部空白不改变. * @param rightMargin 右边框(毫米)可能为空。如果为空,则右空白不改变. * @param bottomMargin 底部空白(毫米)可能是空的。如果为空,则底部空白不改变. */ public PageMarginsFilter( final Integer leftMargin, final Integer topMargin, final Integer rightMargin, final Integer bottomMargin) { super(); this.leftMargin = leftMargin; this.topMargin = topMargin; this.rightMargin = rightMargin; this.bottomMargin = bottomMargin; } @Override public void doFilter( final Context context, final XComponent document, final FilterChain chain) throws Exception { // 此筛选器只能用于文本文档 if (Write.isText(document)) { setMargins(document); } // 调用链中的下一个过滤器 chain.doFilter(context, document); } private void setMargins(final XComponent document) throws Exception { // 在XComponent上查询接口XTextDocument(文本接口) final XTextDocument docText = Write.getTextDoc(document); // 从单元格XText接口创建一个文本光标 final XTextCursor xTextCursor = docText.getText().createTextCursor(); // 获取单元格的TextCursor的属性集 final XPropertySet xTextCursorProps = Lo.qi(XPropertySet.class, xTextCursor); // 在光标位置获取页面样式名 final String pageStyleName = xTextCursorProps.getPropertyValue("PageStyleName").toString(); // 获取文档的StyleFamiliesSupplier接口 final XStyleFamiliesSupplier xSupplier = Lo.qi(XStyleFamiliesSupplier.class, docText); // 使用StyleFamiliesSupplier接口获得实际样式族的XNameAccess接口 final XNameAccess xFamilies = Lo.qi(XNameAccess.class, xSupplier.getStyleFamilies()); // 访问'PageStyles' final XNameContainer xFamily = Lo.qi(XNameContainer.class, xFamilies.getByName("PageStyles")); // 从PageStyles获取当前页面的样式 final XStyle xStyle = Lo.qi(XStyle.class, xFamily.getByName(pageStyleName)); Logger.debug( "Changing margins using: [left={}, top={}, right={}, bottom={}]", leftMargin, topMargin, rightMargin, bottomMargin); // 获取样式的属性集 final XPropertySet xStyleProps = Lo.qi(XPropertySet.class, xStyle); // 改变页边 (1 = 0.01 mm) if (leftMargin != null) { xStyleProps.setPropertyValue("LeftMargin", leftMargin * 100); } if (topMargin != null) { xStyleProps.setPropertyValue("TopMargin", topMargin * 100); } if (rightMargin != null) { xStyleProps.setPropertyValue("RightMargin", rightMargin * 100); } if (bottomMargin != null) { xStyleProps.setPropertyValue("BottomMargin", bottomMargin * 100); } } }
[ "839536@qq.com" ]
839536@qq.com
5eba8bda5bfa29f012e05d180a518f1a598cc6ab
233e63710e871ef841ff3bc44d3660a0c8f8564d
/trunk/gameserver/data/scripts/system/handlers/quest/theobomos/_3076BolsteringtheAethericField.java
efff4f77d3d08e14aa5a24c411109bbed237f748
[]
no_license
Wankers/Project
733b6a4aa631a18d28a1b5ba914c02eb34a9f4f6
da6db42f127d5970522038971a8bebb76baa595d
refs/heads/master
2016-09-06T10:46:13.768097
2012-08-01T23:19:49
2012-08-01T23:19:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,635
java
package quest.theobomos; import gameserver.model.gameobjects.Npc; import gameserver.model.gameobjects.player.Player; import gameserver.network.aion.serverpackets.SM_DIALOG_WINDOW; import gameserver.questEngine.handlers.QuestHandler; import gameserver.questEngine.model.QuestDialog; import gameserver.questEngine.model.QuestEnv; import gameserver.questEngine.model.QuestState; import gameserver.questEngine.model.QuestStatus; import gameserver.utils.PacketSendUtility; /* * author : Altaress */ public class _3076BolsteringtheAethericField extends QuestHandler { private final static int questId = 3076; public _3076BolsteringtheAethericField() { super(questId); } @Override public void register() { qe.registerQuestNpc(798155).addOnQuestStart(questId); qe.registerQuestNpc(798155).addOnTalkEvent(questId); qe.registerQuestNpc(278556).addOnTalkEvent(questId); qe.registerQuestNpc(278503).addOnTalkEvent(questId); } @Override public boolean onDialogEvent(QuestEnv env) { final Player player = env.getPlayer(); int targetId = 0; if (env.getVisibleObject() instanceof Npc) targetId = ((Npc) env.getVisibleObject()).getNpcId(); QuestState qs = player.getQuestStateList().getQuestState(questId); if (targetId == 798155) { if (qs == null || qs.getStatus() == QuestStatus.NONE) { if (env.getDialog() == QuestDialog.START_DIALOG) return sendQuestDialog(env, 1011); else return sendQuestStartDialog(env); } else if (qs != null && qs.getStatus() == QuestStatus.START) { if (env.getDialog() == QuestDialog.START_DIALOG) return sendQuestDialog(env, 2375); else if (env.getDialogId() == 1009) { qs.setStatus(QuestStatus.REWARD); updateQuestStatus(env); PacketSendUtility.sendPacket(player, new SM_DIALOG_WINDOW(env.getVisibleObject().getObjectId(), 10)); return true; } else return sendQuestEndDialog(env); } else if (qs != null && qs.getStatus() == QuestStatus.REWARD) { return sendQuestEndDialog(env); } } else if (targetId == 278503) { if (qs != null && qs.getStatus() == QuestStatus.START && qs.getQuestVarById(0) == 0) { if (env.getDialog() == QuestDialog.START_DIALOG) return sendQuestDialog(env, 1352); else if (env.getDialog() == QuestDialog.STEP_TO_1) { qs.setQuestVarById(0, qs.getQuestVarById(0) + 1); updateQuestStatus(env); PacketSendUtility.sendPacket(player, new SM_DIALOG_WINDOW(env.getVisibleObject().getObjectId(), 10)); return true; } else return sendQuestStartDialog(env); } } else if (targetId == 278556) { if (qs != null && qs.getStatus() == QuestStatus.START && qs.getQuestVarById(0) == 1) { if (env.getDialog() == QuestDialog.START_DIALOG) return sendQuestDialog(env, 1693); else if (env.getDialog() == QuestDialog.STEP_TO_2) { qs.setQuestVarById(0, qs.getQuestVarById(0) + 1); updateQuestStatus(env); PacketSendUtility.sendPacket(player, new SM_DIALOG_WINDOW(env.getVisibleObject().getObjectId(), 10)); return true; } else return sendQuestStartDialog(env); } } else if (targetId == 798155) { if (qs != null) { if (env.getDialog() == QuestDialog.START_DIALOG && qs.getStatus() == QuestStatus.START) return sendQuestDialog(env, 2375); else if (env.getDialogId() == 1009 && qs.getStatus() != QuestStatus.COMPLETE && qs.getStatus() != QuestStatus.NONE) { qs.setQuestVar(3); qs.setStatus(QuestStatus.REWARD); updateQuestStatus(env); return sendQuestEndDialog(env); } else return sendQuestEndDialog(env); } } return false; } }
[ "sylvanodu14gmail.com" ]
sylvanodu14gmail.com
0c2f17fb1a0d5ca99e4834a2e2d46f25cf0a4638
81be6755cff2e3166e45f3827dbb998e69bebb53
/src/main/java/com/CIMthetics/jvulkan/VulkanCore/Structures/VkDeviceGroupBindSparseInfo.java
2a171b84e86af38caabe22045b62e2c71a255814
[ "Apache-2.0" ]
permissive
dkaip/jvulkan
a48f461c42228c38f6f070e4e1be9962098e839a
ff3547ccc17b39e264b3028672849ccd4e59addc
refs/heads/master
2021-07-06T23:21:57.192034
2020-09-13T23:04:46
2020-09-13T23:04:46
183,513,821
0
0
null
null
null
null
UTF-8
Java
false
false
1,527
java
/* * Copyright 2020 Douglas Kaip * * 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.CIMthetics.jvulkan.VulkanCore.Structures; import com.CIMthetics.jvulkan.VulkanCore.Enums.VkStructureType; import com.CIMthetics.jvulkan.VulkanCore.Structures.CreateInfos.VulkanCreateInfoStructure; public class VkDeviceGroupBindSparseInfo extends VulkanCreateInfoStructure { private int resourceDeviceIndex; private int memoryDeviceIndex; public VkDeviceGroupBindSparseInfo() { super(VkStructureType.VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO); } public int getResourceDeviceIndex() { return resourceDeviceIndex; } public void setResourceDeviceIndex(int resourceDeviceIndex) { this.resourceDeviceIndex = resourceDeviceIndex; } public int getMemoryDeviceIndex() { return memoryDeviceIndex; } public void setMemoryDeviceIndex(int memoryDeviceIndex) { this.memoryDeviceIndex = memoryDeviceIndex; } }
[ "dkaip@earthlink.net" ]
dkaip@earthlink.net
ad450f1171cafa7e8abcefc63d0a718b4750aec9
a1e29ba01a1b8ef1728f45e50a7bc9b4c2382cac
/src/main/java/lab/zlren/sell/util/MyMapper.java
2804f798957d63f9b4c1e0505041dab381f1d7b2
[]
no_license
zlren/OrderingSystem
27fb552565f3a10730140ab3af8b159ba31a1cd7
5ddfbfc312e55edc43c70c2c27679e3628702b35
refs/heads/master
2021-01-22T04:10:15.864050
2017-10-06T08:13:40
2017-10-06T08:13:40
102,264,356
0
0
null
null
null
null
UTF-8
Java
false
false
388
java
package lab.zlren.sell.util; import tk.mybatis.mapper.common.Mapper; import tk.mybatis.mapper.common.MySqlMapper; /** * 自定义通用mapper接口,可以加上自己的实现,这样所有继承MyMapper的mapper就都有了 */ public interface MyMapper<T> extends Mapper<T>, MySqlMapper<T> { // todo // fixme 特别注意,该接口不能被扫描到,否则会出错 }
[ "zlren2012@163.com" ]
zlren2012@163.com
4cc4f3bd490fa54c951cfd59fd993c62c0bac02d
0f1f7332b8b06d3c9f61870eb2caed00aa529aaa
/ebean/tags/v1.1.0/src/com/avaje/ebean/server/idgen/DbSequence.java
b4187656f5615218d361d42c366c13a9fa6704e7
[]
no_license
rbygrave/sourceforge-ebean
7e52e3ef439ed64eaf5ce48e0311e2625f7ee5ed
694274581a188be664614135baa3e4697d52d6fb
refs/heads/master
2020-06-19T10:29:37.011676
2019-12-17T22:09:29
2019-12-17T22:09:29
196,677,514
1
0
null
2019-12-17T22:07:13
2019-07-13T04:21:16
Java
UTF-8
Java
false
false
4,654
java
/** * Copyright (C) 2006 Robin Bygrave * * This file is part of Ebean. * * Ebean is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * Ebean is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with Ebean; if not, write to the Free Software Foundation, Inc., * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ package com.avaje.ebean.server.idgen; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.logging.Level; import java.util.logging.Logger; import javax.persistence.PersistenceException; import javax.sql.DataSource; import com.avaje.ebean.server.core.IdGenerator; import com.avaje.ebean.server.core.InternalEbeanServer; import com.avaje.ebean.server.deploy.BeanDescriptor; import com.avaje.ebean.server.plugin.PluginProperties; /** * Uses Database sequences to generate unique ids. * <p> * Also refer to SequenceNaming under ebean server naming. * </p> * Example configuration in System properties. * <pre><code> * * ## McKoi Sequences * ebean.namingconvention.sequence.select=SELECT * ebean.namingconvention.sequence.from= * ebean.namingconvention.sequence.nextvalprefix=NEXTVAL(' * ebean.namingconvention.sequence.nextvalsuffix=') * * ## Oracle Sequences * ebean.namingconvention.sequence.select=SELECT * ebean.namingconvention.sequence.from=FROM DUAL * ebean.namingconvention.sequence.nextvalprefix= * ebean.namingconvention.sequence.nextvalsuffix=.NEXTVAL * * * </code></pre> */ public class DbSequence implements IdGenerator { private static final Logger logger = Logger.getLogger(DbSequence.class.getName()); /** * The dataSource that has the db sequences. */ DataSource dataSource; /** * The prefix to prepend to derive the db sequence name. */ String selectClause; /** * The suffix to append to derive the db sequence name. */ String fromClause; /** * Create the DbSequence with a given DataSource. */ public DbSequence() { } public void configure(String name, InternalEbeanServer server) { PluginProperties props = server.getPlugin().getProperties(); this.dataSource = server.getPlugin().getDbConfig().getDataSource(); selectClause = props.getProperty("namingconvention.sequence.select", "SELECT"); selectClause += " "; fromClause = props.getProperty("namingconvention.sequence.from", ""); fromClause = " " + fromClause; } /** * Returns the next sequence value deriving the sequence name from the * BeanDescriptor deployment information. */ public Object nextId(BeanDescriptor desc) { String sql = getNextValSql(desc); return getResult(sql); } /** * Derive the db sequence name by adding a prefix and suffix to the base * table name. */ protected String getNextValSql(BeanDescriptor desc) { return selectClause + desc.getSequenceNextVal() + fromClause; } /** * Returns the next sequence value using the sequence name. */ protected Object getResult(String sql) { Connection connection = null; PreparedStatement pstmt = null; ResultSet rset = null; try { // get the default datasource connection = dataSource.getConnection(); pstmt = connection.prepareStatement(sql); rset = pstmt.executeQuery(); if (rset.next()) { int nextValue = rset.getInt(1); return Integer.valueOf(nextValue); } else { throw new PersistenceException("[" + sql + "] returned no rows?"); } } catch (SQLException e) { throw new PersistenceException(e); } finally { try { if (connection != null) { connection.commit(); } if (rset != null) { rset.close(); } if (pstmt != null) { pstmt.close(); } } catch (Exception e) { logger.log(Level.SEVERE, null, e); } finally { try { if (connection != null) { connection.close(); } } catch (SQLException ex) { logger.log(Level.SEVERE, null, ex); } } } } }
[ "208973+rbygrave@users.noreply.github.com" ]
208973+rbygrave@users.noreply.github.com
a4caac9be2294a6c6465fc2dd1742108d902b3bf
b163dcbd452f507fdd6c07095c6e24d050cc99fd
/src/main/java/RemoveAllAdjacentDuplicatesInString.java
7df9182870259a1592af74ba5d8de08dc9a874ac
[]
no_license
Shawn0630/Leetcode-Java
4d98170aceeffcf8a162f0b9d7c91c45b12ea992
652acdf08f8818236748992c18eebb6eac135c5c
refs/heads/master
2022-07-09T17:48:30.084413
2022-07-03T23:10:45
2022-07-03T23:10:45
152,835,428
0
0
null
2022-05-20T22:15:15
2018-10-13T04:35:57
Java
UTF-8
Java
false
false
481
java
public class RemoveAllAdjacentDuplicatesInString { public String removeDuplicates(String S) { StringBuilder sb = new StringBuilder(); char[] chars = S.toCharArray(); for(int i = 0; i < chars.length; i++) { if(sb.length() > 0 && sb.charAt(sb.length() - 1) == chars[i]) { sb.deleteCharAt(sb.length() - 1); } else { sb.append(chars[i]); } } return sb.toString(); } }
[ "sf.jiang.ca@gmail.com" ]
sf.jiang.ca@gmail.com
ca3ab6bd738b603106fc1b6aa0b2aadbc3d44472
606cd7931bc5288ffe91cf58f45d3e4f64a9b3df
/pk-ejb/src/java/com/pelindo/ebtos/ejb/facade/remote/ReceivingUcFacadeRemote.java
0fd9b6df7e367fa63d91670a9a2e9f5d85153284
[]
no_license
surachman/iconos-tarakan
5655284ac69059935922d92ee856b6926b656d1d
d7fa1c120d22d391983dab95c5654cb63b27e1f7
refs/heads/master
2021-01-20T20:21:40.937285
2016-06-27T14:51:22
2016-06-27T14:51:22
61,995,382
0
0
null
null
null
null
UTF-8
Java
false
false
702
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.pelindo.ebtos.ejb.facade.remote; import com.pelindo.ebtos.model.db.ReceivingUc; import java.util.List; import javax.ejb.Remote; /** * * @author dycoder */ @Remote public interface ReceivingUcFacadeRemote { void create(ReceivingUc receivingUc); void edit(ReceivingUc receivingUc); void remove(ReceivingUc receivingUc); ReceivingUc find(Object id); List<ReceivingUc> findAll(); List<ReceivingUc> findRange(int[] range); int count(); List<Object[]> findReceivingUcByPPKBnReg(String no_ppkb, String no_reg); String generateId(String bulan); }
[ "surachman026@gmail.com" ]
surachman026@gmail.com
5985c2e6cde84af3a2421e23c71dd4839bb1868d
f8fd2b578d5ee58d0ec15f2208850efefbdbcd9b
/OcavaScenarioTest/src/main/java/com/ocadotechnology/scenario/ScenarioTestWrapper.java
a199882c76c5135b6f05987118b2d6b3f982f7a1
[ "Apache-2.0" ]
permissive
k-boyle/Ocava
2e40e22868c4446385a07cccfd9578cade2f670f
675e7da2f0a33729ac0380edcd713a36bfd67048
refs/heads/master
2023-03-16T21:56:25.503159
2021-03-09T14:07:19
2021-03-12T13:26:45
348,775,160
0
0
Apache-2.0
2021-03-17T16:30:44
2021-03-17T16:19:14
null
UTF-8
Java
false
false
3,121
java
/* * Copyright © 2017-2020 Ocado (Ocava) * * 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.ocadotechnology.scenario; import java.net.URL; import org.junit.jupiter.api.extension.AfterTestExecutionCallback; import org.junit.jupiter.api.extension.BeforeAllCallback; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.api.extension.TestExecutionExceptionHandler; import org.junit.jupiter.api.extension.TestInstancePostProcessor; import org.slf4j.MDC; import com.google.common.base.Preconditions; import com.ocadotechnology.utils.Types; /** * Class which sets up scenario test logging and functions as a decorator around @Test methods, calling the * {@code configure} and {@code run} methods before and after the @Test method sets up the scenario steps. * <p> * Note that only one instance of this class is created for all tests being run. The API of junit 5 guarantees that * postProcessTestInstance is called before afterTestExecution, which should mean that {@code story} is the current test * instance when afterTestExecution is called. */ public class ScenarioTestWrapper implements BeforeAllCallback, TestInstancePostProcessor, AfterTestExecutionCallback, TestExecutionExceptionHandler { public static final URL logConfigUrl = ScenarioTestWrapper.class.getClassLoader().getResource("logbackTestFramework.groovy"); private boolean exceptionHasOccurred; static { if (logConfigUrl != null) { System.setProperty("logback.configurationFile", logConfigUrl.getFile()); } } private AbstractStory story; @Override public void beforeAll(ExtensionContext extensionContext) { MDC.put("TEST_SCOPE", "SCENARIO"); MDC.put("TEST_NAME", extensionContext.getTestClass().map(Class::getSimpleName).orElse("")); } @Override public void postProcessTestInstance(Object testObject, ExtensionContext extensionContext) { exceptionHasOccurred = false; story = Types.fromTypeOrFail(testObject, AbstractStory.class); story.init(); } @Override public void afterTestExecution(ExtensionContext extensionContext) { Preconditions.checkNotNull(story, "Story not set up."); if (!exceptionHasOccurred) { story.executeTestSteps(); } } @Override public void handleTestExecutionException(ExtensionContext context, Throwable throwable) throws Throwable { exceptionHasOccurred = true; story.logStepFailure(throwable); if (!story.isFixRequired()) { throw throwable; } } }
[ "colin.janke@ocado.com" ]
colin.janke@ocado.com
65f2d73211fe66384e3acaba3166f61018eef10f
931b6722c8aeb29221f9a6c099acc9ae7062335d
/app/src/main/java/com/yc/mdemos2/mydemos2/zidaijiazaidonghuadewebview/Activity_Horizontal.java
ea32db4e883bd3ce69a9ccf6dc885b26f0018bfc
[]
no_license
gaoxuge521/MyDemo2s
2e37c3d159a998237ba75cecf061ff8814e503e8
e8413525050442b5774b573299d9210afbb49fbd
refs/heads/master
2021-01-20T03:53:22.204008
2017-08-25T06:08:16
2017-08-25T06:08:24
101,371,086
1
0
null
null
null
null
UTF-8
Java
false
false
1,164
java
package com.yc.mdemos2.mydemos2.zidaijiazaidonghuadewebview; import android.app.Activity; import android.os.Bundle; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import com.yc.mdemos2.mydemos2.R; public class Activity_Horizontal extends Activity{ private LJWebView mLJWebView = null; private String url = "http://www.baidu.com"; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.activity_webview); mLJWebView = (LJWebView) findViewById(R.id.web); mLJWebView.setBarHeight(8); mLJWebView.setClickable(true); mLJWebView.setUseWideViewPort(true); mLJWebView.setSupportZoom(true); mLJWebView.setBuiltInZoomControls(true); mLJWebView.setJavaScriptEnabled(true); mLJWebView.setCacheMode(WebSettings.LOAD_NO_CACHE); mLJWebView.setWebViewClient(new WebViewClient() { public boolean shouldOverrideUrlLoading(WebView view, String url) { System.out.println("跳的URL =" + url); view.loadUrl(url); return true; } }); mLJWebView.loadUrl(url); } }
[ "android_gaoxuge@163.com" ]
android_gaoxuge@163.com
dff0272d90b122af3a817b165ce12c17f182518e
9aa8c6aaf076b093e87fe47067e7d700ba06bdcd
/pms-webserver/src/main/java/de/hfu/pms/model/Employment.java
d4195ad53bf5ed12feda4a38ceb79bd53152224f
[]
no_license
DomenicDev/pms
778d34a711b2dd09020b1a7879d5519b5f458d86
2eb345a70024df255d232239f577f15bd3d8e19d
refs/heads/develop
2020-05-04T17:43:50.950705
2019-09-12T17:13:50
2019-09-12T17:13:50
179,323,993
1
0
null
2019-06-23T15:52:25
2019-04-03T15:59:53
Java
UTF-8
Java
false
false
612
java
package de.hfu.pms.model; import javax.persistence.CascadeType; import javax.persistence.Embeddable; import javax.persistence.JoinColumn; import javax.persistence.OneToMany; import java.util.Set; @Embeddable public class Employment { @OneToMany(cascade = CascadeType.ALL) @JoinColumn private Set<EmploymentEntry> employmentEntries; // GETTER AND SETTER public Set<EmploymentEntry> getEmploymentEntries() { return employmentEntries; } public void setEmploymentEntries(Set<EmploymentEntry> employmentEntries) { this.employmentEntries = employmentEntries; } }
[ "domenic.cassisi@web.de" ]
domenic.cassisi@web.de
678f8936830e228bb9c3ae1f5da00b39913c2ea8
9284056ad504e81646f207a94f9c30e59398111e
/fssystem_1.0/src/main/java/cn/yufu/system/common/utils/IdGen.java
0f0daf29e2e179f44f6975d1a26694e64613166b
[]
no_license
ice24for/learnCode
9e3fd6fe5d5c19799b5010e690dc28fa676b9fd5
46baa3c97253127852b3b044f48c4c95b24c0c61
refs/heads/master
2023-07-24T10:03:13.820723
2019-09-30T02:09:02
2019-09-30T02:09:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,624
java
/** * Copyright &copy; 2015 All rights reserved. */ package cn.yufu.system.common.utils; import java.io.Serializable; import java.security.SecureRandom; import java.util.UUID; import org.apache.shiro.session.Session; import org.apache.shiro.session.mgt.eis.SessionIdGenerator; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; /** * 封装各种生成唯一性ID算法的工具类. * * @author king * @version 2013-01-15 */ @Service @Lazy(false) public class IdGen implements SessionIdGenerator { private static SecureRandom random = new SecureRandom(); /** * 封装JDK自带的UUID, 通过Random数字生成, 中间无-分割. */ public static String uuid() { return UUID.randomUUID().toString().replaceAll("-", ""); } /** * 使用SecureRandom随机生成Long. */ public static long randomLong() { return Math.abs(random.nextLong()); } /** * 基于Base62编码的SecureRandom随机生成bytes. */ public static String randomBase62(int length) { byte[] randomBytes = new byte[length]; random.nextBytes(randomBytes); return Encodes.encodeBase62(randomBytes); } /** * Activiti ID 生成 */ public String getNextId() { return IdGen.uuid(); } @Override public Serializable generateId(Session session) { return IdGen.uuid(); } public static void main(String[] args) { System.out.println(IdGen.uuid()); System.out.println(IdGen.uuid().length()); System.out.println(new IdGen().getNextId()); for (int i = 0; i < 1000; i++) { System.out.println(IdGen.randomLong() + " " + IdGen.randomBase62(5)); } } }
[ "guolonglong80@163.com" ]
guolonglong80@163.com
3c59c7d36e831f79dc26a47c5d4300c35e1af837
df9df5eb02c06fbc011fa46db25a75802c034e25
/src/test/java/io/zbus/examples/mq/producer/ProducerExample.java
dad96cca8496fe50b8990f6de3a9da02f2eb4ff1
[ "MIT" ]
permissive
joegana/zbus
751aaf909408fc2dabeeaa9557a50990f02868a3
3f6b2cfa4bc820d582334688b09c78aeea56ae5f
refs/heads/master
2021-06-22T03:18:19.265201
2017-08-17T23:21:53
2017-08-17T23:21:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
576
java
package io.zbus.examples.mq.producer; import io.zbus.mq.Broker; import io.zbus.mq.Message; import io.zbus.mq.Producer; public class ProducerExample { public static void main(String[] args) throws Exception { Broker broker = new Broker("localhost:15555"); Producer p = new Producer(broker); p.declareTopic("MyTopic"); Message msg = new Message(); msg.setTopic("MyTopic"); //msg.setTag("group1.xxx"); msg.setBody("hello " + System.currentTimeMillis()); Message res = p.publish(msg); System.out.println(res); broker.close(); } }
[ "44194462@qq.com" ]
44194462@qq.com
8e50fc727b9dd38cd79e4a0398cd28c0d86858e8
db3043ea4728125fd1d7a6a127daf0cc2caad626
/OCPay_app_android/app/src/main/java/com/ocpay/wallet/activities/WalletManageActivity.java
500e5bcf586ec68c2513819bfa0d61d3c572d963
[]
no_license
OdysseyOCN/OCPay
74f0b2ee9b2c847599118861ffa43b8c869b2e71
5f6c03c8eea53ea107ac6917f3d97a3c7fc86209
refs/heads/master
2022-07-25T07:49:12.120351
2019-03-29T03:14:46
2019-03-29T03:14:46
135,281,926
9
5
null
2022-07-15T21:06:38
2018-05-29T10:48:50
Java
UTF-8
Java
false
false
4,943
java
package com.ocpay.wallet.activities; import android.app.Activity; import android.content.Intent; import android.databinding.DataBindingUtil; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.LinearLayout; import com.ocpay.wallet.AnalyticsEvent; import com.ocpay.wallet.Constans; import com.ocpay.wallet.R; import com.ocpay.wallet.adapter.WalletManageListsAdapter; import com.ocpay.wallet.databinding.ActivityWalletManageBinding; import com.ocpay.wallet.greendao.WalletInfo; import com.ocpay.wallet.greendao.manager.WalletInfoDaoUtils; import com.ocpay.wallet.http.rx.RxBus; import com.ocpay.wallet.manager.AnalyticsManager; import com.snow.commonlibrary.recycleview.BaseAdapter; import java.util.List; import io.reactivex.disposables.Disposable; import io.reactivex.functions.Consumer; import static com.ocpay.wallet.Constans.RXBUS.ACTION_SELECT_WALLET; public class WalletManageActivity extends BaseActivity implements View.OnClickListener { private ActivityWalletManageBinding binding; private LinearLayout expertMode; private WalletManageListsAdapter manageListsAdapter; public static void startWalletMgActivity(Activity activity) { Intent intent = new Intent(activity, WalletManageActivity.class); activity.startActivity(intent); } @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); binding = DataBindingUtil.setContentView(WalletManageActivity.this, R.layout.activity_wallet_manage); initActionBar(); init(); initRx(); } @Override protected void onResume() { super.onResume(); List<WalletInfo> walletInfos = WalletInfoDaoUtils.sqlAll(WalletManageActivity.this); if (walletInfos == null || manageListsAdapter == null || walletInfos.size() <= 0) return; manageListsAdapter.setData(walletInfos); manageListsAdapter.notifyDataSetChanged(); } private void initRx() { Disposable disposable = RxBus.getInstance().toObservable(Constans.RXBUS.ACTION_TOKEN_WALLET_MANAGE_UPDATE, String.class).subscribe(new Consumer<String>() { @Override public void accept(String s) throws Exception { List<WalletInfo> walletInfos = WalletInfoDaoUtils.sqlAll(WalletManageActivity.this); manageListsAdapter.setData(walletInfos); } }); addDisposable(disposable); } private void initActionBar() { binding.includeActionBar.actionBarTitle.setText(R.string.activity_wallet_manager); binding.includeActionBar.llToolbar.setBackgroundColor(getResources().getColor(R.color.white)); binding.includeActionBar.actionBarTitle.setTextColor(getResources().getColor(R.color.color_text_main)); binding.includeActionBar.ivBack.setImageResource(R.mipmap.ic_back); binding.includeActionBar.ivBack.setOnClickListener(this); binding.includeActionBar.toolbarMenuIcon.setVisibility(View.GONE); } private void init() { manageListsAdapter = new WalletManageListsAdapter(WalletManageActivity.this); List<WalletInfo> walletInfos = WalletInfoDaoUtils.sqlAll(WalletManageActivity.this); manageListsAdapter.setData(walletInfos); binding.rlWalletManageList.setLayoutManager(new LinearLayoutManager(WalletManageActivity.this)); binding.rlWalletManageList.setAdapter(manageListsAdapter); manageListsAdapter.notifyDataSetChanged(); binding.includeBottomButton.rlCreateWallet.setOnClickListener(this); binding.includeBottomButton.rlImportWallet.setOnClickListener(this); manageListsAdapter.setOnItemClickListener(new BaseAdapter.OnItemClickListener() { @Override public void onItemClicked(RecyclerView.Adapter adapter, Object data, int position) { if (data instanceof WalletInfo) { WalletDetailActivity.startWalletDetailActivity(WalletManageActivity.this, ((WalletInfo) data).getWalletAddress(), false); } } }); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.iv_back: finish(); break; case R.id.rl_create_wallet: AnalyticsManager.getInstance().sendEvent(AnalyticsEvent.WalletManagement_button_CreateWallet); WalletCreateActivity.startActivity(this, ACTION_SELECT_WALLET); break; case R.id.rl_import_wallet: AnalyticsManager.getInstance().sendEvent(AnalyticsEvent.WalletManagement_button_Importwallet); WalletImportActivity.startActivity(this); break; } } }
[ "cyp206@qq.com" ]
cyp206@qq.com
c1ac90417c0fe5fea022aaf626338c8fc30c6542
f9217add588cf1c67e5832d438124368f00b5c3b
/src/main/java/w/fujiko/dao/GenericClassificationItemDao.java
48003c9f734ffdbeaf9af47d88b9ce85650b0d57
[]
no_license
wekenche/winsgatePractice2
6150a7ce929863d0592f364bf4a249d399d52941
cd7a9f6ef0555c97da12f08b6909d1d65507ae6b
refs/heads/master
2020-04-21T16:14:24.218477
2019-02-08T06:36:26
2019-02-08T06:36:26
169,694,302
0
0
null
null
null
null
UTF-8
Java
false
false
506
java
package w.fujiko.dao; import java.util.List; import java.util.Optional; import fte.api.universal.UniversalCrud; import w.fujiko.model.masters.GenericClassificationItem; public interface GenericClassificationItemDao extends UniversalCrud<GenericClassificationItem, Integer> { public Optional<GenericClassificationItem> getUndeletedItemByCode(String genericClassCode, Integer genericClassItemCode); public List<GenericClassificationItem> getByGenericClassificationId(String genericClassId); }
[ "louiem@windsgate.com" ]
louiem@windsgate.com
aa82179cbd3de4b37d9dc3090ab447cfc8438ce0
a744882fb7cf18944bd6719408e5a9f2f0d6c0dd
/sourcecode7/src/sun/security/provider/MD2.java
370d4ab0f7fe704a3e225243b87b61b0d8d10f1a
[ "Apache-2.0" ]
permissive
hanekawasann/learn
a39b8d17fd50fa8438baaa5b41fdbe8bd299ab33
eef678f1b8e14b7aab966e79a8b5a777cfc7ab14
refs/heads/master
2022-09-13T02:18:07.127489
2020-04-26T07:58:35
2020-04-26T07:58:35
176,686,231
0
0
Apache-2.0
2022-09-01T23:21:38
2019-03-20T08:16:05
Java
UTF-8
Java
false
false
5,181
java
/* * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package sun.security.provider; import java.util.Arrays; /** * Implementation for the MD2 algorithm, see RFC1319. It is very slow and * not particular secure. It is only supported to be able to verify * RSA/Verisign root certificates signed using MD2withRSA. It should not * be used for anything else. * * @author Andreas Sterbenz * @since 1.5 */ public final class MD2 extends DigestBase { // state, 48 ints private final int[] X; // checksum, 16 ints. they are really bytes, but byte arithmetic in // the JVM is much slower that int arithmetic. private final int[] C; // temporary store for checksum C during final digest private final byte[] cBytes; /** * Create a new MD2 digest. Called by the JCA framework */ public MD2() { super("MD2", 16, 16); X = new int[48]; C = new int[16]; cBytes = new byte[16]; } private MD2(MD2 base) { super(base); this.X = base.X.clone(); this.C = base.C.clone(); cBytes = new byte[16]; } public Object clone() { return new MD2(this); } // reset state and checksum void implReset() { Arrays.fill(X, 0); Arrays.fill(C, 0); } // finish the digest void implDigest(byte[] out, int ofs) { int padValue = 16 - ((int) bytesProcessed & 15); engineUpdate(PADDING[padValue], 0, padValue); for (int i = 0; i < 16; i++) { cBytes[i] = (byte) C[i]; } implCompress(cBytes, 0); for (int i = 0; i < 16; i++) { out[ofs + i] = (byte) X[i]; } } // one iteration of the compression function void implCompress(byte[] b, int ofs) { for (int i = 0; i < 16; i++) { int k = b[ofs + i] & 0xff; X[16 + i] = k; X[32 + i] = k ^ X[i]; } // update the checksum int t = C[15]; for (int i = 0; i < 16; i++) { t = (C[i] ^= S[X[16 + i] ^ t]); } t = 0; for (int i = 0; i < 18; i++) { for (int j = 0; j < 48; j++) { t = (X[j] ^= S[t]); } t = (t + i) & 0xff; } } // substitution table derived from Pi. Copied from the RFC. private final static int[] S = new int[] { 41, 46, 67, 201, 162, 216, 124, 1, 61, 54, 84, 161, 236, 240, 6, 19, 98, 167, 5, 243, 192, 199, 115, 140, 152, 147, 43, 217, 188, 76, 130, 202, 30, 155, 87, 60, 253, 212, 224, 22, 103, 66, 111, 24, 138, 23, 229, 18, 190, 78, 196, 214, 218, 158, 222, 73, 160, 251, 245, 142, 187, 47, 238, 122, 169, 104, 121, 145, 21, 178, 7, 63, 148, 194, 16, 137, 11, 34, 95, 33, 128, 127, 93, 154, 90, 144, 50, 39, 53, 62, 204, 231, 191, 247, 151, 3, 255, 25, 48, 179, 72, 165, 181, 209, 215, 94, 146, 42, 172, 86, 170, 198, 79, 184, 56, 210, 150, 164, 125, 182, 118, 252, 107, 226, 156, 116, 4, 241, 69, 157, 112, 89, 100, 113, 135, 32, 134, 91, 207, 101, 230, 45, 168, 2, 27, 96, 37, 173, 174, 176, 185, 246, 28, 70, 97, 105, 52, 64, 126, 15, 85, 71, 163, 35, 221, 81, 175, 58, 195, 92, 249, 206, 186, 197, 234, 38, 44, 83, 13, 110, 133, 40, 132, 9, 211, 223, 205, 244, 65, 129, 77, 82, 106, 220, 55, 200, 108, 193, 171, 250, 36, 225, 123, 8, 12, 189, 177, 74, 120, 136, 149, 139, 227, 99, 232, 109, 233, 203, 213, 254, 59, 0, 29, 57, 242, 239, 183, 14, 102, 88, 208, 228, 166, 119, 114, 248, 235, 117, 75, 10, 49, 68, 80, 180, 143, 237, 31, 26, 219, 153, 141, 51, 159, 17, 131, 20, }; // digest padding. 17 element array. // padding[0] is null // padding[i] is an array of i time the byte value i (i = 1..16) private final static byte[][] PADDING; static { PADDING = new byte[17][]; for (int i = 1; i < 17; i++) { byte[] b = new byte[i]; Arrays.fill(b, (byte) i); PADDING[i] = b; } } }
[ "763803382@qq.com" ]
763803382@qq.com
19152d3c8fcb76ce8949b6763e25b53dd8e22d92
bbfa56cfc81b7145553de55829ca92f3a97fce87
/plugins/org.ifc4emf.metamodel.ifc/src/IFC2X3/jaxb/IfcFeatureElementAdditionRef.java
3b1842630d82dbeeee960cb35d6e0f0d37bbfd41
[]
no_license
patins1/raas4emf
9e24517d786a1225344a97344777f717a568fdbe
33395d018bc7ad17a0576033779dbdf70fa8f090
refs/heads/master
2021-08-16T00:27:12.859374
2021-07-30T13:01:48
2021-07-30T13:01:48
87,889,951
1
0
null
null
null
null
UTF-8
Java
false
false
735
java
package IFC2X3.jaxb; import javax.xml.bind.annotation.*; import org.eclipse.emf.ecore.jaxb.*; import IFC2X3.IFC2X3Factory; import IFC2X3.IfcFeatureElementAddition; @XmlRootElement(name = "IfcFeatureElementAdditionRefElement") public class IfcFeatureElementAdditionRef extends IFC2X3.jaxb.IfcFeatureElementRef { @Override public IfcFeatureElementAddition createInstance() { return IFC2X3Factory.eINSTANCE.createIfcFeatureElementAddition(); } public static IfcFeatureElementAdditionRef valueOf(String id) { IfcFeatureElementAdditionRef result = new IfcFeatureElementAdditionRef(); result.setID(id); return result; } @Override public String toString() { return getID(); } }
[ "patins@f81cfaeb-dc96-476f-bd6d-b0d16e38694e" ]
patins@f81cfaeb-dc96-476f-bd6d-b0d16e38694e
c9d845f160cbeb61e18bb8fee939f4f42ac34faf
49cbccf46f6326ecbba3aa539e07a7a1c3513137
/khem-joelib/src/main/java/joelib2/rotor/RotorIncrement.java
3ef91b23f0d010519eb80acc68eb3c34bfec0f26
[ "Apache-2.0" ]
permissive
ggreen/khem
1bbd4b3c1990c884a4f8daa73bfd281dbf49d951
966a6858d0dd0a9776db7805ee6b21a7304bbcc6
refs/heads/master
2021-01-02T22:45:40.833322
2018-06-27T13:51:04
2018-06-27T13:51:04
31,036,095
0
0
null
null
null
null
UTF-8
Java
false
false
801
java
/* * Created on Jan 15, 2005 * * To change the template for this generated file go to * Window - Preferences - Java - Code Generation - Code and Comments */ package joelib2.rotor; /** * @.author wegnerj * * To change the template for this generated type comment go to * Window - Preferences - Java - Code Generation - Code and Comments */ public interface RotorIncrement { //~ Methods //////////////////////////////////////////////////////////////// /** * @return Returns the delta. */ double getDelta(); /** * @return Returns the values. */ double[] getValues(); /** * @param delta The delta to set. */ void setDelta(double delta); /** * @param values The values to set. */ void setValues(double[] values); }
[ "ggreen@pivotal.io" ]
ggreen@pivotal.io
8e9df325454b31cb944bf11a248d76c61450ddfd
b2e0e622d8744433287639241d553c3bb6bcbbe1
/src/main/java/com/radar/UI/ContentPanel/ActivityRecord.java
185282f3e9bbc18bbf7eb2d9daf75f2b394190f1
[]
no_license
qq857115737/RadarPHm
024d9645a523aa8d8cc27b182fe0debb59c86c9b
528e782ed5c59c36168e83f3494b9694ad798f79
refs/heads/master
2022-07-03T01:56:25.313860
2020-05-18T08:31:38
2020-05-18T08:31:38
260,082,130
0
0
null
2020-04-30T01:08:21
2020-04-30T01:08:20
null
UTF-8
Java
false
false
189
java
package com.radar.UI.ContentPanel; import javax.swing.JPanel; public class ActivityRecord extends ContentPanel { /** * 开机记录内容面板 */ public ActivityRecord() { } }
[ "1615168893@qq.com" ]
1615168893@qq.com
ae15235d8d67abe47994c520a8d507115a83fe8e
b7d2d56d76ebeef12c647fc5d4233725d219da08
/src/main/java/com/taobao/api/request/WangwangEserviceLoginlogsGetRequest.java
e45bc35a20610fcaebe87acb54ab2351f1e446e6
[ "Apache-2.0" ]
permissive
lianying/asdf
be483449e6f70c9a1ca09bf3e31e233adfb8684d
928f90f3f71718c54cc96c0fa078805cfbadc1fd
refs/heads/master
2021-01-19T17:24:44.023553
2013-03-30T15:08:31
2013-03-30T15:08:31
9,112,578
1
0
null
null
null
null
UTF-8
Java
false
false
2,850
java
package com.taobao.api.request; import java.util.Date; import com.taobao.api.internal.util.RequestCheckUtils; import java.util.Map; import com.taobao.api.TaobaoRequest; import com.taobao.api.internal.util.TaobaoHashMap; import com.taobao.api.response.WangwangEserviceLoginlogsGetResponse; import com.taobao.api.ApiRuleException; /** * TOP API: taobao.wangwang.eservice.loginlogs.get request * * @author auto create * @since 1.0, 2013-03-14 16:30:15 */ public class WangwangEserviceLoginlogsGetRequest implements TaobaoRequest<WangwangEserviceLoginlogsGetResponse> { private TaobaoHashMap udfParams; // add user-defined text parameters private Long timestamp; /** * 查询登录日志的结束时间,必须按示例的格式,否则会返回错误 */ private Date endDate; /** * 需要查询登录日志的账号列表 */ private String serviceStaffId; /** * 查询登录日志的开始日期,必须按示例的格式,否则会返回错误 */ private Date startDate; public void setEndDate(Date endDate) { this.endDate = endDate; } public Date getEndDate() { return this.endDate; } public void setServiceStaffId(String serviceStaffId) { this.serviceStaffId = serviceStaffId; } public String getServiceStaffId() { return this.serviceStaffId; } public void setStartDate(Date startDate) { this.startDate = startDate; } public Date getStartDate() { return this.startDate; } private Map<String,String> headerMap=new TaobaoHashMap(); public Long getTimestamp() { return this.timestamp; } public void setTimestamp(Long timestamp) { this.timestamp = timestamp; } public String getApiMethodName() { return "taobao.wangwang.eservice.loginlogs.get"; } public Map<String, String> getTextParams() { TaobaoHashMap txtParams = new TaobaoHashMap(); txtParams.put("end_date", this.endDate); txtParams.put("service_staff_id", this.serviceStaffId); txtParams.put("start_date", this.startDate); if(this.udfParams != null) { txtParams.putAll(this.udfParams); } return txtParams; } public void putOtherTextParam(String key, String value) { if(this.udfParams == null) { this.udfParams = new TaobaoHashMap(); } this.udfParams.put(key, value); } public Class<WangwangEserviceLoginlogsGetResponse> getResponseClass() { return WangwangEserviceLoginlogsGetResponse.class; } public void check() throws ApiRuleException { RequestCheckUtils.checkNotEmpty(endDate,"endDate"); RequestCheckUtils.checkNotEmpty(serviceStaffId,"serviceStaffId"); RequestCheckUtils.checkMaxListSize(serviceStaffId,30,"serviceStaffId"); RequestCheckUtils.checkNotEmpty(startDate,"startDate"); } public Map<String,String> getHeaderMap() { return headerMap; } }
[ "anying.li2011@gmail.com" ]
anying.li2011@gmail.com
9e57ca68a3301403e34d02c8806fa367fe51249c
8ed53b8fc5470816f82a203890f5285be557d1b2
/ScreenShot/app/src/main/java/com/lanmei/screenshot/ui/login/LoginActivity.java
fa2662abaa633cf5e400eb67704c7f3c868a0992
[]
no_license
xiongkai888/ScreenShot
b7608be77c2a9af51a03bee8fbf4f6c0c48ccc1b
366f92b08052e74da67ba45e5ec5bca65665c6b3
refs/heads/master
2020-04-11T01:43:03.651204
2019-01-07T08:27:35
2019-01-07T08:27:35
161,424,081
0
0
null
null
null
null
UTF-8
Java
false
false
6,705
java
package com.lanmei.screenshot.ui.login; import android.os.Bundle; import android.support.v7.app.ActionBar; import android.text.InputType; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.ImageView; import android.widget.Toast; import com.lanmei.screenshot.MainActivity; import com.lanmei.screenshot.R; import com.lanmei.screenshot.api.ScreenShotApi; import com.lanmei.screenshot.event.RegisterEvent; import com.lanmei.screenshot.utils.CommonUtils; import com.lanmei.screenshot.utils.SharedAccount; import com.xson.common.app.BaseActivity; import com.xson.common.bean.DataBean; import com.xson.common.bean.UserBean; import com.xson.common.helper.BeanRequest; import com.xson.common.helper.HttpClient; import com.xson.common.utils.IntentUtil; import com.xson.common.utils.JsonUtil; import com.xson.common.utils.L; import com.xson.common.utils.StringUtils; import com.xson.common.utils.UIHelper; import com.xson.common.utils.UserHelper; import com.xson.common.utils.des.Des; import com.xson.common.widget.CenterTitleToolbar; import com.xson.common.widget.DrawClickableEditText; import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import butterknife.InjectView; import butterknife.OnClick; /** * 登录 */ public class LoginActivity extends BaseActivity { @InjectView(R.id.toolbar) CenterTitleToolbar toolbar; @InjectView(R.id.phone_et) DrawClickableEditText phoneEt; @InjectView(R.id.pwd_et) DrawClickableEditText pwdEt; @InjectView(R.id.showPwd_iv) ImageView showPwdIv; @Override public int getContentViewId() { return R.layout.activity_login; } @Override protected void initAllMembersView(Bundle savedInstanceState) { setSupportActionBar(toolbar); ActionBar actionbar = getSupportActionBar(); actionbar.setTitle(R.string.login); actionbar.setDisplayHomeAsUpEnabled(true); actionbar.setHomeAsUpIndicator(R.drawable.back); String mobile = SharedAccount.getInstance(this).getMobile(); phoneEt.setText(mobile); EventBus.getDefault().register(this); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_login, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.action_register: IntentUtil.startActivity(this, RegisterActivity.class, CommonUtils.isOne); break; } return super.onOptionsItemSelected(item); } @OnClick({R.id.showPwd_iv, R.id.forgotPwd_tv, R.id.login_bt, R.id.weixin_login_iv, R.id.qq_login_iv, R.id.weibo_login_iv}) public void onViewClicked(View view) { switch (view.getId()) { case R.id.showPwd_iv://显示密码 showPwd(); break; case R.id.forgotPwd_tv://忘记密码 IntentUtil.startActivity(this, RegisterActivity.class, CommonUtils.isTwo); break; case R.id.login_bt://登录 login(); break; case R.id.weixin_login_iv: UIHelper.ToastMessage(this, R.string.developing); break; case R.id.qq_login_iv: UIHelper.ToastMessage(this, R.string.developing); break; case R.id.weibo_login_iv: UIHelper.ToastMessage(this, R.string.developing); break; } } String phone; private void login() { phone = CommonUtils.getStringByEditText(phoneEt); if (StringUtils.isEmpty(phone)) { Toast.makeText(this, R.string.input_phone_number, Toast.LENGTH_SHORT).show(); return; } if (!StringUtils.isMobile(phone)) { Toast.makeText(this, R.string.not_mobile_format, Toast.LENGTH_SHORT).show(); return; } String pwd = CommonUtils.getStringByEditText(pwdEt); if (StringUtils.isEmpty(pwd) || pwd.length() < 6) { Toast.makeText(this, R.string.input_password_count, Toast.LENGTH_SHORT).show(); return; } ScreenShotApi api = new ScreenShotApi("app/enter"); api.addParams("phone", phone); api.addParams("password", pwd); HttpClient.newInstance(this).loadingRequest(api, new BeanRequest.SuccessListener<DataBean<String>>() { @Override public void onResponse(DataBean<String> response) { if (isFinishing()) { return; } UserBean bean; try { String data = Des.decode(response.data); L.d("BeanRequest", data); bean = JsonUtil.jsonToBean(data, UserBean.class); saveUser(bean); } catch (Exception e) { try { bean = JsonUtil.jsonToBean(response.data, UserBean.class); saveUser(bean); } catch (InstantiationException e1) { e1.printStackTrace(); } catch (IllegalAccessException e1) { e1.printStackTrace(); } e.printStackTrace(); } UIHelper.ToastMessage(getContext(), response.getMsg()); SharedAccount.getInstance(getContext()).saveMobile(phone); finish(); } }); } private void saveUser(UserBean bean) { if (bean != null) { UserHelper.getInstance(this).saveBean(bean); UserHelper.getInstance(this).savePhone(phone); IntentUtil.startActivity(getContext(), MainActivity.class); } } private boolean isShowPwd = false;//是否显示密码 private void showPwd() { if (!isShowPwd) {//显示密码 pwdEt.setInputType(InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD); showPwdIv.setImageResource(R.drawable.pwd_on); } else {//隐藏密码 pwdEt.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD); showPwdIv.setImageResource(R.drawable.pwd_off); } isShowPwd = !isShowPwd; } //注册后调用 @Subscribe public void respondRegisterEvent(RegisterEvent event) { phoneEt.setText(event.getPhone()); } @Override protected void onDestroy() { super.onDestroy(); EventBus.getDefault().unregister(this); } }
[ "173422042@qq.com" ]
173422042@qq.com
9c61efbd74c975fe9ba69f2df59bef97f493aff7
b37929282e1ce200ffeed494090f8794ef42b878
/08 MyShellExtended/src/main/java/hr/fer/zemris/java/hw07/shell/Environment.java
262d7380a561a8959c8969a4859225762c7a85a3
[]
no_license
hmatic/fer-java-course
b332c4645c30e787918149361ba5a77e75893efd
6ce8c7992197b8d6e90787969a0a91a2873de8b7
refs/heads/master
2020-03-15T22:16:37.101287
2018-08-28T12:29:48
2018-08-28T12:29:48
132,370,110
0
0
null
null
null
null
UTF-8
Java
false
false
2,502
java
package hr.fer.zemris.java.hw07.shell; import java.nio.file.Path; import java.util.SortedMap; import hr.fer.zemris.java.hw07.shell.commands.ShellCommand; /** * Interface which models Shell environment. All communication with user is through this interface. * * @author Hrvoje Matić * @version 1.0 */ public interface Environment { /** * Reads a single line from user input stream. * * @return read line as String * @throws ShellIOException if IOException is thrown */ String readLine() throws ShellIOException; /** * Writes text given in argument to user without adding new line. * * @param text given text * @throws ShellIOException if IOException is thrown */ void write(String text) throws ShellIOException; /** * Writes text given in argument to user in one line. * * @param text given text * @throws ShellIOException if IOException is thrown */ void writeln(String text) throws ShellIOException; /** * Returns unmodifiable sorted map of available commands. * * @return map of commands */ SortedMap<String, ShellCommand> commands(); /** * Getter for MULTILINE symbol. * * @return MULTILINE symbol */ Character getMultilineSymbol(); /** * Setter for MULTILINE symbol. * * @param symbol new symbol value */ void setMultilineSymbol(Character symbol); /** * Getter for PROMPT symbol. * * @return PROMPT symbol */ Character getPromptSymbol(); /** * Setter for PROMPT symbol. * * @param symbol new symbol value */ void setPromptSymbol(Character symbol); /** * Getter for MORELINES symbol. * * @return MORELINES symbol */ Character getMorelinesSymbol(); /** * Setter for MORELINES symbol. * * @param symbol new symbol value */ void setMorelinesSymbol(Character symbol); /** * Getter for current directory. * * @return current directory */ Path getCurrentDirectory(); /** * Setter for current directory. * * @param path new current directory path */ void setCurrentDirectory(Path path); /** * Returns object storing shared data between commands. * Object is placed inside map so method takes one argument which is key. * @param key map key * @return object storing shared data */ Object getSharedData(String key); /** * Puts object for storing shared data into map of shared data objects. * @param key map key * @param value reference to object storing shared data */ void setSharedData(String key, Object value); }
[ "hrvoje.matic@fer.hr" ]
hrvoje.matic@fer.hr
b3aa624d2cfebc7530f4ee818739839ac4209883
01733a08d922bdb32abd928c3a54eee35f77eca0
/mall-pms/src/main/java/com/wubaba/mall/pms/dao/CommentReplayDao.java
0fe1fbbc86885aaf114c8cd11afa7272911d4656
[]
no_license
wujuxuan/wubaba-mall
2509d5a50d9cd93b52e522e7bbe92b5c6fe46f1f
4347bb0d7522a46040ef79f29d6598cc4b664be0
refs/heads/master
2023-05-11T02:23:49.101888
2021-06-03T09:18:43
2021-06-03T09:18:43
373,347,454
0
0
null
null
null
null
UTF-8
Java
false
false
397
java
package com.wubaba.mall.pms.dao; import com.wubaba.mall.pms.entity.CommentReplayEntity; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; /** * 商品评价回复关系 * * @author wujuxuan * @email 10742869@gmail.com * @date 2021-06-02 09:47:24 */ @Mapper public interface CommentReplayDao extends BaseMapper<CommentReplayEntity> { }
[ "100742869@qq.com" ]
100742869@qq.com
dd918f4b011cca78837a467c4e5225585461b4e5
56456387c8a2ff1062f34780b471712cc2a49b71
/com/google/android/gms/panorama/PanoramaApi$PanoramaResult.java
0956e78f36575d366212664180a9d205eaca4f59
[]
no_license
nendraharyo/presensimahasiswa-sourcecode
55d4b8e9f6968eaf71a2ea002e0e7f08d16c5a50
890fc86782e9b2b4748bdb9f3db946bfb830b252
refs/heads/master
2020-05-21T11:21:55.143420
2019-05-10T19:03:56
2019-05-10T19:03:56
186,022,425
1
0
null
null
null
null
UTF-8
Java
false
false
466
java
package com.google.android.gms.panorama; import android.content.Intent; import com.google.android.gms.common.api.Result; public abstract interface PanoramaApi$PanoramaResult extends Result { public abstract Intent getViewerIntent(); } /* Location: C:\Users\haryo\Desktop\enjarify-master\presensi-enjarify.jar!\com\google\android\gms\panorama\PanoramaApi$PanoramaResult.class * Java compiler version: 5 (49.0) * JD-Core Version: 0.7.1 */
[ "haryo.nendra@gmail.com" ]
haryo.nendra@gmail.com
d7d128767abbc9c3f9cd0a91ad55dcdae3bcc2ab
c081c93ea6449c9ef6d985c30cd6331e41a725ac
/csharp-impl/src/org/mustbe/consulo/csharp/ide/highlight/check/impl/CS0106.java
130d049937e430b2d680958028a83e3d164f1614
[ "Apache-2.0" ]
permissive
Prashant-Jonny/consulo-csharp
c355277753d879f2e6e78bf345b7c3a2c0361df1
982e600076ba410f16e6d6a6b3fd5df1afcea708
refs/heads/master
2021-01-16T22:05:40.637390
2015-12-18T13:33:37
2015-12-18T13:33:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,294
java
/* * Copyright 2013-2014 must-be.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.mustbe.consulo.csharp.ide.highlight.check.impl; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.jetbrains.annotations.NotNull; import org.mustbe.consulo.RequiredReadAction; import org.mustbe.consulo.csharp.ide.codeInsight.actions.RemoveModifierFix; import org.mustbe.consulo.csharp.ide.highlight.check.CompilerCheck; import org.mustbe.consulo.csharp.lang.psi.CSharpIndexMethodDeclaration; import org.mustbe.consulo.csharp.lang.psi.CSharpConstructorDeclaration; import org.mustbe.consulo.csharp.lang.psi.CSharpFile; import org.mustbe.consulo.csharp.lang.psi.CSharpMethodDeclaration; import org.mustbe.consulo.csharp.lang.psi.CSharpModifier; import org.mustbe.consulo.csharp.lang.psi.CSharpNamespaceDeclaration; import org.mustbe.consulo.csharp.lang.psi.CSharpPropertyDeclaration; import org.mustbe.consulo.csharp.lang.psi.CSharpTypeDeclaration; import org.mustbe.consulo.csharp.module.extension.CSharpLanguageVersion; import org.mustbe.consulo.dotnet.psi.DotNetGenericParameter; import org.mustbe.consulo.dotnet.psi.DotNetModifier; import org.mustbe.consulo.dotnet.psi.DotNetModifierList; import org.mustbe.consulo.dotnet.psi.DotNetModifierListOwner; import org.mustbe.consulo.dotnet.psi.DotNetTypeDeclaration; import com.intellij.psi.PsiElement; import com.intellij.util.ArrayUtil; /** * @author VISTALL * @since 10.06.14 */ public class CS0106 extends CompilerCheck<DotNetModifierListOwner> { public static enum Owners { Constructor(CSharpModifier.PUBLIC, CSharpModifier.PRIVATE, CSharpModifier.PROTECTED, CSharpModifier.INTERNAL), StaticConstructor(CSharpModifier.STATIC), DeConstructor, InterfaceMember(CSharpModifier.NEW), GenericParameter(CSharpModifier.IN, CSharpModifier.OUT), NamespaceType(CSharpModifier.STATIC, CSharpModifier.PUBLIC, CSharpModifier.PROTECTED, CSharpModifier.INTERNAL, CSharpModifier.ABSTRACT, CSharpModifier.PARTIAL, CSharpModifier.SEALED), NestedType(CSharpModifier.PUBLIC, CSharpModifier.PRIVATE, CSharpModifier.PROTECTED, CSharpModifier.INTERNAL, CSharpModifier.ABSTRACT, CSharpModifier.PARTIAL, CSharpModifier.SEALED, CSharpModifier.STATIC), Unknown { @Override public boolean isValidModifier(DotNetModifier modifier) { return true; } }; private DotNetModifier[] myValidModifiers; Owners(DotNetModifier... validModifiers) { myValidModifiers = validModifiers; } public boolean isValidModifier(DotNetModifier modifier) { return ArrayUtil.contains(modifier, myValidModifiers); } } @RequiredReadAction @NotNull @Override public List<CompilerCheckBuilder> check(@NotNull CSharpLanguageVersion languageVersion, @NotNull DotNetModifierListOwner element) { DotNetModifierList modifierList = element.getModifierList(); if(modifierList == null) { return Collections.emptyList(); } List<CompilerCheckBuilder> list = Collections.emptyList(); Owners owners = toOwners(element); DotNetModifier[] modifiers = modifierList.getModifiers(); if(modifiers.length == 0) { return list; } for(DotNetModifier modifier : modifiers) { if(!owners.isValidModifier(modifier)) { PsiElement modifierElement = modifierList.getModifierElement(modifier); if(modifierElement == null) { continue; } if(list.isEmpty()) { list = new ArrayList<CompilerCheckBuilder>(2); } list.add(newBuilder(modifierElement, modifier.getPresentableText()).addQuickFix(new RemoveModifierFix(modifier, element))); } } return list; } public static Owners toOwners(DotNetModifierListOwner owner) { if(owner instanceof CSharpConstructorDeclaration) { if(owner.hasModifier(DotNetModifier.STATIC)) { return Owners.StaticConstructor; } if(((CSharpConstructorDeclaration) owner).isDeConstructor()) { return Owners.DeConstructor; } return Owners.Constructor; } if(owner instanceof CSharpMethodDeclaration || owner instanceof CSharpPropertyDeclaration || owner instanceof CSharpIndexMethodDeclaration) { PsiElement parent = owner.getParent(); if(parent instanceof CSharpTypeDeclaration) { if(((CSharpTypeDeclaration) parent).isInterface()) { return Owners.InterfaceMember; } } } if(owner instanceof DotNetGenericParameter) { return Owners.GenericParameter; } if(owner instanceof DotNetTypeDeclaration) { PsiElement parent = owner.getParent(); if(parent instanceof CSharpNamespaceDeclaration || parent instanceof CSharpFile) { return Owners.NamespaceType; } else if(parent instanceof DotNetTypeDeclaration) { return Owners.NestedType; } } return Owners.Unknown; } }
[ "vistall.valeriy@gmail.com" ]
vistall.valeriy@gmail.com
94086caca6eb143043c26227262520b5020e3ad3
d300bf53d7ff2365fd1b5e2c9be29f7a7dac8eff
/src/main/java/com/shimizukenta/secssimulator/TcpIpAdapter.java
36a1fa6861a9e9c41a607e9fd986843858580162
[ "Apache-2.0" ]
permissive
shyding/secs-simulator
c2876fbca85cf8b066c86096854948be6619d1a9
901f3237014efd999da23cc1498de30c916ea6a2
refs/heads/master
2023-02-22T18:58:20.185300
2021-01-21T22:59:34
2021-01-21T22:59:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,800
java
package com.shimizukenta.secssimulator; import java.io.Closeable; import java.io.IOException; import java.net.InetSocketAddress; import java.net.SocketAddress; import java.net.StandardSocketOptions; import java.nio.Buffer; import java.nio.ByteBuffer; import java.nio.channels.AsynchronousServerSocketChannel; import java.nio.channels.AsynchronousSocketChannel; import java.nio.channels.CompletionHandler; import java.util.Collection; import java.util.Objects; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; public class TcpIpAdapter implements Closeable { private final Inner a; private final Inner b; private boolean opened; private boolean closed; public TcpIpAdapter(SocketAddress a, SocketAddress b) { this.a = new Inner(a); this.b = new Inner(b); this.opened = false; this.closed = false; } public SocketAddress socketAddressA() throws IOException { return getSocketAddress(a); } public SocketAddress socketAddressB() throws IOException { return getSocketAddress(b); } private SocketAddress getSocketAddress(Inner i) throws IOException { if ( i.server == null ) { return i.addr; } else { return i.server.getLocalAddress(); } } public void open() throws IOException { synchronized (this) { if ( this.closed ) { throw new IOException("Already closed"); } if ( this.opened ) { throw new IOException("Already opened"); } this.opened = true; } this.a.open(this.b); this.b.open(this.a); } @Override public void close() throws IOException { synchronized ( this ) { if ( this.closed ) { return; } this.closed = true; } IOException ioExcept = null; try { this.a.close(); } catch ( IOException e ) { ioExcept = e; } try { this.b.close(); } catch ( IOException e ) { ioExcept = e; } if ( ioExcept != null ) { throw ioExcept; } } public boolean addThrowableListener(ThrowableListener l) { boolean aa = a.thLstnrs.add(l); boolean bb = b.thLstnrs.add(l); return aa && bb; } public boolean removeThrowableListener(ThrowableListener l) { boolean aa = a.thLstnrs.remove(l); boolean bb = b.thLstnrs.remove(l); return aa && bb; } public static TcpIpAdapter open(SocketAddress a, SocketAddress b) throws IOException { final TcpIpAdapter inst = new TcpIpAdapter(a, b); try { inst.open(); } catch ( IOException e ) { try { inst.close(); } catch ( IOException giveup ) { } throw e; } return inst; } public static void main(String[] args) { try ( TcpIpAdapter adapter = new TcpIpAdapter( parseSocketAddress(args[0]), parseSocketAddress(args[1])); ) { adapter.addThrowableListener((addr, t) -> { System.out.println("Throw from SocketAddress: " + addr.toString()); t.printStackTrace(); }); adapter.open(); synchronized ( TcpIpAdapter.class ) { TcpIpAdapter.class.wait(); } } catch ( InterruptedException ignore ) { } catch ( Throwable t ) { t.printStackTrace(); } } private static SocketAddress parseSocketAddress(CharSequence cs) { String[] ss = Objects.requireNonNull(cs).toString().split(":", 2); int port = Integer.parseInt(ss[1].trim()); return new InetSocketAddress(ss[0].trim(), port); } public static interface ThrowableListener { public void throwed(SocketAddress addr, Throwable t); } private class Inner implements Closeable { private final SocketAddress addr; private AsynchronousServerSocketChannel server; private final Collection<AsynchronousSocketChannel> channels = new CopyOnWriteArrayList<>(); private boolean closed; public Inner(SocketAddress socketAddress) { this.addr = socketAddress; this.server = null; this.closed = false; } public void open(Inner another) throws IOException { server = AsynchronousServerSocketChannel.open(); server.setOption(StandardSocketOptions.SO_REUSEADDR, true); server.bind(addr); server.accept(null, new CompletionHandler<AsynchronousSocketChannel, Void>() { @Override public void completed(AsynchronousSocketChannel channel, Void attachment) { server.accept(null, this); try { channels.add(channel); ByteBuffer buffer = ByteBuffer.allocate(1024); for ( ;; ) { ((Buffer)buffer).clear(); Future<Integer> f = channel.read(buffer); try { int r = f.get().intValue(); if ( r < 0 ) { break; } ((Buffer)buffer).flip(); byte[] bs = new byte[buffer.remaining()]; buffer.get(bs); another.put(bs); } catch ( InterruptedException e ) { f.cancel(true); throw e; } } } catch ( InterruptedException ignore ) { } catch ( ExecutionException e ) { synchronized ( this ) { if ( ! closed ) { putThrowable(e.getCause()); } } } finally { channels.remove(channel); closeChannel(channel); } } @Override public void failed(Throwable t, Void attachment) { synchronized ( this ) { if ( ! closed ) { putThrowable(t); } } } }); } public void close() throws IOException { synchronized ( this ) { if ( closed ) { return ; } closed = true; } if ( server != null ) { server.close(); } channels.forEach(this::closeChannel); } private void closeChannel(AsynchronousSocketChannel channel) { try { channel.shutdownOutput(); } catch ( IOException giveup ) { } try { channel.close(); } catch ( IOException giveup ) { } } public void put(byte[] bs) throws InterruptedException { for ( AsynchronousSocketChannel channel : channels ) { ByteBuffer buffer = ByteBuffer.allocate(bs.length); buffer.put(bs); ((Buffer)buffer).flip(); try { while ( buffer.hasRemaining() ) { Future<Integer> f = channel.write(buffer); try { int w = f.get().intValue(); if ( w <= 0 ) { break; } } catch ( InterruptedException e ) { f.cancel(true); throw e; } } } catch ( ExecutionException e ) { putThrowable(e.getCause()); } } } private Collection<ThrowableListener> thLstnrs = new CopyOnWriteArrayList<>(); private void putThrowable(Throwable t) { thLstnrs.forEach(l -> { l.throwed(addr, t); }); } } }
[ "shimizukentagm1@gmail.com" ]
shimizukentagm1@gmail.com
2d6534ae05f2f1c720d3bbdc5bd20a90eedb4e9b
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/35/org/apache/commons/math3/stat/regression/SimpleRegression_addData_132.java
a7f6b6da7548b1058f0056d21fe2e426bf4ef995
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
2,111
java
org apach common math3 stat regress estim ordinari squar regress model independ variabl code intercept slope code standard error code intercept code code slope code anova squar pearson' statist observ pair ad model time provid dimension arrai observ store memori limit number observ ad model strong usag note strong fewer observ model variat valu valu statist code nan code observ coordin requir estim bivari regress model getter statist comput valu base current set observ statist add data updat statist instanc comput method updat statist getter perform comput request statist intercept term suppress pass code link simpl regress simpleregress constructor code intercept hasintercept properti model estim constant term link intercept getintercept return code version simpl regress simpleregress serializ updat multipl linear regress updatingmultiplelinearregress add observ regress data set updat formula mean sum squar defin algorithm comput sampl varianc analysi recommend chan golub vequ levequ american statistician vol referenc weisberg appli linear regress 2nd param independ variabl param depend variabl add data adddata xbar ybar intercept hasintercept fact1 fact2 xbar ybar sum sumxx fact2 sum sumyi fact2 sum sumxi fact2 xbar fact1 ybar fact1 intercept hasintercept sum sumxx sum sumyi sum sumxi sum sumx sum sumi
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
217fbed46b997f29d59dc12920da4d24d51426a7
13cbb329807224bd736ff0ac38fd731eb6739389
/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315OmitComments.java
cb3d4dcbca533db93407e074f493df173d5b505c
[]
no_license
ZhipingLi/rt-source
5e2537ed5f25d9ba9a0f8009ff8eeca33930564c
1a70a036a07b2c6b8a2aac6f71964192c89aae3c
refs/heads/master
2023-07-14T15:00:33.100256
2021-09-01T04:49:04
2021-09-01T04:49:04
401,933,858
0
0
null
null
null
null
UTF-8
Java
false
false
637
java
package com.sun.org.apache.xml.internal.security.c14n.implementations; public class Canonicalizer20010315OmitComments extends Canonicalizer20010315 { public Canonicalizer20010315OmitComments() { super(false); } public final String engineGetURI() { return "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"; } public final boolean engineGetIncludeComments() { return false; } } /* Location: D:\software\jd-gui\jd-gui-windows-1.6.3\rt.jar!\com\sun\org\apache\xml\internal\security\c14n\implementations\Canonicalizer20010315OmitComments.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.0.7 */
[ "michael__lee@yeah.net" ]
michael__lee@yeah.net
7aba237dd746d4cb127087b74dcf4274ea71cdd3
1da5db46041259ba4333f12716737ea8b1a54c3e
/sanshaoxingqiu/uikit/src/com/netease/nim/uikit/impl/preference/UserPreferences.java
ab99339a6e8da55fe01bc564cf4c4eeae2a21520
[ "MIT" ]
permissive
coderzhang213/sancell-android
50f678f7c8ca23a0db78e80fffe644bfb754215d
3b491fb3b0f8b7ecdeeb69429d998feb220e79f0
refs/heads/master
2022-12-19T14:49:18.836881
2020-09-11T06:10:18
2020-09-11T06:10:18
294,608,759
0
0
null
null
null
null
UTF-8
Java
false
false
1,366
java
package com.netease.nim.uikit.impl.preference; import android.content.Context; import android.content.SharedPreferences; import com.netease.nim.uikit.api.NimUIKit; /** * Created by hzxuwen on 2015/10/21. */ public class UserPreferences { private final static String KEY_EARPHONE_MODE = "KEY_EARPHONE_MODE"; public static void setEarPhoneModeEnable(boolean on) { saveBoolean(KEY_EARPHONE_MODE, on); } public static boolean isEarPhoneModeEnable() { return getBoolean(KEY_EARPHONE_MODE, true); } private static boolean getBoolean(String key, boolean value) { return getSharedPreferences().getBoolean(key, value); } private static void saveBoolean(String key, boolean value) { SharedPreferences.Editor editor = getSharedPreferences().edit(); editor.putBoolean(key, value); editor.apply(); } private static SharedPreferences getSharedPreferences() { return NimUIKit.getContext().getSharedPreferences("UIKit." + NimUIKit.getAccount(), Context.MODE_PRIVATE); } public static void saveNotice(String key,boolean show){ SharedPreferences.Editor editor = getSharedPreferences().edit(); editor.putBoolean(key, show); editor.apply(); } public static boolean isShowNotice(String key){ return getBoolean(key,true); } }
[ "2430119608@qq.com" ]
2430119608@qq.com
0508d9c166c1e79289d11fc5844ef3478a60b360
ffeaf567e9b1aadb4c00d95cd3df4e6484f36dcd
/Talagram/com/google/android/gms/internal/places/zzdn.java
fcda9af2d736b895c43f7743452655d9d006f218
[]
no_license
danielperez9430/Third-party-Telegram-Apps-Spy
dfe541290c8512ca366e401aedf5cc5bfcaa6c3e
f6fc0f9c677bd5d5cd3585790b033094c2f0226d
refs/heads/master
2020-04-11T23:26:06.025903
2018-12-18T10:07:20
2018-12-18T10:07:20
162,166,647
0
0
null
null
null
null
UTF-8
Java
false
false
2,491
java
package com.google.android.gms.internal.places; import android.os.Parcel; import android.os.Parcelable$Creator; import com.google.android.gms.common.internal.Objects; import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter; import com.google.android.gms.common.internal.safeparcel.SafeParcelable$Class; import com.google.android.gms.common.internal.safeparcel.SafeParcelable$Constructor; import com.google.android.gms.common.internal.safeparcel.SafeParcelable$Field; import com.google.android.gms.common.internal.safeparcel.SafeParcelable$Param; import com.google.android.gms.common.internal.safeparcel.SafeParcelable$Reserved; import java.util.List; @Class(creator="PlaceUserDataCreator") @Reserved(value={1000}) @Deprecated public final class zzdn extends AbstractSafeParcelable { public static final Parcelable$Creator CREATOR; @Field(getter="getPlaceId", id=2) private final String placeId; @Field(getter="getUserAccountName", id=1) private final String zzcx; @Field(getter="getPlaceAliases", id=6) private final List zzhm; static { zzdn.CREATOR = new zzdp(); } @Constructor zzdn(@Param(id=1) String arg1, @Param(id=2) String arg2, @Param(id=6) List arg3) { super(); this.zzcx = arg1; this.placeId = arg2; this.zzhm = arg3; } public final boolean equals(Object arg5) { if(this == (((zzdn)arg5))) { return 1; } if(!(arg5 instanceof zzdn)) { return 0; } if((this.zzcx.equals(((zzdn)arg5).zzcx)) && (this.placeId.equals(((zzdn)arg5).placeId)) && (this.zzhm.equals(((zzdn)arg5).zzhm))) { return 1; } return 0; } public final int hashCode() { return Objects.hashCode(new Object[]{this.zzcx, this.placeId, this.zzhm}); } public final String toString() { return Objects.toStringHelper(this).add("accountName", this.zzcx).add("placeId", this.placeId).add("placeAliases", this.zzhm).toString(); } public final void writeToParcel(Parcel arg4, int arg5) { arg5 = SafeParcelWriter.beginObjectHeader(arg4); SafeParcelWriter.writeString(arg4, 1, this.zzcx, false); SafeParcelWriter.writeString(arg4, 2, this.placeId, false); SafeParcelWriter.writeTypedList(arg4, 6, this.zzhm, false); SafeParcelWriter.finishObjectHeader(arg4, arg5); } }
[ "dpefe@hotmail.es" ]
dpefe@hotmail.es
a788b1875a5c1e409639ef480686371d2172534f
31204581595e4ede886c46d2bb803d6c0e3314d2
/zapdos/src/main/java/com/commit451/zapdos/Driver.java
6049dcda186b69bd8e12b899141418119eca8878
[ "Apache-2.0" ]
permissive
RepoForks/Zapdos
63dcdcccb9862764a8641bb0cc29fd6b05e3d2eb
2ca6129e316df616c9bb0a08e0f15bb4c110f375
refs/heads/master
2021-01-14T08:03:09.319983
2016-08-05T22:31:33
2016-08-05T22:31:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,745
java
package com.commit451.zapdos; import android.net.Uri; import android.support.annotation.Nullable; import android.util.Log; import com.google.android.gms.common.api.GoogleApiClient; import com.google.android.gms.drive.Drive; import com.google.android.gms.drive.DriveContents; import com.google.android.gms.drive.DriveFile; import com.google.android.gms.drive.DriveFolder; import com.google.android.gms.drive.DriveId; import com.google.android.gms.drive.MetadataBuffer; import com.google.android.gms.drive.MetadataChangeSet; import com.google.android.gms.drive.query.Filters; import com.google.android.gms.drive.query.Query; import com.google.android.gms.drive.query.SearchableField; import java.io.IOException; import java.io.OutputStream; /** * Actually carries out the drive operations */ class Driver { public static final String METHOD_CREATE = "CREATE"; public static final String METHOD_READ = "READ"; public static final String METHOD_UPDATE = "UPDATE"; public static final String METHOD_DELETE = "DELETE"; private static final String MIME_TYPE_FOLDER = "application/vnd.google-apps.folder"; private GoogleApiClient mGoogleApiClient; Driver(GoogleApiClient googleApiClient) { mGoogleApiClient = googleApiClient; } public DriveId write(Request request) throws IOException { DriveFolder folder = getDriveFolder(request.uri, true); if (folder == null) { throw new IOException("Failed to create folder"); } String fileName = request.uri.getLastPathSegment(); DriveId fileId = findTitledFileInFolder(fileName, request.mimeType, folder); DriveContents contents; if (fileId == null) { contents = Drive.DriveApi.newDriveContents(mGoogleApiClient).await().getDriveContents(); } else { contents = fileId.asDriveFile().open(mGoogleApiClient, DriveFile.MODE_WRITE_ONLY, null) .await() .getDriveContents(); } OutputStream stream = contents.getOutputStream(); stream.write(request.requestBody.bytes); stream.close(); if (fileId != null) { //overwriting existing contents.commit(mGoogleApiClient, request.requestBody.metadataChangeSet).await(); } else { //creating new fileId = folder.createFile(mGoogleApiClient, request.requestBody.metadataChangeSet, contents) .await() .getDriveFile() .getDriveId(); } return fileId; } /** * Performs a search and gets resources at the targetted uri * @param uri the uri * @param mimeType the mime type * @return the buffer, which you are responsible for closing * @throws IOException */ @Nullable public MetadataBuffer read(Request request) throws IOException { DriveFolder folder = getDriveFolder(request.uri, true); if (folder == null) { throw new IOException("Could not fetch folder"); } String fileName = request.uri.getLastPathSegment(); Query driveQuery = new Query.Builder() .addFilter(Filters.eq(SearchableField.MIME_TYPE, request.mimeType)) .addFilter(Filters.contains(SearchableField.TITLE, fileName)) .build(); return folder.queryChildren(mGoogleApiClient, driveQuery) .await() .getMetadataBuffer(); } /** * Get the folder * * @param uri a path to the folder you want, such as app://journals/j365 * @param createIfNotExistent if you want to create all the subfolders if they do not exist along the way * @return the folder */ @Nullable private DriveFolder getDriveFolder(Uri uri, boolean createIfNotExistent) { DriveFolder startFolder; Log.d("remove", "Uri: " + uri.toString()); if (Request.SCHEME_FILE.equals(uri.getAuthority())) { startFolder = Drive.DriveApi.getRootFolder(mGoogleApiClient); } else if (Request.SCHEME_APP.equals(uri.getAuthority())) { startFolder = Drive.DriveApi.getAppFolder(mGoogleApiClient); } else { //TODO this check should be elsewhere throw new IllegalArgumentException("The scheme must be one of `root` or `app`"); } DriveFolder runnerFolder = startFolder; for (int i = 0; i < uri.getPathSegments().size(); i++) { String path = uri.getPathSegments().get(i); Query folderQuery = new Query.Builder() .addFilter(Filters.eq(SearchableField.MIME_TYPE, MIME_TYPE_FOLDER)) .addFilter(Filters.eq(SearchableField.TITLE, path)) .build(); MetadataBuffer buffer = runnerFolder.queryChildren(mGoogleApiClient, folderQuery) .await() .getMetadataBuffer(); if (buffer != null && buffer.getCount() > 0) { runnerFolder = buffer.get(0).getDriveId().asDriveFolder(); buffer.release(); } else { if (createIfNotExistent) { for (int j = i; j < uri.getPathSegments().size(); j++) { String title = uri.getPathSegments().get(j); MetadataChangeSet changeSet = new MetadataChangeSet.Builder() .setTitle(title) .setMimeType(MIME_TYPE_FOLDER) .build(); runnerFolder = runnerFolder.createFolder(mGoogleApiClient, changeSet) .await() .getDriveFolder(); } } else { return null; } break; } } return runnerFolder; } @Nullable private DriveId findTitledFileInFolder(String title, String mimeType, DriveFolder folder) { Query driveQuery = new Query.Builder() .addFilter(Filters.eq(SearchableField.TITLE, title)) .addFilter(Filters.eq(SearchableField.MIME_TYPE, mimeType)) .build(); MetadataBuffer buffer = folder.queryChildren(mGoogleApiClient, driveQuery) .await() .getMetadataBuffer(); if (buffer != null && buffer.getCount() > 0) { DriveId driveId = buffer.get(0).getDriveId(); buffer.release(); return driveId; } else { if (buffer != null) { buffer.release(); } } return null; } }
[ "jawnnypoo@gmail.com" ]
jawnnypoo@gmail.com
0a4a60c61e207def1bfdc61b7bc3861f7bc340a5
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2018/4/JaxRsResponse.java
39b5fac566a21e7822becfee8020aaa5e1a134ed
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
4,711
java
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.server.rest; import com.sun.jersey.api.client.ClientResponse; import com.sun.jersey.core.util.StringKeyObjectValueIgnoreCaseMultivaluedMap; import org.junit.Test; import java.net.URI; import java.util.Collections; import java.util.List; import java.util.Map; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.Response; import org.neo4j.logging.NullLogProvider; import org.neo4j.server.database.Database; import org.neo4j.server.rest.management.console.ConsoleService; import org.neo4j.server.rest.management.repr.ServerRootRepresentation; import static org.hamcrest.Matchers.containsString; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThat; import static org.mockito.Mockito.mock; public class JaxRsResponse extends Response { private final int status; private final MultivaluedMap<String,Object> metaData; private final MultivaluedMap<String,String> headers; private final URI location; private String data; private MediaType type; public JaxRsResponse( ClientResponse response ) { this( response, extractContent( response ) ); } public JaxRsResponse( ClientResponse response, String entity ) { status = response.getStatus(); metaData = extractMetaData( response ); headers = extractHeaders( response ); location = response.getLocation(); type = response.getType(); data = entity; response.close(); } private static String extractContent( ClientResponse response ) { if ( response.getStatus() == Status.NO_CONTENT.getStatusCode() ) { return null; } return response.getEntity( String.class ); } public static JaxRsResponse extractFrom( ClientResponse clientResponse ) { return new JaxRsResponse( clientResponse ); } @Override public String getEntity() { return data; } @Override public int getStatus() { return status; } @Override public MultivaluedMap<String,Object> getMetadata() { return metaData; } private MultivaluedMap<String,Object> extractMetaData( ClientResponse jettyResponse ) { MultivaluedMap<String,Object> metadata = new StringKeyObjectValueIgnoreCaseMultivaluedMap(); for ( Map.Entry<String,List<String>> header : jettyResponse.getHeaders().entrySet() ) { for ( Object value : header.getValue() ) { metadata.putSingle( header.getKey(), value ); } } return metadata; } public MultivaluedMap<String,String> getHeaders() { return headers; } private MultivaluedMap<String,String> extractHeaders( ClientResponse jettyResponse ) { return jettyResponse.getHeaders(); } // new URI( getHeaders().get( HttpHeaders.LOCATION ).get(0)); public URI getLocation() { return location; } public void close() { } public MediaType getType() { return type; } public static class ServerRootRepresentationTest { @Test public void shouldProvideAListOfServiceUris() throws Exception { ConsoleService consoleService = new ConsoleService( null, mock( Database.class ), NullLogProvider.getInstance(), null ); ServerRootRepresentation srr = new ServerRootRepresentation( new URI( "http://example.org:9999" ), Collections.singletonList( consoleService ) ); Map<String,Map<String,String>> map = srr.serialize(); assertNotNull( map.get( "services" ) ); assertThat( map.get( "services" ).get( consoleService.getName() ), containsString( consoleService.getServerPath() ) ); } } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
89516f10ac83899cb37699530ed4710f2e357561
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Hibernate/Hibernate2127.java
8714d1e575cb6b2396e62ee5977fd50fecdb41a6
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
363
java
@SuppressWarnings("") private boolean isEmpty(Object dialectReference) { if ( dialectReference != null ) { // the referenced value is not null if ( dialectReference instanceof String ) { // if it is a String, it might still be empty though... return StringHelper.isEmpty( (String) dialectReference ); } return false; } return true; }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
8af761452c2520b15e7d96fcec7619c61882c6e2
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/24/24_1825a92ec98a5b4672764cc99cbfbb096303b6bf/TestCaseFactory/24_1825a92ec98a5b4672764cc99cbfbb096303b6bf_TestCaseFactory_s.java
b5c9250dd922679dcdafee6da126952bb93335e6
[]
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
2,946
java
package ch.hsr.objectCaching.testFrameworkServer; import java.io.File; import java.util.ArrayList; import java.util.logging.Level; import java.util.logging.Logger; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.transform.stream.StreamSource; import ch.hsr.objectCaching.account.Account; import ch.hsr.objectCaching.account.AccountImpl; import ch.hsr.objectCaching.scenario.Scenario; public class TestCaseFactory { private TestCase testCase; private ArrayList<Account> accounts; private Logger logger; private String testCaseFileName; public TestCaseFactory(String testCaseFileName) { this.testCaseFileName = testCaseFileName; logger = Logger.getLogger("TestFrameWorkServer"); accounts = new ArrayList<Account>(); } public ArrayList<Account> getAccounts() { return accounts; } public TestCase getTestCase() { return testCase; } public void convertXML() { XMLInputFactory inputFactory = XMLInputFactory.newInstance(); XMLStreamReader stax; Account newAccount = null; Scenario newScenario = null; try { stax = inputFactory.createXMLStreamReader(new StreamSource(new File(testCaseFileName))); while(stax.hasNext()) { stax.next(); if(stax.hasName() && stax.getName().toString().equals("TestCase") && stax.isStartElement()) { testCase = new TestCase(stax.getAttributeValue(0)); } if(stax.hasName() && stax.getName().toString().equals("Account") && stax.isStartElement()) { newAccount = new AccountImpl(); newAccount.setBalance(Integer.valueOf(stax.getAttributeValue(0))); accounts.add(newAccount); } if(stax.hasName() && stax.getName().toString().equals("Scenario") && stax.isStartElement()) { newScenario = testCase.generateNewScenario(Integer.valueOf(stax.getAttributeValue(0))); } if(stax.hasName() && stax.getName().toString().equals("Write") && stax.isStartElement()) { newScenario.setWriteAction(Integer.valueOf(stax.getAttributeValue(0)), Integer.valueOf(stax.getAttributeValue(1))); } if(stax.hasName() && stax.getName().toString().equals("Read") && stax.isStartElement()) { newScenario.setReadAction(Integer.valueOf(stax.getAttributeValue(0))); } if(stax.hasName() && stax.getName().toString().equals("Increment") && stax.isStartElement()) { newScenario.setIncrementAction(Integer.valueOf(stax.getAttributeValue(0)), Long.valueOf(stax.getAttributeValue(1)), Float.valueOf(stax.getAttributeValue(2))); } } } catch (XMLStreamException e) { logger.log(Level.SEVERE, "Uncaught exception", e); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
70f2ebc9219bcb8b8ed5df467fa68afa6f23bd41
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
/Method_Scraping/xml_scraping/NicadOutputFile_t1_flink_new2/Nicad_t1_flink_new2412.java
b00524a5d5e54601f0a3c9ad0d387051fa61ff01
[]
no_license
ryosuke-ku/TestCodeSeacherPlus
cfd03a2858b67a05ecf17194213b7c02c5f2caff
d002a52251f5461598c7af73925b85a05cea85c6
refs/heads/master
2020-05-24T01:25:27.000821
2019-08-17T06:23:42
2019-08-17T06:23:42
187,005,399
0
0
null
null
null
null
UTF-8
Java
false
false
906
java
// clone pairs:9604:75% // 10374:flink/flink-connectors/flink-connector-rabbitmq/src/main/java/org/apache/flink/streaming/connectors/rabbitmq/common/RMQConnectionConfig.java public class Nicad_t1_flink_new2412 { private RMQConnectionConfig(String uri, Integer networkRecoveryInterval, Boolean automaticRecovery, Boolean topologyRecovery, Integer connectionTimeout, Integer requestedChannelMax, Integer requestedFrameMax, Integer requestedHeartbeat){ Preconditions.checkNotNull(uri, "Uri can not be null"); this.uri = uri; this.networkRecoveryInterval = networkRecoveryInterval; this.automaticRecovery = automaticRecovery; this.topologyRecovery = topologyRecovery; this.connectionTimeout = connectionTimeout; this.requestedChannelMax = requestedChannelMax; this.requestedFrameMax = requestedFrameMax; this.requestedHeartbeat = requestedHeartbeat; } }
[ "naist1020@gmail.com" ]
naist1020@gmail.com
680ddc64e9041e9080eb33f017e218251511e115
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_5d53be270cf2a9a53653d72e849f4b4e26500a4e/DatacenterAsyncClient/5_5d53be270cf2a9a53653d72e849f4b4e26500a4e_DatacenterAsyncClient_t.java
3ccd96ccfeb1f393a73a6052cfa75d3f56048fb0
[]
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
2,531
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.softlayer.features; import java.util.Set; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.core.MediaType; import org.jclouds.http.filters.BasicAuthentication; import org.jclouds.rest.annotations.ExceptionParser; import org.jclouds.rest.annotations.QueryParams; import org.jclouds.rest.annotations.RequestFilters; import org.jclouds.rest.functions.ReturnEmptySetOnNotFoundOr404; import org.jclouds.rest.functions.ReturnNullOnNotFoundOr404; import org.jclouds.softlayer.domain.Datacenter; import com.google.common.util.concurrent.ListenableFuture; /** * Provides asynchronous access to LocationDatacenter via their REST API. * <p/> * * @see DatacenterClient * @see <a href="http://sldn.softlayer.com/article/REST" /> * @author Adrian Cole */ @RequestFilters(BasicAuthentication.class) @Path("/v{jclouds.api-version}") public interface DatacenterAsyncClient { /** * @see DatacenterClient#listDatacenters */ @GET @Path("/SoftLayer_Location_Datacenter/Datacenters.json") @QueryParams(keys = "objectMask", values = "locationAddress") @Consumes(MediaType.APPLICATION_JSON) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) ListenableFuture<Set<Datacenter>> listDatacenters(); /** * @see DatacenterClient#getDatacenter */ @GET @Path("/SoftLayer_Location_Datacenter/{id}.json") @QueryParams(keys = "objectMask", values = "locationAddress") @Consumes(MediaType.APPLICATION_JSON) @ExceptionParser(ReturnNullOnNotFoundOr404.class) ListenableFuture<Datacenter> getDatacenter(@PathParam("id") long id); }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
05f75c14fefe73662bf8d37d1224fa268b0863ca
1a58c178773f6aeab14a58cb4d853710aac3eea9
/modules/lwjgl/llvm/src/generated/java/org/lwjgl/llvm/LLVMOptRemarks.java
4363abbbe3cd8373e12f07baab6033c7636d2473
[ "LGPL-2.0-or-later", "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "NCSA" ]
permissive
CRKatri/lwjgl3
12343871fd3eab7e5584a0b4a1e6bf82381b2f5d
139988556d4f1e45b3a73b799f9bf54014778b8a
refs/heads/master
2023-08-15T15:25:28.770018
2021-10-20T18:36:00
2021-10-20T18:36:00
383,857,413
11
2
BSD-3-Clause
2021-07-07T16:14:39
2021-07-07T16:14:38
null
UTF-8
Java
false
false
7,021
java
/* * Copyright LWJGL. All rights reserved. * License terms: https://www.lwjgl.org/license * MACHINE GENERATED FILE, DO NOT EDIT */ package org.lwjgl.llvm; import javax.annotation.*; import java.nio.*; import org.lwjgl.system.*; import static org.lwjgl.system.APIUtil.*; import static org.lwjgl.system.Checks.*; import static org.lwjgl.system.JNI.*; import static org.lwjgl.system.MemoryUtil.*; public class LLVMOptRemarks { /** Contains the function pointers loaded from {@code LLVMCore.getLibrary()}. */ public static final class Functions { private Functions() {} /** Function address. */ public static final long OptRemarkParserCreate = apiGetFunctionAddress(LLVMCore.getLibrary(), "LLVMOptRemarkParserCreate"), OptRemarkParserGetNext = apiGetFunctionAddress(LLVMCore.getLibrary(), "LLVMOptRemarkParserGetNext"), OptRemarkParserHasError = apiGetFunctionAddress(LLVMCore.getLibrary(), "LLVMOptRemarkParserHasError"), OptRemarkParserGetErrorMessage = apiGetFunctionAddress(LLVMCore.getLibrary(), "LLVMOptRemarkParserGetErrorMessage"), OptRemarkParserDispose = apiGetFunctionAddress(LLVMCore.getLibrary(), "LLVMOptRemarkParserDispose"), OptRemarkVersion = LLVMCore.getLibrary().getFunctionAddress("LLVMOptRemarkVersion"); } public static final int OPT_REMARKS_API_VERSION = 0; protected LLVMOptRemarks() { throw new UnsupportedOperationException(); } // --- [ LLVMOptRemarkParserCreate ] --- /** Unsafe version of: {@link #LLVMOptRemarkParserCreate OptRemarkParserCreate} */ public static long nLLVMOptRemarkParserCreate(long Buf, long Size) { long __functionAddress = Functions.OptRemarkParserCreate; return invokePJP(Buf, Size, __functionAddress); } /** * Creates a remark parser that can be used to read and parse the buffer located in {@code Buf} of size {@code Size}. * * <p>{@code Buf} cannot be {@code NULL}.</p> * * <p>This function should be paired with {@link #LLVMOptRemarkParserDispose OptRemarkParserDispose} to avoid leaking resources.</p> */ @NativeType("LLVMOptRemarkParserRef") public static long LLVMOptRemarkParserCreate(@NativeType("void const *") ByteBuffer Buf) { return nLLVMOptRemarkParserCreate(memAddress(Buf), Buf.remaining()); } // --- [ LLVMOptRemarkParserGetNext ] --- /** Unsafe version of: {@link #LLVMOptRemarkParserGetNext OptRemarkParserGetNext} */ public static long nLLVMOptRemarkParserGetNext(long Parser) { long __functionAddress = Functions.OptRemarkParserGetNext; if (CHECKS) { check(Parser); } return invokePP(Parser, __functionAddress); } /** * Returns the next remark in the file. * * <p>The value pointed to by the return value is invalidated by the next call to {@link #LLVMOptRemarkParserGetNext OptRemarkParserGetNext}.</p> * * <p>If the parser reaches the end of the buffer, the return value will be {@code NULL}.</p> * * <p>In the case of an error, the return value will be {@code NULL}, and:</p> * * <ol> * <li>{@link #LLVMOptRemarkParserHasError OptRemarkParserHasError} will return {@code 1}.</li> * <li>{@link #LLVMOptRemarkParserGetErrorMessage OptRemarkParserGetErrorMessage} will return a descriptive error message.</li> * </ol> * * <p>An error may occur if:</p> * * <ol> * <li>An argument is invalid.</li> * <li>There is a YAML parsing error. This type of error aborts parsing immediately and returns {@code 1}. It can occur on malformed YAML.</li> * <li>Remark parsing error. If this type of error occurs, the parser won't call the handler and will continue to the next one. It can occur on malformed * remarks, like missing or extra fields in the file.</li> * </ol> * * <p>Here is a quick example of the usage:</p> * * <pre><code> * LLVMOptRemarkParserRef Parser = LLVMOptRemarkParserCreate(Buf, Size); * LLVMOptRemarkEntry *Remark = NULL; * while ((Remark == LLVMOptRemarkParserGetNext(Parser))) { * // use Remark * } * bool HasError = LLVMOptRemarkParserHasError(Parser); * LLVMOptRemarkParserDispose(Parser);</code></pre> */ @Nullable @NativeType("LLVMOptRemarkEntry *") public static LLVMOptRemarkEntry LLVMOptRemarkParserGetNext(@NativeType("LLVMOptRemarkParserRef") long Parser) { long __result = nLLVMOptRemarkParserGetNext(Parser); return LLVMOptRemarkEntry.createSafe(__result); } // --- [ LLVMOptRemarkParserHasError ] --- /** Returns {@code 1} if the parser encountered an error while parsing the buffer. */ @NativeType("LLVMBool") public static boolean LLVMOptRemarkParserHasError(@NativeType("LLVMOptRemarkParserRef") long Parser) { long __functionAddress = Functions.OptRemarkParserHasError; if (CHECKS) { check(Parser); } return invokePI(Parser, __functionAddress) != 0; } // --- [ LLVMOptRemarkParserGetErrorMessage ] --- /** Unsafe version of: {@link #LLVMOptRemarkParserGetErrorMessage OptRemarkParserGetErrorMessage} */ public static long nLLVMOptRemarkParserGetErrorMessage(long Parser) { long __functionAddress = Functions.OptRemarkParserGetErrorMessage; if (CHECKS) { check(Parser); } return invokePP(Parser, __functionAddress); } /** * Returns a null-terminated string containing an error message. * * <p>In case of no error, the result is {@code NULL}.</p> * * <p>The memory of the string is bound to the lifetime of {@code Parser}. If {@link #LLVMOptRemarkParserDispose OptRemarkParserDispose} is called, the memory of the string will be * released.</p> */ @Nullable @NativeType("char const *") public static String LLVMOptRemarkParserGetErrorMessage(@NativeType("LLVMOptRemarkParserRef") long Parser) { long __result = nLLVMOptRemarkParserGetErrorMessage(Parser); return memUTF8Safe(__result); } // --- [ LLVMOptRemarkParserDispose ] --- /** Releases all the resources used by {@code Parser}. */ public static void LLVMOptRemarkParserDispose(@NativeType("LLVMOptRemarkParserRef") long Parser) { long __functionAddress = Functions.OptRemarkParserDispose; if (CHECKS) { check(Parser); } invokePV(Parser, __functionAddress); } // --- [ LLVMOptRemarkVersion ] --- /** * Returns the version of the opt-remarks dylib. * * @since 8.0 */ @NativeType("uint32_t") public static int LLVMOptRemarkVersion() { long __functionAddress = Functions.OptRemarkVersion; if (CHECKS) { check(__functionAddress); } return invokeI(__functionAddress); } }
[ "iotsakp@gmail.com" ]
iotsakp@gmail.com
26ce29821f27bcb5435a5b556ed09c046cb4359d
963599f6f1f376ba94cbb504e8b324bcce5de7a3
/sources/p035ru/unicorn/ujin/view/activity/navigation/p058ui/corona/AllAdressesFragment$initSections$1.java
187754bc57a5acacae135daee199bdfe435b76b7
[]
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
1,289
java
package p035ru.unicorn.ujin.view.activity.navigation.p058ui.corona; import kotlin.Metadata; import p035ru.unicorn.ujin.view.activity.navigation.p058ui.corona.model.ProfileAdress; import p059rx.functions.Action1; @Metadata(mo51341bv = {1, 0, 3}, mo51342d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u00012\u000e\u0010\u0002\u001a\n \u0004*\u0004\u0018\u00010\u00030\u0003H\n¢\u0006\u0002\b\u0005"}, mo51343d2 = {"<anonymous>", "", "data", "Lru/unicorn/ujin/view/activity/navigation/ui/corona/model/ProfileAdress;", "kotlin.jvm.PlatformType", "call"}, mo51344k = 3, mo51345mv = {1, 4, 1}) /* renamed from: ru.unicorn.ujin.view.activity.navigation.ui.corona.AllAdressesFragment$initSections$1 */ /* compiled from: AllAdressesFragment.kt */ final class AllAdressesFragment$initSections$1<T> implements Action1<ProfileAdress> { final /* synthetic */ AllAdressesFragment this$0; AllAdressesFragment$initSections$1(AllAdressesFragment allAdressesFragment) { this.this$0 = allAdressesFragment; } public final void call(ProfileAdress profileAdress) { AllAdressesFragment.access$getViewModell$p(this.this$0).getCurrentAddress().set(profileAdress); this.this$0.popFragment(); } }
[ "a.amirovv@mail.ru" ]
a.amirovv@mail.ru
c525f7750723a0adcb55f7e1f8a4d3d0d560d1a4
9f763caaa6ce779360df8118d986a8995bfbf669
/modules/core/src/com/vk/api/sdk/queries/messages/MessagesDeleteQuery.java
55b338c855749ea67f3bd56bb7d40a181a97d82b
[]
no_license
SevDan/blacklist
4ac82e9bee5e69387c29fefe1c81e900ba87a8df
62a5512cc3c888457dea0adfa1e4919d9d4486f0
refs/heads/master
2023-03-14T09:49:22.008922
2021-03-06T12:54:56
2021-03-06T12:54:56
203,603,711
3
0
null
null
null
null
UTF-8
Java
false
false
3,350
java
package com.vk.api.sdk.queries.messages; import com.google.gson.reflect.TypeToken; import com.vk.api.sdk.client.AbstractQueryBuilder; import com.vk.api.sdk.client.VkApiClient; import com.vk.api.sdk.client.actors.GroupActor; import com.vk.api.sdk.client.actors.UserActor; import com.vk.api.sdk.objects.base.BoolInt; import java.util.Arrays; import java.util.List; import java.util.Map; /** * Query for Messages.delete method */ public class MessagesDeleteQuery extends AbstractQueryBuilder<MessagesDeleteQuery, Map<Integer, String>> { /** * Creates a AbstractQueryBuilder instance that can be used to build api request with various parameters * * @param client VK API client * @param actor actor with access token */ public MessagesDeleteQuery(VkApiClient client, UserActor actor) { super(client, "messages.delete", new TypeToken< Map< Integer, BoolInt> >(){}.getType()); accessToken(actor.getAccessToken()); } /** * Creates a AbstractQueryBuilder instance that can be used to build api request with various parameters * * @param client VK API client * @param actor actor with access token */ public MessagesDeleteQuery(VkApiClient client, GroupActor actor) { super(client, "messages.delete", new TypeToken< Map< Integer, BoolInt> >(){}.getType()); accessToken(actor.getAccessToken()); groupId(actor.getGroupId()); } /** * '1' — to mark message as spam. * * @param value value of "spam" parameter. * @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern. */ public MessagesDeleteQuery spam(Boolean value) { return unsafeParam("spam", value); } /** * Group ID (for group messages with user access token) * * @param value value of "group id" parameter. Minimum is 0. * @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern. */ public MessagesDeleteQuery groupId(Integer value) { return unsafeParam("group_id", value); } /** * '1' — delete message for for all. * * @param value value of "delete for all" parameter. By default false. * @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern. */ public MessagesDeleteQuery deleteForAll(Boolean value) { return unsafeParam("delete_for_all", value); } /** * message_ids * Message IDs. * * @param value value of "message ids" parameter. * @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern. */ public MessagesDeleteQuery messageIds(Integer... value) { return unsafeParam("message_ids", value); } /** * Message IDs. * * @param value value of "message ids" parameter. * @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern. */ public MessagesDeleteQuery messageIds(List<Integer> value) { return unsafeParam("message_ids", value); } @Override protected MessagesDeleteQuery getThis() { return this; } @Override protected List<String> essentialKeys() { return Arrays.asList("access_token"); } }
[ "danielsevostyanov@gmail.com" ]
danielsevostyanov@gmail.com
2234e8ba61b054d9250cf419a6536ce7a29fef8c
c6f145685b7d5de6b4d9b9460edc9e52d54b9f81
/test_cases/CWE259/CWE259_Hard_Coded_Password_mysqlDataSourceSetPassword/CWE259_Hard_Coded_Password_mysqlDataSourceSetPassword_22b.java
aa2cdc8b0bce0ccd88817752dd0e8f9fa4827ebb
[]
no_license
Johndoetheone/new-test-repair
531ca91dab608abd52eb474c740c0a211ba8eb9f
7fa0e221093a60c340049e80ce008e233482269c
refs/heads/master
2022-04-26T03:44:51.807603
2020-04-25T01:10:47
2020-04-25T01:10:47
258,659,310
0
0
null
null
null
null
UTF-8
Java
false
false
6,291
java
/* * TEMPLATE GENERATED TESTCASE FILE * @description * CWE: 259 Hard Coded Password * BadSource: hardcodedPassword Set data to a hardcoded string * Flow Variant: 22 Control flow: Flow controlled by value of a public static variable. Sink functions are in a separate file from sources. * */ package test_cases.CWE259.CWE259_Hard_Coded_Password_mysqlDataSourceSetPassword; import testcasesupport.*; import java.util.Arrays; import java.util.Properties; import java.util.logging.Level; import java.io.*; import java.sql.*; import com.mysql.cj.jdbc.MysqlDataSource; public class CWE259_Hard_Coded_Password_mysqlDataSourceSetPassword_22b { public String badSource() throws Throwable { String data; if (CWE259_Hard_Coded_Password_mysqlDataSourceSetPassword_22a.badPublicStatic) { /* FLAW: Set data to a hardcoded string */ data = "7e5tc4s3"; } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = null; } return data; } /* goodG2B1() - use goodsource and badsink by setting the static variable to false instead of true */ public String goodG2B1Source() throws Throwable { String data; if (CWE259_Hard_Coded_Password_mysqlDataSourceSetPassword_22a.goodG2B1PublicStatic) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = null; } else { data = ""; /* init data */ /* FIX */ try { InputStreamReader readerInputStream = new InputStreamReader(System.in, "UTF-8"); BufferedReader readerBuffered = new BufferedReader(readerInputStream); /* POTENTIAL FLAW: Read data from the console using readLine */ data = readerBuffered.readLine(); } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } } return data; } /* goodG2B2() - use goodsource and badsink by reversing the blocks in the if in the sink function */ public String goodG2B2Source() throws Throwable { String data; if (CWE259_Hard_Coded_Password_mysqlDataSourceSetPassword_22a.goodG2B2PublicStatic) { data = ""; /* init data */ /* FIX */ try { InputStreamReader readerInputStream = new InputStreamReader(System.in, "UTF-8"); BufferedReader readerBuffered = new BufferedReader(readerInputStream); /* POTENTIAL FLAW: Read data from the console using readLine */ data = readerBuffered.readLine(); } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = null; } return data; } /* goodCharSource() - uses the expected Properties file and a char[] data variable*/ public char[] goodCharSource() throws Throwable { char[] data = null; if (CWE259_Hard_Coded_Password_mysqlDataSourceSetPassword_22a.goodG2B2PublicStatic) { Properties properties = new Properties(); FileInputStream streamFileInput = null; try { streamFileInput = new FileInputStream("src/juliet_test/resources/config.properties"); properties.load(streamFileInput); data = properties.getProperty("password").toCharArray(); } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* clean up stream reading objects */ try { if (streamFileInput != null) { streamFileInput.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing FileInputStream", exceptIO); } } } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = null; } return data; } /* goodExpectedSource() - uses the expected Properties file and uses the password directly from it*/ public Properties goodExpectedSource() throws Throwable { Properties properties = new Properties(); FileInputStream streamFileInput = null; if (CWE259_Hard_Coded_Password_mysqlDataSourceSetPassword_22a.goodG2B2PublicStatic) { try { streamFileInput = new FileInputStream("src/juliet_test/resources/config.properties"); properties.load(streamFileInput); } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* clean up stream reading objects */ try { if (streamFileInput != null) { streamFileInput.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing FileInputStream", exceptIO); } } } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ properties = null; } return properties; } }
[ "root@Delta.localdomain" ]
root@Delta.localdomain
af5714e12eb5b865da65e63a79b0d7d796e9412e
78e6601aed8c18764ab5132f47962659d22489e5
/microservices/ui-request-service/src/main/java/org/mddarr/uirequestservice/models/RefreshToken.java
fc0cfd7b917e7310e626c1864fa7f16478775568
[]
no_license
MathiasDarr/kafka-orders-microservices
a34410fe1158ea1d3a725b03a2c0f780bfbd7e92
bea423df32351c50cbf39f8aacb589e5cf6654da
refs/heads/master
2023-02-24T17:40:26.635258
2021-01-22T06:39:25
2021-01-22T06:39:25
329,198,331
0
0
null
null
null
null
UTF-8
Java
false
false
474
java
package org.mddarr.uirequestservice.models; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import java.time.Instant; @Data @Entity @AllArgsConstructor @NoArgsConstructor @Table(name="refresh_token",schema = "users") public class RefreshToken { @Id private String id; private String token; private Instant created_date; }
[ "mddarr@gmail.com" ]
mddarr@gmail.com
a40564c541cdbc0f93bb1a081c8af200f9f1fede
40323da1f87a2b47788ffee20e5045cec260fa42
/src/main/java/com/example/godcode_en/greendao/entity/VersionMsg.java
729e76918bae8ab0ea6482bbfaeaf06cab3388c5
[]
no_license
huanglonghu/GodCode_EN
e2e602bcdfcc76c973f2f859dd2bb52c7ef20f8e
42e9fc3d7e2992f48ce08154f2b178dc6dfcfb96
refs/heads/master
2021-03-20T08:14:30.332078
2020-04-27T09:11:57
2020-04-27T09:11:57
247,189,088
0
0
null
null
null
null
UTF-8
Java
false
false
898
java
package com.example.godcode_en.greendao.entity; import org.greenrobot.greendao.annotation.Entity; import org.greenrobot.greendao.annotation.Generated; /** * Created by Administrator on 2018/10/31. */ @Entity public class VersionMsg { private String versionCode; private String versionDes; @Generated(hash = 157486909) public VersionMsg(String versionCode, String versionDes) { this.versionCode = versionCode; this.versionDes = versionDes; } @Generated(hash = 674742834) public VersionMsg() { } public String getVersionCode() { return this.versionCode; } public void setVersionCode(String versionCode) { this.versionCode = versionCode; } public String getVersionDes() { return this.versionDes; } public void setVersionDes(String versionDes) { this.versionDes = versionDes; } }
[ "952204748@qq.com" ]
952204748@qq.com
29a9574c9ec7c18bc97c041827cdb721e5072451
21d748e3318633635b78e0365726171e23b5562c
/sql-dsl/src/main/java/com/neaterbits/query/sql/dsl/api/IClassicResult_Mapped_Multi_Named.java
caaecbe098afbfe0d97dd15d83d7d67f68e4b6e9
[]
no_license
neaterbits/query
ee9419737e39c53261c01fd31d0679561a303f15
eaec0deaa91e90ec44402af6fbba41ed9c2bf1a9
refs/heads/master
2022-05-04T02:21:42.605462
2017-09-10T14:49:35
2017-09-10T14:49:35
70,929,750
0
0
null
null
null
null
UTF-8
Java
false
false
319
java
package com.neaterbits.query.sql.dsl.api; public interface IClassicResult_Mapped_Multi_Named<MODEL, RESULT> extends IClassicMultiSelectSourceBuilder<MODEL, RESULT>, IClassic_From_MultiMapped_Named<MODEL, RESULT>, ISharedMap_Initial_Named<MODEL, RESULT, IClassicResult_Mapped_Multi_Named<MODEL,RESULT>>{ }
[ "nils.lorentzen@gmail.com" ]
nils.lorentzen@gmail.com
d94c32ca41eee42664663ffd0db52de940d0151c
c685fa5b85f78fa2a440624d139bb4ea2c7f5c22
/servicemodule/src/main/java/illiyin/mhandharbeni/servicemodule/service/intentservice/ChatService.java
353f6dc75849f04e19e33db4ce9a7f2488746ef7
[]
no_license
handharbeni/TrackJamaahUmroh
6a7ca1782768c64c7d6b84eb169027a5d112f65c
09dcf56f6c5cb096a94008b732b41217e8876b87
refs/heads/master
2021-07-12T19:16:54.059573
2017-10-19T02:36:43
2017-10-19T02:36:43
103,292,815
0
0
null
null
null
null
UTF-8
Java
false
false
1,075
java
package illiyin.mhandharbeni.servicemodule.service.intentservice; import android.app.IntentService; import android.content.Intent; import illiyin.mhandharbeni.databasemodule.AdapterModel; import illiyin.mhandharbeni.databasemodule.GrupModel; import illiyin.mhandharbeni.servicemodule.service.MainService; /** * Created by root on 9/21/17. */ public class ChatService extends IntentService { public static final String ACTION_LOCATION_BROADCAST = MainService.class.getName(); AdapterModel adapterModel; public ChatService() { super("Chat Service"); } @Override public int onStartCommand(Intent intent, int flags, int startId) { adapterModel = new AdapterModel(getBaseContext()); sendBroadCast(); return super.onStartCommand(intent, flags, startId); } public void sendBroadCast(){ this.sendBroadcast(new Intent().setAction("SERVICE MENU").putExtra("MODE", "UPDATE CHAT")); } @Override protected void onHandleIntent(Intent intent) { adapterModel.syncChat(); } }
[ "mhandharbeni@gmail.com" ]
mhandharbeni@gmail.com
6d5de80c061c428a0936349538116287f3340fab
0acabd81d062e9b34ab172249ce3180bf55b526a
/src/main/java/com/huaxu/core/leetcode/topic000/Topic26_2.java
bc2925a25121471ad172893428d028a421a3a6a0
[]
no_license
BlHole/core
445f87c12a4c47f42aa0548b2a24342109d5b713
97441613c9c9e39738af22c7188c6b01e9044c17
refs/heads/master
2022-05-30T12:39:44.207637
2020-04-01T10:21:10
2020-04-01T10:21:10
229,370,125
1
0
null
null
null
null
UTF-8
Java
false
false
613
java
package com.huaxu.core.leetcode.topic000; /** * <p>项目名称: leetcode</p> * <p>文件名称: topic000.Topic26_2</p> * <p>文件描述: </p> * <p>创建日期: 2019/06/16 22:57</p> * <p>创建用户:huaxu</p> */ public class Topic26_2 { class Solution { public int removeDuplicates(int[] nums) { if (nums.length == 0) return 0; int i = 0; for (int j = 0,length = nums.length; j < length; j++) { if (nums[i] != nums[j]) { nums[++i] = nums[j]; } } return i+1; } } }
[ "tshy0425@hotmail.com" ]
tshy0425@hotmail.com
12beba6eb5e0261c370053f62f62b0ad7bac01b8
6d0b97c6cd23f99db508c08f99b651d08a3ac7ef
/src/test/java/org/assertj/core/api/offsetdatetime/OffsetDateTimeAssert_isEqualToIgnoringMinutes_Test.java
2a7ef9f95085a0ef3aaa97d909bb18eb77587e54
[ "Apache-2.0" ]
permissive
lpandzic/assertj-core
14054dd2e42019fc173168e4e6e494ce3528a8f1
165a4b4f54e2c78cfca652ae6324a49d6d20243b
refs/heads/master
2021-01-21T05:32:10.144265
2016-01-04T07:43:56
2016-01-04T07:43:56
31,382,191
1
0
null
2015-02-26T18:33:50
2015-02-26T18:33:50
null
UTF-8
Java
false
false
3,244
java
/** * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * * Copyright 2012-2014 the original author or authors. */ package org.assertj.core.api.offsetdatetime; import static java.lang.String.format; import static java.time.OffsetDateTime.of; import static java.time.ZoneOffset.UTC; import static org.assertj.core.api.AbstractOffsetDateTimeAssert.NULL_OFFSET_DATE_TIME_PARAMETER_MESSAGE; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.util.FailureMessages.actualIsNull; import java.time.OffsetDateTime; import org.assertj.core.api.BaseTest; import org.junit.Test; public class OffsetDateTimeAssert_isEqualToIgnoringMinutes_Test extends BaseTest { private final OffsetDateTime refOffsetDateTime = of(2000, 1, 1, 23, 0, 0, 0, UTC); @Test public void should_pass_if_actual_is_equal_to_other_ignoring_minute_fields() { assertThat(refOffsetDateTime).isEqualToIgnoringMinutes(refOffsetDateTime.plusMinutes(1)); } @Test public void should_fail_if_actual_is_not_equal_to_given_offsetdatetime_with_minute_ignored() { try { assertThat(refOffsetDateTime).isEqualToIgnoringMinutes(refOffsetDateTime.minusMinutes(1)); } catch (AssertionError e) { assertThat(e).hasMessage(format("%n" + "Expecting:%n" + " <2000-01-01T23:00Z>%n" + "to have same year, month, day and hour as:%n" + " <2000-01-01T22:59Z>%nbut had not.")); return; } failBecauseExpectedAssertionErrorWasNotThrown(); } @Test public void should_fail_as_minutes_fields_are_different_even_if_time_difference_is_less_than_a_minute() { try { assertThat(refOffsetDateTime).isEqualToIgnoringMinutes(refOffsetDateTime.minusNanos(1)); } catch (AssertionError e) { assertThat(e).hasMessage(format("%n" + "Expecting:%n" + " <2000-01-01T23:00Z>%n" + "to have same year, month, day and hour as:%n" + " <2000-01-01T22:59:59.999999999Z>%nbut had not.")); return; } failBecauseExpectedAssertionErrorWasNotThrown(); } @Test public void should_fail_if_actual_is_null() { expectException(AssertionError.class, actualIsNull()); OffsetDateTime actual = null; assertThat(actual).isEqualToIgnoringMinutes(OffsetDateTime.now()); } @Test public void should_throw_error_if_given_offsetdatetime_is_null() { expectIllegalArgumentException(NULL_OFFSET_DATE_TIME_PARAMETER_MESSAGE); assertThat(refOffsetDateTime).isEqualToIgnoringMinutes(null); } }
[ "joel.costigliola@gmail.com" ]
joel.costigliola@gmail.com
d78448c171f4d21c1715cca9094341f5150019b6
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module1522_internal/src/java/module1522_internal/a/IFoo1.java
9b87514beb1999e67b900b0a2426c004b7e4d052
[ "BSD-3-Clause" ]
permissive
salesforce/bazel-ls-demo-project
5cc6ef749d65d6626080f3a94239b6a509ef145a
948ed278f87338edd7e40af68b8690ae4f73ebf0
refs/heads/master
2023-06-24T08:06:06.084651
2023-03-14T11:54:29
2023-03-14T11:54:29
241,489,944
0
5
BSD-3-Clause
2023-03-27T11:28:14
2020-02-18T23:30:47
Java
UTF-8
Java
false
false
879
java
package module1522_internal.a; import javax.naming.directory.*; import javax.net.ssl.*; import javax.rmi.ssl.*; /** * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut * labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. * Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. * * @see javax.annotation.processing.Completion * @see javax.lang.model.AnnotatedConstruct * @see javax.management.Attribute */ @SuppressWarnings("all") public interface IFoo1<V> extends module1522_internal.a.IFoo0<V> { javax.naming.directory.DirContext f0 = null; javax.net.ssl.ExtendedSSLSession f1 = null; javax.rmi.ssl.SslRMIClientSocketFactory f2 = null; String getName(); void setName(String s); V get(); void set(V e); }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
185e4a7cffac34da2854f26a48301f5da9d4f56c
94d82b4db53ec55d14e123743131d2affd0a8c6f
/src/main/java/com/fengwenyi/code_generator/Config.java
d7e33c83b177879fecc95819bcf237d4a63d4791
[ "MIT" ]
permissive
superzoeyian/mybatis-plus-code-generator
564607dc38ca897af0c3fb49cbb5ece65b75c685
e254eeebde4596fa3926a3d8c397e86555ce82a9
refs/heads/master
2023-06-04T00:14:44.432787
2021-06-21T08:35:29
2021-06-21T08:35:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,025
java
package com.fengwenyi.code_generator; /** * @author Erwin Feng * @since 2019-04-17 12:04 */ public class Config { /** 包名:controller */ public static final String PACKAGE_NAME_CONTROLLER = "controller"; /** 包名:service */ public static final String PACKAGE_NAME_SERVICE = "repository"; /** 包名:service.impl */ public static final String PACKAGE_NAME_SERVICE_IMPL = "repository.impl"; /** 包名:model */ public static final String PACKAGE_NAME_MODEL = "entity"; /** 包名:dao */ public static final String PACKAGE_NAME_DAO = "dao"; /** 目录名:xml */ public static final String DIR_NAME_XML = "mapper"; /** 文件名后缀:Model */ public static final String FILE_NAME_MODEL = "%sEntity"; /** 文件名后缀:Dao */ public static final String FILE_NAME_DAO = "I%sDao"; /** 文件名后缀:Mapper */ public static final String FILE_NAME_XML = "%sMapper"; /** MP开头,Service结尾 */ public static final String FILE_NAME_SERVICE = "MP%sRepository"; /** 文件名后缀:ServiceImpl */ public static final String FILE_NAME_SERVICE_IMPL = "%sRepositoryImpl"; /** 文件名后缀:Controller */ public static final String FILE_NAME_CONTROLLER = "%sController"; /** 逻辑删除字段 */ public static final String FIELD_LOGIC_DELETE_NAME = "delete_status"; /** 乐观锁字段名 */ public static final String FIELD_VERSION_NAME = "version"; /** 作者 */ public static final String AUTHOR = "Erwin Feng"; /** 生成文件的输出目录 */ public static String PROJECT_PATH = System.getProperty("user.dir"); /** 输出目录 */ public static final String OUTPUT_DIR = PROJECT_PATH + "/temp/code-generator"; /** 模板引擎。velocity / freemarker / beetl */ public static final String TEMPLATE_ENGINE = "velocity"; /** 是否支持Swagger,默认不支持 */ public static final Boolean SWAGGER_SUPPORT = false; }
[ "xfsy_2015@163.com" ]
xfsy_2015@163.com
990717c590efd20d024a275334fe4acbc0fa2fdd
30045fb00c68306841ef742d583ec341b23c3121
/iwsc2017/decompile/jfreechart/src/main/java/org/jfree/chart/urls/XYURLGenerator.java
27844517ed9f0f0ee4c60b2adbf0e660a07b8744
[]
no_license
cragkhit/crjk-iwsc17
df9132738e88d6fe47c1963f32faa5a100d41299
a2915433fd2173e215b8e13e8fa0779bd5ccfe99
refs/heads/master
2021-01-13T15:12:15.553582
2016-12-12T16:13:07
2016-12-12T16:13:07
76,252,648
0
1
null
null
null
null
UTF-8
Java
false
false
159
java
package org.jfree.chart.urls; import org.jfree.data.xy.XYDataset; public interface XYURLGenerator { String generateURL ( XYDataset p0, int p1, int p2 ); }
[ "ucabagk@ucl.ac.uk" ]
ucabagk@ucl.ac.uk
46591e5ea97a1a93e2e5df2fc1e72970b6f8d682
3edc0947701d873363bfbc5f4bbb8f5ec42ef6c5
/src/de/caluga/morphium/driver/bulk/StoreBulkRequest.java
9235ead20911d3fa485ce8fb32347e83baf965bd
[]
no_license
GermanGeekN/morphium
8a98357941f9ec6a7fbfda9a3c504b0d67224457
b87f513abb582c315ecdc0cd0e8be66384d8742f
refs/heads/master
2021-06-28T15:25:38.409509
2020-09-10T12:45:38
2020-09-10T12:45:38
141,058,179
1
0
null
2018-07-15T21:00:48
2018-07-15T21:00:48
null
UTF-8
Java
false
false
324
java
package de.caluga.morphium.driver.bulk; /** * Created by stephan on 27.11.15. */ import java.util.List; import java.util.Map; /** * store bulk request **/ public class StoreBulkRequest extends InsertBulkRequest { public StoreBulkRequest(List<Map<String, Object>> objToStore) { super(objToStore); } }
[ "sb@caluga.de" ]
sb@caluga.de
1455dfe365b858c9d0dfe4186a21a838edac2ad7
5e224ff6d555ee74e0fda6dfa9a645fb7de60989
/database/src/main/java/adila/db/alto55fsporty_7048w.java
0f743756a5b3956d1e8c13d2ff9640ca3617a8db
[ "MIT" ]
permissive
karim/adila
8b0b6ba56d83f3f29f6354a2964377e6197761c4
00f262f6d5352b9d535ae54a2023e4a807449faa
refs/heads/master
2021-01-18T22:52:51.508129
2016-11-13T13:08:04
2016-11-13T13:08:04
45,054,909
3
1
null
null
null
null
UTF-8
Java
false
false
224
java
// This file is automatically generated. package adila.db; /* * Alcatel Go PLAY * * DEVICE: alto5_sporty * MODEL: 7048W */ final class alto55fsporty_7048w { public static final String DATA = "Alcatel|Go PLAY|"; }
[ "keldeeb@gmail.com" ]
keldeeb@gmail.com
e21406e265bf109e2e88001bd0d283ca8770f819
7f53ff59587c1feea58fb71f7eff5608a5846798
/temp/ffout/client/net/minecraft/src/BlockRedstoneTorch.java
26ccdec6d1d89fdf0175e0fd6e7ee9fd14707d1f
[]
no_license
Orazur66/Minecraft-Client
45c918d488f2f9fca7d2df3b1a27733813d957a5
70a0b63a6a347fd87a7dbe28c7de588f87df97d3
refs/heads/master
2021-01-15T17:08:18.072298
2012-02-14T21:29:14
2012-02-14T21:29:14
3,423,624
3
0
null
null
null
null
UTF-8
Java
false
false
7,015
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode fieldsfirst package net.minecraft.src; import java.util.*; // Referenced classes of package net.minecraft.src: // BlockTorch, Block, RedstoneUpdateInfo, World, // IBlockAccess public class BlockRedstoneTorch extends BlockTorch { private boolean field_451_a; private static List field_450_b = new ArrayList(); public int func_232_a(int i, int j) { if(i == 1) { return Block.field_394_aw.func_232_a(i, j); } else { return super.func_232_a(i, j); } } private boolean func_273_a(World world, int i, int j, int k, boolean flag) { if(flag) { field_450_b.add(new RedstoneUpdateInfo(i, j, k, world.func_22139_r())); } int l = 0; for(int i1 = 0; i1 < field_450_b.size(); i1++) { RedstoneUpdateInfo redstoneupdateinfo = (RedstoneUpdateInfo)field_450_b.get(i1); if(redstoneupdateinfo.field_1009_a == i && redstoneupdateinfo.field_1008_b == j && redstoneupdateinfo.field_1011_c == k && ++l >= 8) { return true; } } return false; } protected BlockRedstoneTorch(int i, int j, boolean flag) { super(i, j); field_451_a = false; field_451_a = flag; func_253_b(true); } public int func_4025_d() { return 2; } public void func_235_e(World world, int i, int j, int k) { if(world.func_602_e(i, j, k) == 0) { super.func_235_e(world, i, j, k); } if(field_451_a) { world.func_611_g(i, j - 1, k, field_376_bc); world.func_611_g(i, j + 1, k, field_376_bc); world.func_611_g(i - 1, j, k, field_376_bc); world.func_611_g(i + 1, j, k, field_376_bc); world.func_611_g(i, j, k - 1, field_376_bc); world.func_611_g(i, j, k + 1, field_376_bc); } } public void func_214_b(World world, int i, int j, int k) { if(field_451_a) { world.func_611_g(i, j - 1, k, field_376_bc); world.func_611_g(i, j + 1, k, field_376_bc); world.func_611_g(i - 1, j, k, field_376_bc); world.func_611_g(i + 1, j, k, field_376_bc); world.func_611_g(i, j, k - 1, field_376_bc); world.func_611_g(i, j, k + 1, field_376_bc); } } public boolean func_231_b(IBlockAccess iblockaccess, int i, int j, int k, int l) { if(!field_451_a) { return false; } int i1 = iblockaccess.func_602_e(i, j, k); if(i1 == 5 && l == 1) { return false; } if(i1 == 3 && l == 3) { return false; } if(i1 == 4 && l == 2) { return false; } if(i1 == 1 && l == 5) { return false; } return i1 != 2 || l != 4; } private boolean func_30002_h(World world, int i, int j, int k) { int l = world.func_602_e(i, j, k); if(l == 5 && world.func_706_k(i, j - 1, k, 0)) { return true; } if(l == 3 && world.func_706_k(i, j, k - 1, 2)) { return true; } if(l == 4 && world.func_706_k(i, j, k + 1, 3)) { return true; } if(l == 1 && world.func_706_k(i - 1, j, k, 4)) { return true; } return l == 2 && world.func_706_k(i + 1, j, k, 5); } public void func_208_a(World world, int i, int j, int k, Random random) { boolean flag = func_30002_h(world, i, j, k); for(; field_450_b.size() > 0 && world.func_22139_r() - ((RedstoneUpdateInfo)field_450_b.get(0)).field_1010_d > 100L; field_450_b.remove(0)) { } if(field_451_a) { if(flag) { world.func_688_b(i, j, k, Block.field_431_aQ.field_376_bc, world.func_602_e(i, j, k)); if(func_273_a(world, i, j, k, true)) { world.func_684_a((float)i + 0.5F, (float)j + 0.5F, (float)k + 0.5F, "random.fizz", 0.5F, 2.6F + (world.field_1037_n.nextFloat() - world.field_1037_n.nextFloat()) * 0.8F); for(int l = 0; l < 5; l++) { double d = (double)i + random.nextDouble() * 0.59999999999999998D + 0.20000000000000001D; double d1 = (double)j + random.nextDouble() * 0.59999999999999998D + 0.20000000000000001D; double d2 = (double)k + random.nextDouble() * 0.59999999999999998D + 0.20000000000000001D; world.func_694_a("smoke", d, d1, d2, 0.0D, 0.0D, 0.0D); } } } } else if(!flag && !func_273_a(world, i, j, k, false)) { world.func_688_b(i, j, k, Block.field_430_aR.field_376_bc, world.func_602_e(i, j, k)); } } public void func_226_a(World world, int i, int j, int k, int l) { super.func_226_a(world, i, j, k, l); world.func_22136_c(i, j, k, field_376_bc, func_4025_d()); } public boolean func_228_c(World world, int i, int j, int k, int l) { if(l == 0) { return func_231_b(world, i, j, k, l); } else { return false; } } public int func_240_a(int i, Random random, int j) { return Block.field_430_aR.field_376_bc; } public boolean func_209_d() { return true; } public void func_247_b(World world, int i, int j, int k, Random random) { if(!field_451_a) { return; } int l = world.func_602_e(i, j, k); double d = (double)((float)i + 0.5F) + (double)(random.nextFloat() - 0.5F) * 0.20000000000000001D; double d1 = (double)((float)j + 0.7F) + (double)(random.nextFloat() - 0.5F) * 0.20000000000000001D; double d2 = (double)((float)k + 0.5F) + (double)(random.nextFloat() - 0.5F) * 0.20000000000000001D; double d3 = 0.2199999988079071D; double d4 = 0.27000001072883606D; if(l == 1) { world.func_694_a("reddust", d - d4, d1 + d3, d2, 0.0D, 0.0D, 0.0D); } else if(l == 2) { world.func_694_a("reddust", d + d4, d1 + d3, d2, 0.0D, 0.0D, 0.0D); } else if(l == 3) { world.func_694_a("reddust", d, d1 + d3, d2 - d4, 0.0D, 0.0D, 0.0D); } else if(l == 4) { world.func_694_a("reddust", d, d1 + d3, d2 + d4, 0.0D, 0.0D, 0.0D); } else { world.func_694_a("reddust", d, d1, d2, 0.0D, 0.0D, 0.0D); } } }
[ "Ninja_Buta@hotmail.fr" ]
Ninja_Buta@hotmail.fr
5a6f38f2c2e9d45936ee905c8d21a76b5a734f61
fe201a4508b4ad855a27579d1898ea739cf42ccd
/shake/src/main/java/com/shake/BaseShakeActivity.java
61636509a00d374946a4634bb6cfd45e14093e11
[]
no_license
cheng-junfeng/xman
2725bd9ea3d12e88771d0221bb08f54244519951
28fd04adf3ff4712edfb5f71a6c976358c050028
refs/heads/master
2020-03-20T09:54:42.632097
2018-06-30T07:28:12
2018-06-30T07:28:12
137,352,434
1
0
null
null
null
null
UTF-8
Java
false
false
2,055
java
package com.shake; import android.app.Activity; import android.app.Service; import android.content.Context; import android.hardware.Sensor; import android.hardware.SensorManager; import android.os.Bundle; import android.os.Handler; import android.os.Vibrator; import android.widget.Toast; public abstract class BaseShakeActivity extends Activity implements Shakeable { //传感器管理器 protected SensorManager manager; //传感器监听器 protected MySensorEventListener listener; protected Handler handler; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); manager = (SensorManager) this.getSystemService(Service.SENSOR_SERVICE); listener = new MySensorEventListener(this); handler = new Handler(); } @Override protected void onResume() { super.onResume(); manager.registerListener(listener, manager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_NORMAL); } //摇一摇的回调方法 public void onShake(Object... objs) { if (getShakeable()) { float[] values = (float[]) objs[0]; final Vibrator vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); long[] pattern = {100, 400, 100, 400}; vibrator.vibrate(pattern, 2); handler.postDelayed(new Runnable() { @Override public void run() { vibrator.cancel(); } }, 1000); Toast.makeText(this, "x:" + values[0] + ",y:" + values[1] + ",z:" + values[2], Toast.LENGTH_SHORT).show(); } } //如果某个页面不想处理摇一摇事件,将isShakeable设置为false即可 protected boolean getShakeable() { return true; } @Override protected void onDestroy() { super.onDestroy(); manager.unregisterListener(listener); handler.removeCallbacks(null); } }
[ "sjun945@outlook.com" ]
sjun945@outlook.com
35c22d5febf694c73b25d3905d5b16db1470b619
9e84e426b62478ac863e0b178b2123116c832016
/src/com/ecodation/generics/TelephoneNormal.java
f782114df3320c4dc8adee016714d69389a765ef
[]
no_license
hamitmizrak/EcodationJavaSE2
0981eaed30d32d9435b67d61bd4cf4eef3782fda
025be01187ff8cebdd8a0fcf60cb5b15e2f3a575
refs/heads/main
2023-02-19T13:37:54.256782
2021-01-16T07:02:57
2021-01-16T07:02:57
320,809,122
1
0
null
null
null
null
UTF-8
Java
false
false
521
java
package com.ecodation.generics; public class TelephoneNormal { private long id; private String name; public TelephoneNormal() { // TODO Auto-generated constructor stub } public TelephoneNormal(long id, String name) { super(); this.id = id; this.name = name; } public long getId() { return id; } public void setId(long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "hamitmizrak@gmail.com" ]
hamitmizrak@gmail.com
c064735344bdf580cd996f0d1c6237d3e81cc007
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-8281-4-17-FEMO-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/web/EditAction_ESTest_scaffolding.java
d1be7d4796d4dd4eae8ab25ce91e0554d4b26402
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
432
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Jan 20 19:40:42 UTC 2020 */ package com.xpn.xwiki.web; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class EditAction_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
7ebff7a83652bbc559eee999ab3d93f65862fdd5
02a087e8de0a7d0cfed9dba60e8cff5be4ae3be1
/Research_Bucket/Completed_Archived/dropboxbackup_9_1_18/AndroidData/old/Notsure/data/realvsfake/coinpirates/realcoinpirates_1%0%6%apk/org/apache/james/mime4j/message/StringTextBody.java
adf5381b707d371651f45f67e13be4f6d0013099
[]
no_license
dan7800/Research
7baf8d5afda9824dc5a53f55c3e73f9734e61d46
f68ea72c599f74e88dd44d85503cc672474ec12a
refs/heads/master
2021-01-23T09:50:47.744309
2018-09-01T14:56:01
2018-09-01T14:56:01
32,521,867
1
1
null
null
null
null
UTF-8
Java
false
false
1,628
java
package org.apache.james.mime4j.message; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.Reader; import java.io.StringReader; import java.io.Writer; import java.nio.charset.Charset; import org.apache.james.mime4j.util.CharsetUtil; class StringTextBody extends TextBody { private final Charset charset; private final String text; public StringTextBody(String paramString, Charset paramCharset) { this.text = paramString; this.charset = paramCharset; } public StringTextBody copy() { return new StringTextBody(this.text, this.charset); } public String getMimeCharset() { return CharsetUtil.toMimeCharset(this.charset.name()); } public Reader getReader() throws IOException { return new StringReader(this.text); } public void writeTo(OutputStream paramOutputStream) throws IOException { if (paramOutputStream == null) throw new IllegalArgumentException(); StringReader localStringReader = new StringReader(this.text); OutputStreamWriter localOutputStreamWriter = new OutputStreamWriter(paramOutputStream, this.charset); char[] arrayOfChar = new char[1024]; while (true) { int i = localStringReader.read(arrayOfChar); if (i == -1) { localStringReader.close(); localOutputStreamWriter.flush(); return; } localOutputStreamWriter.write(arrayOfChar, 0, i); } } } /* Location: * Qualified Name: org.apache.james.mime4j.message.StringTextBody * Java Class Version: 6 (50.0) * JD-Core Version: 0.6.1-SNAPSHOT */
[ "dan@go.com" ]
dan@go.com
6cd0c117de8786ae26a8a30210c773b447718053
6ed956617b39dddefad26ad5e27837e70e14a6f1
/giraph-gremlin/src/main/java/com/tinkerpop/gremlin/giraph/process/computer/util/MapReduceHelper.java
e41862846bfa8c532282519017f3b80163d360ae
[ "Apache-2.0" ]
permissive
akashaio/tinkerpop3
9f790b6fd178f5025a1d33141799b672c4329a7c
d7314c389edeaad38110b8d7f18e68fab4295367
refs/heads/master
2020-06-30T04:50:48.831184
2014-10-10T21:24:07
2014-10-10T21:24:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,539
java
package com.tinkerpop.gremlin.giraph.process.computer.util; import com.tinkerpop.gremlin.giraph.Constants; import com.tinkerpop.gremlin.giraph.hdfs.KryoWritableIterator; import com.tinkerpop.gremlin.giraph.process.computer.GiraphGraphComputer; import com.tinkerpop.gremlin.giraph.process.computer.GiraphMap; import com.tinkerpop.gremlin.giraph.process.computer.GiraphReduce; import com.tinkerpop.gremlin.giraph.structure.GiraphGraph; import com.tinkerpop.gremlin.process.computer.GraphComputer; import com.tinkerpop.gremlin.process.computer.MapReduce; import com.tinkerpop.gremlin.process.computer.Memory; import org.apache.commons.configuration.BaseConfiguration; import org.apache.giraph.io.VertexInputFormat; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.FileUtil; import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.OutputFormat; import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; import org.apache.hadoop.mapreduce.lib.output.SequenceFileOutputFormat; import java.io.IOException; /** * @author Marko A. Rodriguez (http://markorodriguez.com) */ public class MapReduceHelper { private static final String SEQUENCE_WARNING = "The " + Constants.GREMLIN_MEMORY_OUTPUT_FORMAT_CLASS + " is not " + SequenceFileOutputFormat.class.getCanonicalName() + " and thus, graph computer memory can not be converted to Java objects"; public static void executeMapReduceJob(final MapReduce mapReduce, final Memory memory, final Configuration configuration) throws IOException, ClassNotFoundException, InterruptedException { final Configuration newConfiguration = new Configuration(configuration); final BaseConfiguration apacheConfiguration = new BaseConfiguration(); mapReduce.storeState(apacheConfiguration); ConfUtil.mergeApacheIntoHadoopConfiguration(apacheConfiguration, newConfiguration); if (!mapReduce.doStage(MapReduce.Stage.MAP)) { final Path memoryPath = new Path(configuration.get(Constants.GREMLIN_OUTPUT_LOCATION) + "/" + mapReduce.getSideEffectKey()); if (newConfiguration.getClass(Constants.GREMLIN_MEMORY_OUTPUT_FORMAT_CLASS, SequenceFileOutputFormat.class, OutputFormat.class).equals(SequenceFileOutputFormat.class)) mapReduce.addSideEffectToMemory(memory, new KryoWritableIterator(configuration, memoryPath)); else GiraphGraphComputer.LOGGER.warn(SEQUENCE_WARNING); } else { newConfiguration.setClass(Constants.MAP_REDUCE_CLASS, mapReduce.getClass(), MapReduce.class); final Job job = new Job(newConfiguration, mapReduce.toString()); GiraphGraphComputer.LOGGER.info(Constants.GIRAPH_GREMLIN_JOB_PREFIX + mapReduce.toString()); job.setJarByClass(GiraphGraph.class); job.setMapperClass(GiraphMap.class); if (mapReduce.doStage(MapReduce.Stage.COMBINE)) job.setCombinerClass(GiraphReduce.class); if (mapReduce.doStage(MapReduce.Stage.REDUCE)) job.setReducerClass(GiraphReduce.class); else job.setNumReduceTasks(0); job.setMapOutputKeyClass(KryoWritable.class); job.setMapOutputValueClass(KryoWritable.class); job.setOutputKeyClass(KryoWritable.class); job.setOutputValueClass(KryoWritable.class); job.setInputFormatClass(ConfUtil.getInputFormatFromVertexInputFormat((Class) newConfiguration.getClass(Constants.GIRAPH_VERTEX_INPUT_FORMAT_CLASS, VertexInputFormat.class))); job.setOutputFormatClass(newConfiguration.getClass(Constants.GREMLIN_MEMORY_OUTPUT_FORMAT_CLASS, SequenceFileOutputFormat.class, OutputFormat.class)); // TODO: Make this configurable // if there is no vertex program, then grab the graph from the input location final Path graphPath = configuration.get(GraphComputer.VERTEX_PROGRAM, null) != null ? new Path(newConfiguration.get(Constants.GREMLIN_OUTPUT_LOCATION) + "/" + Constants.HIDDEN_G) : new Path(newConfiguration.get(Constants.GREMLIN_INPUT_LOCATION)); final Path memoryPath = new Path(newConfiguration.get(Constants.GREMLIN_OUTPUT_LOCATION) + "/" + mapReduce.getSideEffectKey()); // necessary if store('a').out.out.store('a') exists twice -- TODO: only need to call the MapReduce once. May want to have a uniqueness critieria on MapReduce. if(FileSystem.get(newConfiguration).exists(memoryPath)) { FileSystem.get(newConfiguration).delete(memoryPath,true); } FileInputFormat.setInputPaths(job, graphPath); FileOutputFormat.setOutputPath(job, memoryPath); job.waitForCompletion(true); // if its not a SequenceFile there is no certain way to convert to necessary Java objects. // to get results you have to look through HDFS directory structure. Oh the horror. if (newConfiguration.getClass(Constants.GREMLIN_MEMORY_OUTPUT_FORMAT_CLASS, SequenceFileOutputFormat.class, OutputFormat.class).equals(SequenceFileOutputFormat.class)) mapReduce.addSideEffectToMemory(memory, new KryoWritableIterator(configuration, memoryPath)); else GiraphGraphComputer.LOGGER.warn(SEQUENCE_WARNING); } } }
[ "okrammarko@gmail.com" ]
okrammarko@gmail.com
69da9848a1fa310b789a11e18a483a79dbccf084
032b4e4dc70f6e0e71c163a7c0e68559092686ec
/src/main/java/de/unistuttgart/ims/coref/annotator/plugin/rankings/PreceedingRanker.java
9ef3100a07c893dc281856fe4d997fdd103fe103
[ "Apache-2.0" ]
permissive
nilsreiter/CorefAnnotator
7c5560b04f1e7532a64e40ed528626624590cee4
1c3f66c9483c065aecc535ec739e6f01be6a2946
refs/heads/master
2023-05-01T04:25:37.670318
2022-06-23T06:44:31
2022-06-23T06:44:31
119,903,264
28
6
Apache-2.0
2023-04-14T18:06:25
2018-02-01T22:49:54
Java
UTF-8
Java
false
false
1,397
java
package de.unistuttgart.ims.coref.annotator.plugin.rankings; import java.util.Comparator; import org.apache.uima.fit.util.JCasUtil; import org.apache.uima.jcas.JCas; import org.apache.uima.jcas.tcas.Annotation; import org.eclipse.collections.api.set.sorted.MutableSortedSet; import org.eclipse.collections.impl.factory.Sets; import org.kordamp.ikonli.Ikon; import de.unistuttgart.ims.coref.annotator.Span; import de.unistuttgart.ims.coref.annotator.api.v2.Entity; import de.unistuttgart.ims.coref.annotator.api.v2.MentionSurface; import de.unistuttgart.ims.coref.annotator.document.CoreferenceModel; import de.unistuttgart.ims.coref.annotator.plugins.EntityRankingPlugin; public class PreceedingRanker implements EntityRankingPlugin { @Override public String getDescription() { return getName(); } @Override public String getName() { return getClass().getName(); } @Override public MutableSortedSet<Entity> rank(Span span, CoreferenceModel cModel, JCas jcas) { return Sets.mutable .ofAll(JCasUtil.selectPreceding(MentionSurface.class, new Annotation(jcas, span.begin, span.end), 5)) .collect(m -> m.getMention().getEntity()).toSortedSet(new Comparator<Entity>() { @Override public int compare(Entity o1, Entity o2) { return cModel.getLabel(o1).compareTo(cModel.getLabel(o2)); } }); } @Override public Ikon getIkon() { return null; } }
[ "nils.reiter@ims.uni-stuttgart.de" ]
nils.reiter@ims.uni-stuttgart.de
1720c22b48b6dc803a7691306bf04a619250b966
0721305fd9b1c643a7687b6382dccc56a82a2dad
/src/app.zenly.locator_4.8.0_base_source_from_JADX/sources/p389io/reactivex/p393i/p401d/C12456g.java
a9d6d37b23c1a3ecc976107d4cd3d1ca57e7ec8f
[]
no_license
a2en/Zenly_re
09c635ad886c8285f70a8292ae4f74167a4ad620
f87af0c2dd0bc14fd772c69d5bc70cd8aa727516
refs/heads/master
2020-12-13T17:07:11.442473
2020-01-17T04:32:44
2020-01-17T04:32:44
234,470,083
1
0
null
null
null
null
UTF-8
Java
false
false
3,887
java
package p389io.reactivex.p393i.p401d; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicReference; import org.reactivestreams.Subscription; import p389io.reactivex.exceptions.ProtocolViolationException; import p389io.reactivex.internal.util.C12753c; import p389io.reactivex.p393i.p394a.C12324b; import p389io.reactivex.p403k.C12768a; /* renamed from: io.reactivex.i.d.g */ public enum C12456g implements Subscription { CANCELLED; /* renamed from: a */ public static boolean m32970a(Subscription subscription, Subscription subscription2) { if (subscription2 == null) { C12768a.m33415b((Throwable) new NullPointerException("next is null")); return false; } else if (subscription == null) { return true; } else { subscription2.cancel(); m32964a(); return false; } } /* renamed from: b */ public static boolean m32971b(long j) { if (j > 0) { return true; } StringBuilder sb = new StringBuilder(); sb.append("n > 0 required but it was "); sb.append(j); C12768a.m33415b((Throwable) new IllegalArgumentException(sb.toString())); return false; } public void cancel() { } public void request(long j) { } /* renamed from: a */ public static void m32964a() { C12768a.m33415b((Throwable) new ProtocolViolationException("Subscription already set!")); } /* renamed from: a */ public static void m32965a(long j) { StringBuilder sb = new StringBuilder(); sb.append("More produced than requested: "); sb.append(j); C12768a.m33415b((Throwable) new ProtocolViolationException(sb.toString())); } /* renamed from: a */ public static boolean m32969a(AtomicReference<Subscription> atomicReference, Subscription subscription) { C12324b.m32836a(subscription, "s is null"); if (atomicReference.compareAndSet(null, subscription)) { return true; } subscription.cancel(); if (atomicReference.get() != CANCELLED) { m32964a(); } return false; } /* renamed from: a */ public static boolean m32967a(AtomicReference<Subscription> atomicReference) { Subscription subscription = (Subscription) atomicReference.get(); C12456g gVar = CANCELLED; if (subscription != gVar) { Subscription subscription2 = (Subscription) atomicReference.getAndSet(gVar); if (subscription2 != CANCELLED) { if (subscription2 != null) { subscription2.cancel(); } return true; } } return false; } /* renamed from: a */ public static boolean m32968a(AtomicReference<Subscription> atomicReference, AtomicLong atomicLong, Subscription subscription) { if (!m32969a(atomicReference, subscription)) { return false; } long andSet = atomicLong.getAndSet(0); if (andSet != 0) { subscription.request(andSet); } return true; } /* renamed from: a */ public static void m32966a(AtomicReference<Subscription> atomicReference, AtomicLong atomicLong, long j) { Subscription subscription = (Subscription) atomicReference.get(); if (subscription != null) { subscription.request(j); } else if (m32971b(j)) { C12753c.m33346a(atomicLong, j); Subscription subscription2 = (Subscription) atomicReference.get(); if (subscription2 != null) { long andSet = atomicLong.getAndSet(0); if (andSet != 0) { subscription2.request(andSet); } } } } }
[ "developer@appzoc.com" ]
developer@appzoc.com
f574ffe9d70deb0364ab1da2727a9035815d7926
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
/tags/2007-10-23/s2-tiger-2.4.18-rc1/s2-tiger/src/test/java/org/seasar/extension/jdbc/mapper/OneToManyEntityMapperImplTest.java
216169be8da5a6b7655f2c5ec7b22b80afa386df
[ "Apache-2.0" ]
permissive
svn2github/s2container
54ca27cf0c1200a93e1cb88884eb8226a9be677d
625adc6c4e1396654a7297d00ec206c077a78696
refs/heads/master
2020-06-04T17:15:02.140847
2013-08-09T09:38:15
2013-08-09T09:38:15
10,850,644
0
1
null
null
null
null
UTF-8
Java
false
false
2,825
java
/* * Copyright 2004-2007 the Seasar Foundation and the Others. * * 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.seasar.extension.jdbc.mapper; import java.lang.reflect.Field; import java.util.List; import junit.framework.TestCase; import org.seasar.extension.jdbc.MappingContext; import org.seasar.extension.jdbc.PropertyMapper; import org.seasar.extension.jdbc.entity.Bbb; import org.seasar.extension.jdbc.entity.Ddd; import org.seasar.extension.jdbc.mapper.OneToManyEntityMapperImpl; import org.seasar.extension.jdbc.mapper.PropertyMapperImpl; /** * @author higa * */ public class OneToManyEntityMapperImplTest extends TestCase { /** * * @throws Exception */ public void testMap() throws Exception { Field field = Ddd.class.getDeclaredField("id"); PropertyMapperImpl propertyMapper = new PropertyMapperImpl(field, 0); Field field2 = Ddd.class.getDeclaredField("name"); PropertyMapperImpl propertyMapper2 = new PropertyMapperImpl(field2, 1); Field field3 = Bbb.class.getDeclaredField("ddds"); Field field4 = Ddd.class.getDeclaredField("bbb"); OneToManyEntityMapperImpl entityMapper = new OneToManyEntityMapperImpl( Ddd.class, new PropertyMapper[] { propertyMapper, propertyMapper2 }, new int[] { 0 }, field3, field4); MappingContext mappingContext = new MappingContext(10); Object[] values = new Object[] { 1, "DDD" }; Bbb bbb = new Bbb(); entityMapper.map(bbb, values, mappingContext); List<Ddd> ddds = bbb.ddds; assertNotNull(ddds); assertEquals(1, ddds.size()); Ddd ddd = ddds.get(0); assertEquals(new Integer(1), ddd.id); assertEquals("DDD", ddd.name); assertSame(bbb, ddd.bbb); Object[] values2 = new Object[] { 2, "DDD2" }; entityMapper.map(bbb, values2, mappingContext); List<Ddd> ddds2 = bbb.ddds; assertNotNull(ddds2); assertEquals(2, ddds2.size()); assertSame(ddd, ddds2.get(0)); Ddd ddd2 = ddds2.get(1); assertEquals(new Integer(2), ddd2.id); assertEquals("DDD2", ddd2.name); assertSame(bbb, ddd2.bbb); Bbb bbb2 = new Bbb(); Object[] values3 = new Object[] { null, null }; entityMapper.map(bbb2, values3, mappingContext); List<Ddd> ddds3 = bbb2.ddds; assertNotNull(ddds3); assertEquals(0, ddds3.size()); } }
[ "koichik@319488c0-e101-0410-93bc-b5e51f62721a" ]
koichik@319488c0-e101-0410-93bc-b5e51f62721a
1870cf84f52150c11bb8a0aa7ce0c8a7bdcaeb8b
91cc93f18148ed3c19892054eb3a1a6fd1210842
/com/google/android/gms/internal/ks.java
aa7966691c5d614e0299025ff711485b1f9b3107
[]
no_license
zickieloox/EtsyAndroidApp
9a2729995fb3510d020b203de5cff5df8e73bcfe
5d9df4e7e639a6aebc10fe0dbde3b6169d074a84
refs/heads/master
2021-12-10T02:57:10.888170
2016-07-11T11:57:53
2016-07-11T11:57:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,949
java
package com.google.android.gms.internal; import android.content.Context; import android.support.annotation.Nullable; import com.google.android.gms.ads.internal.util.client.C1128a; import com.google.android.gms.ads.internal.util.client.C1129c; import java.util.ArrayList; import java.util.HashSet; import java.util.concurrent.Future; import org.json.JSONObject; @jw public class ks extends ln implements kr { private final lc f5310a; private final Context f5311b; private final ArrayList<Future> f5312c; private final ArrayList<String> f5313d; private final HashSet<String> f5314e; private final Object f5315f; private final zziy f5316g; public ks(Context context, lc lcVar, zziy com_google_android_gms_internal_zziy) { this.f5312c = new ArrayList(); this.f5313d = new ArrayList(); this.f5314e = new HashSet(); this.f5315f = new Object(); this.f5311b = context; this.f5310a = lcVar; this.f5316g = com_google_android_gms_internal_zziy; } private lb m6976a() { return m6977a(3, null, null); } private lb m6977a(int i, @Nullable String str, @Nullable hj hjVar) { return new lb(this.f5310a.f5352a.zzLi, null, this.f5310a.f5353b.zzEF, i, this.f5310a.f5353b.zzEG, this.f5310a.f5353b.zzLR, this.f5310a.f5353b.orientation, this.f5310a.f5353b.zzEL, this.f5310a.f5352a.zzLl, this.f5310a.f5353b.zzLP, hjVar, null, str, this.f5310a.f5354c, null, this.f5310a.f5353b.zzLQ, this.f5310a.f5355d, this.f5310a.f5353b.zzLO, this.f5310a.f5357f, this.f5310a.f5353b.zzLT, this.f5310a.f5353b.zzLU, this.f5310a.f5359h, null, this.f5310a.f5353b.zzMf, this.f5310a.f5353b.zzMg, this.f5310a.f5353b.zzMh, this.f5310a.f5353b.zzMi, this.f5310a.f5353b.zzMj, null, this.f5310a.f5353b.zzEI); } private lb m6978a(String str, hj hjVar) { return m6977a(-2, str, hjVar); } private void m6980a(String str, String str2, String str3) { synchronized (this.f5315f) { kt zzaE = this.f5316g.zzaE(str); if (zzaE == null || zzaE.m6985b() == null || zzaE.m6984a() == null) { return; } this.f5312c.add((Future) m6981a(str, str2, str3, zzaE).zzhs()); this.f5313d.add(str); } } protected ko m6981a(String str, String str2, String str3, kt ktVar) { return new ko(this.f5311b, str, str2, str3, this.f5310a, ktVar, this); } public void m6982a(String str) { synchronized (this.f5315f) { this.f5314e.add(str); } } public void m6983a(String str, int i) { } public void onStop() { } public void zzbQ() { for (hj hjVar : this.f5310a.f5354c.f5003a) { String str = hjVar.f4995i; for (String str2 : hjVar.f4989c) { String str22; if ("com.google.android.gms.ads.mediation.customevent.CustomEventAdapter".equals(str22)) { try { str22 = new JSONObject(str).getString("class_name"); } catch (Throwable e) { C1129c.m6189b("Unable to determine custom event class name, skipping...", e); } } m6980a(str22, str, hjVar.f4987a); } } int i = 0; while (i < this.f5312c.size()) { try { ((Future) this.f5312c.get(i)).get(); synchronized (this.f5315f) { if (this.f5314e.contains(this.f5313d.get(i))) { C1128a.f4666a.post(new 1(this, m6978a((String) this.f5313d.get(i), (hj) this.f5310a.f5354c.f5003a.get(i)))); return; } i++; } } catch (InterruptedException e2) { } catch (Exception e3) { } } C1128a.f4666a.post(new 2(this, m6976a())); } }
[ "pink2mobydick@gmail.com" ]
pink2mobydick@gmail.com
31220e699aa81093928103e79e4b86f4bb2f0a74
44b78323a6e30a5f23085769c72665423a6152d9
/src/main/java/at/ac/webster/eddi/IRestDifferEndpoint.java
dc8faa53ed1f6c9664db8986b65fece09264aa78
[ "Apache-2.0" ]
permissive
ginccc/lms-data-hub
9a471688bdf376ca3d5fcce631560c158c2c24c6
f5dc99c67cd84f34dc284a917e6db6e816d2c5a7
refs/heads/master
2020-09-14T15:09:42.382792
2019-12-23T15:56:30
2019-12-23T15:56:30
223,164,231
0
0
Apache-2.0
2020-05-09T21:30:53
2019-11-21T12:00:48
Java
UTF-8
Java
false
false
873
java
package at.ac.webster.eddi; import at.ac.webster.eddi.model.CreateConversation; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; import javax.ws.rs.Consumes; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; @Path("/channels/differ") @RegisterRestClient public interface IRestDifferEndpoint { @POST @Consumes(MediaType.APPLICATION_JSON) @Path("/createConversation") Response triggerConversationCreated(CreateConversation createConversation); @POST @Path("/endBotConversation") Response endBotConversation(@QueryParam("intent") String intent, @QueryParam("botUserId") String botUserId, @QueryParam("differConversationId") String differConversationId); }
[ "gregor@jarisch.net" ]
gregor@jarisch.net
6df6144b883a1cbfe18d42fb799a4a99f336adfe
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
/classes5/twf.java
54a97ed8eac0d4026403684db0dd8d92f6ebbfbe
[]
no_license
meeidol-luo/qooq
588a4ca6d8ad579b28dec66ec8084399fb0991ef
e723920ac555e99d5325b1d4024552383713c28d
refs/heads/master
2020-03-27T03:16:06.616300
2016-10-08T07:33:58
2016-10-08T07:33:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,594
java
import android.os.Handler; import android.os.Message; import com.tencent.mobileqq.activity.ProfileActivity.AllInOne; import com.tencent.mobileqq.hotpatch.NotVerifyClass; import com.tencent.mobileqq.profile.ProfileCardInfo; import com.tencent.mobileqq.profile.ProfileShoppingPhotoInfo; import com.tencent.mobileqq.profile.view.PhotoViewForShopping; public class twf implements Runnable { public twf(PhotoViewForShopping paramPhotoViewForShopping, ProfileCardInfo paramProfileCardInfo) { boolean bool = NotVerifyClass.DO_VERIFY_CLASS; } public void run() { if ((this.jdField_a_of_type_ComTencentMobileqqProfileProfileCardInfo != null) && (this.jdField_a_of_type_ComTencentMobileqqProfileProfileCardInfo.a != null)) { ProfileShoppingPhotoInfo localProfileShoppingPhotoInfo = ProfileShoppingPhotoInfo.getPhotoInfo(this.jdField_a_of_type_ComTencentMobileqqProfileViewPhotoViewForShopping.a, this.jdField_a_of_type_ComTencentMobileqqProfileProfileCardInfo.a.a); if ((localProfileShoppingPhotoInfo != null) && (PhotoViewForShopping.a(this.jdField_a_of_type_ComTencentMobileqqProfileViewPhotoViewForShopping) != null)) { Message localMessage = Message.obtain(); localMessage.what = 200; localMessage.obj = localProfileShoppingPhotoInfo; PhotoViewForShopping.a(this.jdField_a_of_type_ComTencentMobileqqProfileViewPhotoViewForShopping).sendMessage(localMessage); } } } } /* Location: E:\apk\QQ_91\classes5-dex2jar.jar!\twf.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
cee61c27cf695c33f37499db76819675375bc74a
9a2186406604c63f87d2039227c7d3544b98a301
/src/com/baiyun2/activity/schoolservice/SLostPublishActivity.java
4f30429ca2f274275a22fe4ef3c0716540e7b9f5
[]
no_license
Holyn/BaiYun2
179441d9e39ffb991d3e8e3dc23f8718a8994316
a8b5af4836bc70b3aea0109a1ab62a937f0893ab
refs/heads/master
2021-01-17T05:28:33.824167
2015-09-23T07:37:04
2015-09-23T07:37:04
39,782,388
0
0
null
null
null
null
UTF-8
Java
false
false
817
java
package com.baiyun2.activity.schoolservice; import com.baiyun2.activity.R; import com.baiyun2.base.BaseFragmentActivity; import com.baiyun2.util.ui.FragmentUtil; import android.support.v4.app.FragmentManager; public class SLostPublishActivity extends BaseFragmentActivity{ private FragmentManager fragmentManager; private SLostPublishFragment publishFragment; @Override public void init() { // TODO Auto-generated method stub setBackPressEnabled(true); setTopBarTitle("发布失物"); fragmentManager = getSupportFragmentManager(); showSLostPublishFragment(); } private void showSLostPublishFragment(){ if (publishFragment == null) { publishFragment = SLostPublishFragment.newInstance(); } FragmentUtil.replaceNormal(publishFragment, fragmentManager, R.id.fl_container_common); } }
[ "328550680@qq.com" ]
328550680@qq.com
524a1fd72194972dda6ba6cbf4f206123a58f03d
5a54a5030a69affa22223c5e362ba708c2361da2
/core/src/main/java/org/epn/core/BasicBiEventSource.java
7be6937a452449bf5c86c1c0834840578c290f84
[]
no_license
mdproctor/epn
8031641c0aee16ed1d5997895ac62d1fa2463410
ab3dccf38da9ea79851d7aa5a84bf83c161d9c88
refs/heads/master
2021-01-17T18:26:58.412746
2016-10-28T22:40:16
2016-12-28T17:51:02
84,135,370
1
0
null
2017-03-07T00:32:18
2017-03-07T00:32:18
null
UTF-8
Java
false
false
650
java
package org.epn.core; import org.epn.api.BiEventSource; import org.epn.api.EventSource; public class BasicBiEventSource<E> implements BiEventSource<E> { protected final BasicEventSource<E> top; protected final BasicEventSource<E> bottom; public BasicBiEventSource() { top = new BasicEventSource<E>(); bottom = new BasicEventSource<E>(); } public BasicBiEventSource(final BasicEventSource<E> top, final BasicEventSource<E> bottom) { this.top = top; this.bottom = bottom; } @Override public EventSource<E> getTop() { return top; } @Override public EventSource<E> getBottom() { return bottom; } }
[ "christian.sadilek@gmail.com" ]
christian.sadilek@gmail.com