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
5df82198b29eed0750e1ca76c53195fe596ab76b
bcc84b205664e1c1fe7023652eb90383e3f829ea
/src/library/Librarian.java
23957889cb460ff7d1f0a4083037e21b60795960
[]
no_license
surani-hub/java-oca-ocp
c4fb25bf97a6bd76819cf66ae3404454e119d75a
7fa9b86702b098859b208d01c718d7539ae36e78
refs/heads/master
2022-12-05T13:47:18.772929
2020-08-24T17:40:47
2020-08-24T17:40:47
289,996,468
0
0
null
null
null
null
UTF-8
Java
false
false
455
java
package library; public class Librarian { /*public Librarian() { Book b = new Book(); b.modifyTemplate(); b.authorName = "Rani"; System.out.println(b.authorName); }*/ public static void main(String[] args) { /*Book b = new Book(); b.modifyTemplate(); System.out.println(b.authorName);*/ Book b = new Book(); /* b.issueHistory(); b.issueCount = 30;*/ } }
[ "skmali1357@gmail.com" ]
skmali1357@gmail.com
c3b9ec81d2fb91367d13991e27b9a4a5701a9241
97eba8392186ca0be5fec626ceb7144146c7c1bd
/jooby/src/main/java/org/jooby/internal/parser/BeanParser.java
e786eb01bc7b1e85847f802868d6f1370fe82a4e
[ "Apache-2.0" ]
permissive
ycyoes/jooby
0aa94b6be91ec6b7aa48a2255cdf8911c9f06453
21c502c9c99afb5442baae46037b9842f6f7cd78
refs/heads/master
2021-01-24T01:01:00.828131
2016-01-20T01:14:38
2016-01-20T01:14:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,606
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.jooby.internal.parser; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.List; import java.util.Map; import java.util.Map.Entry; import org.jooby.Mutant; import org.jooby.Parser; import org.jooby.Request; import org.jooby.Response; import org.jooby.internal.mvc.RequestParam; import org.jooby.internal.mvc.RequestParamNameProviderImpl; import org.jooby.internal.mvc.RequestParamProvider; import org.jooby.internal.mvc.RequestParamProviderImpl; import org.jooby.reflect.ParameterNameProvider; import org.slf4j.LoggerFactory; import com.google.common.base.CharMatcher; import com.google.common.base.Splitter; import com.google.common.primitives.Primitives; import com.google.common.reflect.Reflection; import com.google.inject.TypeLiteral; public class BeanParser implements Parser { @Override public Object parse(final TypeLiteral<?> type, final Context ctx) throws Exception { Class<?> beanType = type.getRawType(); if (Primitives.isWrapperType(Primitives.wrap(beanType)) || CharSequence.class.isAssignableFrom(beanType)) { return ctx.next(); } return ctx.ifparams(map -> { final Object bean; if (beanType.isInterface()) { bean = newBeanInterface(ctx.require(Request.class), beanType); } else { bean = newBean(ctx.require(Request.class), ctx.require(Response.class), map, beanType); } return bean == null ? ctx.next() : bean; }); } @Override public String toString() { return "bean"; } private Object newBean(final Request req, final Response rsp, final Map<String, Mutant> params, final Class<?> beanType) throws Exception { ParameterNameProvider classInfo = req.require(ParameterNameProvider.class); Constructor<?>[] constructors = beanType.getDeclaredConstructors(); if (constructors.length > 1) { return null; } final Object bean; Constructor<?> constructor = constructors[0]; RequestParamProvider provider = new RequestParamProviderImpl(new RequestParamNameProviderImpl(classInfo)); List<RequestParam> parameters = provider.parameters(constructor); Object[] args = new Object[parameters.size()]; for (int i = 0; i < args.length; i++) { args[i] = parameters.get(i).value(req, rsp); } // inject args bean = constructor.newInstance(args); // inject fields for (Entry<String, Mutant> param : params.entrySet()) { String pname = param.getKey(); try { List<String> path = name(pname); Object root = seek(bean, path); String fname = path.get(path.size() - 1); Field field = root.getClass().getDeclaredField(fname); int mods = field.getModifiers(); if (!Modifier.isFinal(mods) && !Modifier.isStatic(mods) && !Modifier.isTransient(mods)) { // get RequestParam fparam = new RequestParam(field); @SuppressWarnings("unchecked") Object value = req.param(pname).to(fparam.type); // set field.setAccessible(true); field.set(root, value); } } catch (NoSuchFieldException ex) { LoggerFactory.getLogger(Request.class).debug("No matching field for: {}", pname); } } return bean; } /** * Given a path like: <code>profile[address][country][name]</code> this method will traverse the * path and seek the object in [country]. * * @param bean Root bean. * @param path Path to traverse. * @return The last object in the path. * @throws Exception If something goes wrong. */ private Object seek(final Object bean, final List<String> path) throws Exception { Object it = bean; for (int i = 0; i < path.size() - 1; i++) { Field field = it.getClass().getDeclaredField(path.get(i)); field.setAccessible(true); Object next = field.get(it); if (next == null) { next = field.getType().newInstance(); field.set(it, next); } it = next; } return it; } private Object newBeanInterface(final Request req, final Class<?> beanType) { return Reflection.newProxy(beanType, (proxy, method, args) -> { StringBuilder name = new StringBuilder(method.getName() .replace("get", "") .replace("is", "") ); name.setCharAt(0, Character.toLowerCase(name.charAt(0))); return req.param(name.toString()).to(TypeLiteral.get(method.getGenericReturnType())); }); } private static List<String> name(final String name) { return Splitter.on(new CharMatcher() { @Override public boolean matches(final char c) { return c == '[' || c == ']'; } }).trimResults().omitEmptyStrings().splitToList(name); } }
[ "espina.edgar@gmail.com" ]
espina.edgar@gmail.com
fe1850c25d4085f93ab6b2bea026437772f4d62f
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/plugin/profile/ui/NormalUserFooterPreference$f$1.java
00d92cb3d4a24fc6bd80c82e0301b237fd6a1ce8
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
932
java
package com.tencent.mm.plugin.profile.ui; import android.content.Intent; import android.view.View; import android.view.View.OnClickListener; import com.tencent.mm.plugin.normsg.a.b; import com.tencent.mm.plugin.profile.a; import com.tencent.mm.plugin.profile.ui.NormalUserFooterPreference.f; import com.tencent.mm.ui.e$a; class NormalUserFooterPreference$f$1 implements OnClickListener { final /* synthetic */ f lXO; NormalUserFooterPreference$f$1(f fVar) { this.lXO = fVar; } public final void onClick(View view) { b.lFJ.S(1, 1, 3); Intent intent = new Intent(); intent.putExtra("Contact_User", NormalUserFooterPreference.a(this.lXO.lXw).field_username); intent.putExtra("Contact_Scene", NormalUserFooterPreference.l(this.lXO.lXw)); intent.putExtra(e$a.ths, NormalUserFooterPreference.a(this.lXO.lXw).cta); a.ezn.a(intent, this.lXO.lXw.mContext); } }
[ "707194831@qq.com" ]
707194831@qq.com
1dce0b3f6fa4eabb8d14b26c7157f0e1cdc444b3
6c102dc10f9185ba47c39a32a1d0f9bb34c6992b
/app/src/main/java/com/shrinktool/app/FragmentLauncher.java
d91b7f2cbd9a630552caab396d5f2e789d59466d
[]
no_license
azbjx5288/ShrinkTool
646d170bc330078c4da9cc0fa737f1e3c1e4244b
3421b6609b21626d3a007579c71f707c48b1c1ed
refs/heads/master
2021-09-17T18:31:54.061944
2018-07-04T11:32:05
2018-07-04T11:32:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,454
java
package com.shrinktool.app; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.util.Log; import com.shrinktool.R; import com.shrinktool.base.Preferences; import com.shrinktool.component.Utils; import com.umeng.analytics.MobclickAgent; /** * Created by Alashi on 2015/12/18. */ public class FragmentLauncher extends AppCompatActivity { private static final String TAG = FragmentLauncher.class.getSimpleName(); public static final String KEY_FRAGMENT_NAME = "fragment-name"; public static final String KEY_ACTIONBAR = "fragment-actionBar"; /** 调用startActivityFromFragment的Fragment,避免源码的bug */ private Fragment fragmentCaller; public static void launch(Context context, Class<? extends Fragment> fragment) { launch(context, fragment.getName()); } public static void launch(Context context, String fragmentName) { Intent intent = new Intent(context, FragmentLauncher.class); intent.putExtra(KEY_FRAGMENT_NAME, fragmentName); context.startActivity(intent); } public static void launch(Context context, Class<? extends Fragment> fragment, Bundle bundle) { Intent intent = new Intent(context, FragmentLauncher.class); intent.putExtra(KEY_FRAGMENT_NAME, fragment.getName()); if(bundle != null){ intent.putExtras(bundle); } context.startActivity(intent); } public static void launchForResult(Fragment fagment, Class<? extends Fragment> fragment, Bundle bundle, int requestCode) { Intent intent = new Intent(fagment.getActivity(), FragmentLauncher.class); intent.putExtra(KEY_FRAGMENT_NAME, fragment.getName()); if(bundle != null){ intent.putExtras(bundle); } fagment.startActivityForResult(intent, requestCode); } public static void launchForResult(Activity activity, String fragmentName, Bundle bundle, int requestCode) { Intent intent = new Intent(activity, FragmentLauncher.class); intent.putExtra(KEY_FRAGMENT_NAME, fragmentName); if(bundle != null){ intent.putExtras(bundle); } activity.startActivityForResult(intent, requestCode); } @Override protected void onPause() { super.onPause(); MobclickAgent.onPause(this); } @Override protected void onResume() { super.onResume(); MobclickAgent.onResume(this); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Utils.statusColor(this); boolean supportActionBar = getIntent().getBooleanExtra(KEY_ACTIONBAR, false); if (supportActionBar) { setContentView(R.layout.fragment_launcher_activity); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); } String fragmentName = getIntent().getStringExtra(KEY_FRAGMENT_NAME); Preferences.saveString(this, "debug_last_launch_fragment", fragmentName); Log.i(TAG, "onCreate " + fragmentName); Fragment fragment = Fragment.instantiate(this, fragmentName); fragment.setArguments(getIntent().getExtras()); FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); ft.replace(supportActionBar? R.id.fragment_sub : android.R.id.content, fragment); //ft.replace(android.R.id.content, fragment); //ft.commit(); ft.commitAllowingStateLoss(); } @Override public void startActivityFromFragment(Fragment fragment, Intent intent, int requestCode) { fragmentCaller = fragment; super.startActivityForResult(intent, requestCode); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { Log.i(TAG, "onActivityResult: " + requestCode + ", " + resultCode); if (fragmentCaller != null) { fragmentCaller.onActivityResult(requestCode, resultCode, data); fragmentCaller = null; return; } super.onActivityResult(requestCode, resultCode, data); } }
[ "429533813@qq.com" ]
429533813@qq.com
94f6c7a97e91b456a1f3b6f89025c243f71dcfdc
660121ad19491c99b639a81819471bb39eb2e3c8
/MarchMorning8AMBatch/src/com/launcer/SysDate.java
8b60cc55310806f94b1e0132049e48f18bc46e7e
[]
no_license
poonamsab/marchmorning8AMrepo
b0b1dbbce8017a7bf71e37455b788512360be34a
505edf218f7081d6762afd41b2030c6596e7152e
refs/heads/master
2022-10-21T02:49:37.493092
2020-06-18T03:24:11
2020-06-18T03:24:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
258
java
package com.launcer; import java.util.Date; public class SysDate { public static void main(String[] args) { Date dt=new Date(); System.out.println(dt); String d = dt.toString().replace(' ', '_').replace(':', '_'); System.out.println(d); } }
[ "maha@gmail.com" ]
maha@gmail.com
777da465ef82e3027ef4349287a05dfc087bea3e
1b33bb4e143b18de302ccd5f107e3490ea8b31aa
/learn.java/src/main/java/books/learning/RxJava/chapters/_5_Multicasting_replaying_and_caching/automaticConnection/autoConnect/L.java
730c9e05dff9e10e4957fbdffc9931502727042d
[]
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
921
java
package books.learning.RxJava.chapters._5_Multicasting_replaying_and_caching.automaticConnection.autoConnect; import books.learning.RxJava.chapters.Util; import io.reactivex.Observable; class L { public static final Observable<Integer> OBSERVABLE = Observable.range(1, 3) .map(Util::randomInt) .publish() .autoConnect(2); static void m(){ OBSERVABLE.subscribe(Util.printObserver()); OBSERVABLE.subscribe(Util.printObserver()); } static void m2(){ OBSERVABLE.subscribe(Util.printObserver()); OBSERVABLE.subscribe(Util.printObserver()); OBSERVABLE.subscribe(Util.printObserver()); OBSERVABLE.subscribe(Util.printObserver()); OBSERVABLE.subscribe(Util.printObserver()); OBSERVABLE.subscribe(Util.printObserver()); } public static void main(String[] args) { // m(); m2(); } }
[ "ciprian.dorin.tanase@ibm.com" ]
ciprian.dorin.tanase@ibm.com
6925d5fa83a6841776194305d5cfc4bca8a35ae1
6dbdd5e1a97b5e9768bc0f63915e5ce91e44ffcf
/SampleJava/src/newDynamic/CheckIfAGivenBinaryTreeIsSumtree.java
2a5fcf14da98b2c5f89a9ff35169c82e08f8b97b
[]
no_license
narendrachouhan1992/practice_code
4de8936ace2c13c7646ff774d9a1f84bc2903bf0
79f2ffd10ccea44f846d7c649b55ee8fd6db20d7
refs/heads/master
2020-03-27T15:48:06.092439
2018-08-30T11:40:41
2018-08-30T11:40:41
146,740,121
0
0
null
null
null
null
UTF-8
Java
false
false
957
java
package newDynamic; public class CheckIfAGivenBinaryTreeIsSumtree { int getSum(Node node) { if(node== null) return 0; return (getSum(node.left) + getSum(node.right)+ node.data); } boolean isSumtree(Node node) { if(node == null || (node.left == null && node.right == null)) return true; int lsum; int rsum; lsum = getSum(node.left); rsum = getSum(node.right); if(isSumtree(node.left) && isSumtree(node.right) && (node.data == lsum+rsum)) return true; return false; } public static void main(String[] args) { CheckIfAGivenBinaryTreeIsSumtree obj = new CheckIfAGivenBinaryTreeIsSumtree(); Node root = new Node(26); root.left = new Node(10); root.right = new Node(3); root.left.left = new Node(4); root.left.right = new Node(6); root.right.right = new Node(3); if(obj.isSumtree(root)) System.out.println("yes"); else System.out.println("NO"); } }
[ "narendra.chouhan@oracle.com" ]
narendra.chouhan@oracle.com
b1e6355a5d338cead93ad72439c513589bfb9b34
97bfca9c15c070dd0f1560b26cd7d296f65aa660
/BusinessLayer/src/main/java/it/prisma/businesslayer/bizws/config/security/AuthenticationExceptionEntryPoint.java
5e2afacbbd2939c69ab16e784b0061e46923e414
[ "Apache-2.0" ]
permissive
pon-prisma/PrismaDemo
f0b9c6d4cff3f1a011d2880263f3831174771dcd
0ea106c07b257628bc4ed5ad45b473c1d99407c7
refs/heads/master
2016-09-06T15:37:22.099913
2015-07-06T15:28:10
2015-07-06T15:28:10
35,619,420
0
1
null
null
null
null
UTF-8
Java
false
false
1,324
java
package it.prisma.businesslayer.bizws.config.security; import it.prisma.businesslayer.bizws.config.exceptionhandling.PrismaExceptionMapper; import it.prisma.businesslayer.bizws.config.exceptionhandling.PrismaWrapperException; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.security.core.AuthenticationException; import org.springframework.security.web.AuthenticationEntryPoint; public class AuthenticationExceptionEntryPoint implements AuthenticationEntryPoint { // // The class from Step 1 // private MessageProcessor processor; // // public CustomEntryPoint() { // // It is up to you to decide when to instantiate // processor = new MessageProcessor(); // } PrismaExceptionMapper prismaExceptionMapper; public AuthenticationExceptionEntryPoint() { prismaExceptionMapper = new PrismaExceptionMapper(); } @Override public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException { try { prismaExceptionMapper.toResponse(new PrismaWrapperException( authException), request, response); } catch (Exception e) { throw new ServletException(); } } }
[ "pon.prisma@gmail.com" ]
pon.prisma@gmail.com
9404d17d582521b4eb2410d6837be5a92edbe78a
dfbc143422bb1aa5a9f34adf849a927e90f70f7b
/Contoh Project/video walp/com/google/android/gms/internal/ads/aio.java
3d5cecd8a6d806cd2aa475b1effa54480f1f949e
[]
no_license
IrfanRZ44/Set-Wallpaper
82a656acbf99bc94010e4f74383a4269e312a6f6
046b89cab1de482a9240f760e8bcfce2b24d6622
refs/heads/master
2020-05-18T11:18:14.749232
2019-05-01T04:17:54
2019-05-01T04:17:54
184,367,300
0
0
null
null
null
null
UTF-8
Java
false
false
944
java
package com.google.android.gms.internal.ads; import java.lang.reflect.Method; public final class aio extends aiy { private final boolean d; public aio(ahn paramahn, String paramString1, String paramString2, zo paramzo, int paramInt1, int paramInt2) { super(paramahn, paramString1, paramString2, paramzo, paramInt1, 61); this.d = paramahn.j(); } protected final void a() { Method localMethod = this.c; Object[] arrayOfObject = new Object[2]; arrayOfObject[0] = this.a.a(); arrayOfObject[1] = Boolean.valueOf(this.d); long l = ((Long)localMethod.invoke(null, arrayOfObject)).longValue(); synchronized (this.b) { this.b.P = Long.valueOf(l); return; } } } /* Location: C:\Users\IrfanRZ\Desktop\video walp\classes_dex2jar.jar * Qualified Name: com.google.android.gms.internal.ads.aio * JD-Core Version: 0.7.0.1 */
[ "irfan.rozal44@gmail.com" ]
irfan.rozal44@gmail.com
79f97a096229f2591ccae4f87022021a680ff791
7bea7fb60b5f60f89f546a12b43ca239e39255b5
/src/javax/xml/crypto/URIDereferencer.java
7e53dced2d930c261aafed05aede8ae1efdd2b22
[]
no_license
sorakeet/fitcorejdk
67623ab26f1defb072ab473f195795262a8ddcdd
f946930a826ddcd688b2ddbb5bc907d2fc4174c3
refs/heads/master
2021-01-01T05:52:19.696053
2017-07-15T01:33:41
2017-07-15T01:33:41
97,292,673
0
0
null
null
null
null
UTF-8
Java
false
false
1,077
java
/** * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * =========================================================================== * <p> * (C) Copyright IBM Corp. 2003 All Rights Reserved. * <p> * =========================================================================== * <p> * $Id: URIDereferencer.java,v 1.5 2005/05/10 15:47:42 mullan Exp $ */ /** * =========================================================================== * * (C) Copyright IBM Corp. 2003 All Rights Reserved. * * =========================================================================== */ /** * $Id: URIDereferencer.java,v 1.5 2005/05/10 15:47:42 mullan Exp $ */ package javax.xml.crypto; public interface URIDereferencer{ Data dereference(URIReference uriReference,XMLCryptoContext context) throws URIReferenceException; }
[ "panxiaoping@9af151c5-2e68-9a40-a710-8967c58c11f7" ]
panxiaoping@9af151c5-2e68-9a40-a710-8967c58c11f7
b505d01bb1d0bd0e09c6d925d57f871f6f4c81bd
732624c8b4175d1ef2d0bb80df678c8872340564
/src/com/qizx/xquery/fn/_Boolean.java
5efc84914e5ae72f22194bbabd0c95573d521112
[]
no_license
omarbenhamid/Qizx
3fcd3ae5630a1fee5838454c8391c6b5b7a79ec9
9ae227c16145c468e502be6124ef2d3085399f1a
refs/heads/master
2021-01-20T21:46:32.440205
2016-01-12T11:11:08
2016-01-12T11:11:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,500
java
/* * Qizx/open 4.1 * * This code is the open-source version of Qizx. * Copyright (C) 2004-2009 Axyana Software -- All rights reserved. * * 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 Initial Developer of the Original Code is Xavier Franc - Axyana Software. * */ package com.qizx.xquery.fn; import com.qizx.api.EvaluationException; import com.qizx.xquery.EvalContext; import com.qizx.xquery.Focus; import com.qizx.xquery.XQType; /** * Implementation of function fn:boolean. */ public class _Boolean extends Function { static Prototype[] protos = { Prototype.fn("boolean", XQType.BOOLEAN, Exec.class) .arg("srcval", XQType.ITEM.star) }; public Prototype[] getProtos() { return protos; } public static class Exec extends Function.BoolCall { public boolean evalAsBoolean(Focus focus, EvalContext context) throws EvaluationException { context.at(this); return args[0].evalEffectiveBooleanValue(focus, context); } } }
[ "466144425@qq.com" ]
466144425@qq.com
48658c96a1f978eb1c2b14ee6900f9ff8ce3a20a
03fa839049232561fddeb726fb09adaf5bad2f4e
/basex-core/src/main/java/org/basex/query/func/db/DbNodeId.java
619e972afc1a7452f43dc1f76ed1e9673bd55436
[ "BSD-3-Clause" ]
permissive
cuongpd95/basex
96791206e7a41537c90b1d2d567238850fd201b3
05d975432d78b90946813cd416e78186ab45a8bb
refs/heads/master
2021-08-30T16:30:17.551857
2017-12-18T16:36:28
2017-12-18T16:36:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
760
java
package org.basex.query.func.db; import org.basex.query.*; import org.basex.query.func.*; import org.basex.query.iter.*; import org.basex.query.value.item.*; import org.basex.query.value.node.*; /** * Function implementation. * * @author BaseX Team 2005-17, BSD License * @author Christian Gruen */ public final class DbNodeId extends StandardFunc { @Override public Iter iter(final QueryContext qc) throws QueryException { final Iter iter = exprs[0].iter(qc); return new Iter() { @Override public Int next() throws QueryException { final Item item = qc.next(iter); if(item == null) return null; final DBNode node = toDBNode(item); return Int.get(node.data().id(node.pre())); } }; } }
[ "christian.gruen@gmail.com" ]
christian.gruen@gmail.com
b0a458e736c27f44b14c50fd2d0a9d1237de3b1f
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/17/17_242d58e1aea1c6e9f6415291b5634a966607bada/Cached/17_242d58e1aea1c6e9f6415291b5634a966607bada_Cached_t.java
9062909fe4ac8efe1d90ecbbdf20cf3011ae5ab3
[]
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,293
java
/* * (C) Copyright 2010 Nuxeo SAS (http://nuxeo.com/) and contributors. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser General Public License * (LGPL) version 2.1 which accompanies this distribution, and is available at * http://www.gnu.org/licenses/lgpl.html * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * Contributors: * Olivier Grisel * * $Id$ */ package org.nuxeo.ecm.platform.suggestbox.jsf; import java.io.Serializable; /** * Simple cached item holder with time + key invalidation strategy */ public class Cached<T> implements Serializable { private static final long serialVersionUID = 1L; public long cachedAt; public long expireMillis; public Object[] keys = new Object[0]; public T value; public boolean expired = false; public Cached(long expireMillis) { this.expireMillis = expireMillis; // expired by default expired = true; } public void cache(T value, Object... keys) { this.expired = false; this.cachedAt = System.currentTimeMillis(); this.keys = keys; this.value = value; } public void expire() { expired = true; value = null; keys = new Object[0]; } public boolean hasExpired(Object... invalidationKeys) { if (expired) { return true; } long now = System.currentTimeMillis(); if (now - cachedAt > expireMillis) { return true; } if (invalidationKeys.length != keys.length) { return true; } for (int i = 0; i < keys.length; i++) { if (!keys[i].equals(invalidationKeys[i])) { return true; } } return false; } /** * Empty marker to be used as default value */ public static <E> Cached<E> expired(long expireMillis) { return new Cached<E>(expireMillis); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
1c4b6724c8415b71a8f818c38f77442a2ed44d0a
2ab03c4f54dbbb057beb3a0349b9256343b648e2
/JavaAdvanced/JAdvancedFunctionalProgramming/src/SumNumbers.java
0afc631f4a7ed48698945c43cfed7b91e3c48d71
[ "MIT" ]
permissive
tabria/Java
8ef04c0ec5d5072d4e7bf15e372e7c2b600a1cea
9bfc733510b660bc3f46579a1cc98ff17fb955dd
refs/heads/master
2021-05-05T11:50:05.175943
2018-03-07T06:53:54
2018-03-07T06:53:54
104,714,168
0
1
null
null
null
null
UTF-8
Java
false
false
566
java
import java.util.Scanner; import java.util.function.Function; public class SumNumbers { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String[] text = scanner.nextLine().split(", "); Function<String, Integer> parse = s->Integer.parseInt(s); int count =text.length; int sum =0; for (int i = 0; i <text.length ; i++) { sum += parse.apply(text[i]); } System.out.println("Count = " + count); System.out.println("Sum = " + sum); } }
[ "forexftg@yahoo.com" ]
forexftg@yahoo.com
37f1c6254dca9b2af7a3ecbf5e2f5c8648641655
3be7b0cb94950c7eb9a3d3cad8a3469f2ea390ff
/uberfire-extensions/uberfire-layout-editor/uberfire-layout-editor-client/src/main/java/org/uberfire/ext/layout/editor/client/infra/LayoutDragComponentHelper.java
4e18edba1f3da9fd62ac1d333b18973ff424a4d6
[ "Apache-2.0" ]
permissive
MEM2677/uberfire-webapp-test
96ce82a1d12ddf676fc946b2414db14e58981069
03f707b4f00cffea7b325ed9b96a3c67455fe6d4
refs/heads/master
2022-07-10T09:42:01.564134
2017-03-08T08:23:42
2017-03-08T08:23:42
84,064,631
0
0
null
2022-07-01T21:23:43
2017-03-06T11:18:53
Java
UTF-8
Java
false
false
3,767
java
/* * Copyright 2015 JBoss, by Red Hat, Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.uberfire.ext.layout.editor.client.infra; import com.google.gwt.event.dom.client.DropEvent; import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.IsWidget; import org.jboss.errai.ioc.client.container.Factory; import org.jboss.errai.ioc.client.container.IOC; import org.jboss.errai.ioc.client.container.SyncBeanDef; import org.jboss.errai.ioc.client.container.SyncBeanManagerImpl; import org.uberfire.ext.layout.editor.api.editor.LayoutComponent; import org.uberfire.ext.layout.editor.client.api.*; import javax.annotation.PreDestroy; import javax.enterprise.context.ApplicationScoped; import javax.enterprise.context.Dependent; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; @ApplicationScoped public class LayoutDragComponentHelper { private DndDataJSONConverter converter = new DndDataJSONConverter(); private List<Object> instances = new ArrayList<>(); @PreDestroy public void destroy(){ for ( Object instance : instances ) { destroy( instance ); } } public LayoutDragComponent lookupDragTypeBean( String dragTypeClassName ) { return lookupBean( dragTypeClassName ); } private LayoutDragComponent lookupBean( String dragTypeClassName ) { SyncBeanManagerImpl beanManager = ( SyncBeanManagerImpl ) IOC.getBeanManager(); Collection<SyncBeanDef<LayoutDragComponent>> iocBeanDefs = beanManager.lookupBeans( LayoutDragComponent.class ); for ( SyncBeanDef<LayoutDragComponent> iocBeanDef : iocBeanDefs ) { LayoutDragComponent instance = iocBeanDef.getInstance(); instances.add( instance ); if ( getRealBeanClass( instance ).equalsIgnoreCase( dragTypeClassName ) ) { return instance; } } return null; } public String getRealBeanClass( LayoutDragComponent instance ) { return Factory.maybeUnwrapProxy( instance ).getClass().getName(); } public LayoutComponent getLayoutComponentFromDrop( String dropData ) { LayoutDragComponent component = extractComponent( dropData ); LayoutComponent layoutComponent = getLayoutComponent( component ); return layoutComponent; } public LayoutComponent getLayoutComponent( LayoutDragComponent dragComponent ) { LayoutComponent layoutComponent = new LayoutComponent( getRealBeanClass( dragComponent ) ); if ( dragComponent instanceof HasDragAndDropSettings ) { Map<String, String> properties = ( ( HasDragAndDropSettings ) dragComponent ).getMapSettings(); if ( properties != null ) { layoutComponent.addProperties( properties ); } } return layoutComponent; } private LayoutDragComponent extractComponent( String dropData ) { return converter .readJSONDragComponent( dropData ); } private boolean hasComponent( LayoutComponent component ) { return component != null; } protected void destroy( Object o ) { BeanHelper.destroy( o ); } }
[ "christian.sadilek@gmail.com" ]
christian.sadilek@gmail.com
7808cc454ed76a8de5f95145ad482df38a0be5ac
89e4ba5170ca44b61e511b514da8dd833cf0950c
/manager/src/main/java/moe/shizuku/manager/utils/EmptySharedPreferencesImpl.java
0492b8a468dcb05c7c14bd18be465b2353bb1282
[]
no_license
heruoxin/Shizuku
b4fec22b9005b95d64ceb3cc04a85ac788c33d29
0788471e316903e99c3174bc8d6d40e03a8a00f1
refs/heads/master
2021-03-27T14:09:50.445857
2019-03-26T14:24:56
2019-03-26T14:24:56
123,704,161
7
1
null
2018-03-03T15:25:34
2018-03-03T15:25:34
null
UTF-8
Java
false
false
2,542
java
package moe.shizuku.manager.utils; import android.content.SharedPreferences; import java.util.HashMap; import java.util.Map; import java.util.Set; import androidx.annotation.Nullable; public class EmptySharedPreferencesImpl implements SharedPreferences { @Override public Map<String, ?> getAll() { return new HashMap<>(); } @Nullable @Override public String getString(String key, @Nullable String defValue) { return defValue; } @Nullable @Override public Set<String> getStringSet(String key, @Nullable Set<String> defValues) { return defValues; } @Override public int getInt(String key, int defValue) { return defValue; } @Override public long getLong(String key, long defValue) { return defValue; } @Override public float getFloat(String key, float defValue) { return defValue; } @Override public boolean getBoolean(String key, boolean defValue) { return defValue; } @Override public boolean contains(String key) { return false; } @Override public Editor edit() { return new EditorImpl(); } @Override public void registerOnSharedPreferenceChangeListener(OnSharedPreferenceChangeListener listener) { } @Override public void unregisterOnSharedPreferenceChangeListener(OnSharedPreferenceChangeListener listener) { } private static class EditorImpl implements Editor { @Override public Editor putString(String key, @Nullable String value) { return this; } @Override public Editor putStringSet(String key, @Nullable Set<String> values) { return this; } @Override public Editor putInt(String key, int value) { return this; } @Override public Editor putLong(String key, long value) { return this; } @Override public Editor putFloat(String key, float value) { return this; } @Override public Editor putBoolean(String key, boolean value) { return this; } @Override public Editor remove(String key) { return this; } @Override public Editor clear() { return this; } @Override public boolean commit() { return true; } @Override public void apply() { } } }
[ "rikka@shizuku.moe" ]
rikka@shizuku.moe
1720bcffe11b6eac81f92536a33dfe81ee6bff89
7f7cb7388a57b066b04ec863df7fe681515854c5
/src/main/java/com/klzan/p2p/service/user/impl/ReferralServiceImpl.java
5427e10a20a9b046c610e82d40d18d269d8eb1b9
[]
no_license
ybak/karazam-santian
9541fc0e02774ee5c5a27218a2639fbcb078ca93
dbd905913b9b6273d2028853d14396b0adc01ccc
refs/heads/master
2021-03-24T01:10:59.376527
2018-05-27T03:45:28
2018-05-27T03:45:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,001
java
package com.klzan.p2p.service.user.impl; import com.klzan.core.page.PageCriteria; import com.klzan.core.page.PageResult; import com.klzan.p2p.common.service.impl.BaseService; import com.klzan.p2p.dao.user.ReferralDao; import com.klzan.p2p.model.Referral; import com.klzan.p2p.service.user.ReferralService; import com.klzan.p2p.vo.user.ReferralVo; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.List; @Service public class ReferralServiceImpl extends BaseService<Referral> implements ReferralService { @Resource private ReferralDao refferralDao; @Override public PageResult<ReferralVo> findReferral(PageCriteria pageCriteria) { PageResult<ReferralVo> pageResult = refferralDao.findPageListPage(pageCriteria); return pageResult; } @Override public void createReferral(Referral referral) { refferralDao.createReferral(referral); } @Override public List<Referral> findListById(int id) { return refferralDao.getListById(id); } }
[ "1922448115@qq.com" ]
1922448115@qq.com
20f3f07583faedb87fc0d02337695e867d1ead9f
e3eecfce5fc2258c95c3205d04d8e2ae8a9875f5
/arbiter/arbiter-deeplearning4j/src/main/java/org/deeplearning4j/arbiter/layers/LSTMLayerSpace.java
3776a9b3dfc01feb0afb7633894dd949b36ae68b
[ "Apache-2.0" ]
permissive
farizrahman4u/deeplearning4j
585bdec78e7e8252ca63a0691102b15774e7a6dc
e0555358db5a55823ea1af78ae98a546ad64baab
refs/heads/master
2021-06-28T19:20:38.204203
2019-10-02T10:16:12
2019-10-02T10:16:12
134,716,860
1
1
Apache-2.0
2019-10-02T10:14:08
2018-05-24T13:08:06
Java
UTF-8
Java
false
false
2,390
java
/*- * * * Copyright 2016 Skymind,Inc. * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * */ package org.deeplearning4j.arbiter.layers; import lombok.AccessLevel; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import org.deeplearning4j.arbiter.optimize.api.ParameterSpace; import org.deeplearning4j.arbiter.optimize.parameter.FixedValue; import org.deeplearning4j.arbiter.util.LeafUtils; import org.deeplearning4j.nn.conf.layers.GravesLSTM; import org.deeplearning4j.nn.conf.layers.LSTM; /** * Layer space for LSTM layers * * @author Alex Black */ @Data @EqualsAndHashCode(callSuper = true) @NoArgsConstructor(access = AccessLevel.PRIVATE) //For Jackson JSON/YAML deserialization public class LSTMLayerSpace extends AbstractLSTMLayerSpace<LSTM> { private LSTMLayerSpace(Builder builder) { super(builder); this.numParameters = LeafUtils.countUniqueParameters(collectLeaves()); } @Override public LSTM getValue(double[] values) { LSTM.Builder b = new LSTM.Builder(); setLayerOptionsBuilder(b, values); return b.build(); } protected void setLayerOptionsBuilder(LSTM.Builder builder, double[] values) { super.setLayerOptionsBuilder(builder, values); } @Override public String toString() { return toString(", "); } @Override public String toString(String delim) { StringBuilder sb = new StringBuilder("LSTMLayerSpace("); sb.append(super.toString(delim)).append(")"); return sb.toString(); } public static class Builder extends AbstractLSTMLayerSpace.Builder<Builder> { @Override @SuppressWarnings("unchecked") public LSTMLayerSpace build() { return new LSTMLayerSpace(this); } } }
[ "blacka101@gmail.com" ]
blacka101@gmail.com
0927783c909857df8f7801ab014af12ee8ba9a1c
22cd93e41356dd5cad3929e8bbf5388306f444dd
/stream/stream-consumer/src/main/java/stream/consumer/listeners/StreamConsumer.java
ca75a608348cb94229b9b2e99bcf3cde826f8e7f
[ "Apache-2.0" ]
permissive
qinwenlong/messaging
4c9a6b814ddeb88ef9dc728128f923b8d85ec320
47df2d734c4a47fef0a735aacb30c0c4cce285a6
refs/heads/master
2020-04-13T10:12:45.131582
2019-03-07T08:12:45
2019-03-07T08:12:45
163,133,421
0
0
null
2018-12-26T03:47:06
2018-12-26T03:47:06
null
UTF-8
Java
false
false
1,227
java
package stream.consumer.listeners; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.stream.annotation.EnableBinding; import org.springframework.cloud.stream.annotation.StreamListener; import org.springframework.stereotype.Component; import stream.consumer.ConsumerChannels; @SpringBootApplication @EnableBinding(ConsumerChannels.class) public class StreamConsumer { public static void main(String args[]) { SpringApplication.run(StreamConsumer.class, args); } } @Component class GreetingProcessor { private Log log = LogFactory.getLog(getClass()); @StreamListener(ConsumerChannels.DIRECTED) public void onNewDirectedGreetings(String greeting) { this.onNewGreeting(ConsumerChannels.DIRECTED, greeting); } @StreamListener(ConsumerChannels.BROADCASTS) public void onNewBroadcastGreeting(String greeting) { this.onNewGreeting(ConsumerChannels.BROADCASTS, greeting); } private void onNewGreeting(String prefix, String greeting) { log.info("greeting received in @StreamListener (" + prefix + "): " + greeting); } }
[ "josh@joshlong.com" ]
josh@joshlong.com
c54629f40b4e915d3d45e4b8e68946b5682981ee
cc9b979c3c32a45d1031b1b9a100ed3234fbafcc
/app/src/main/java/com/bjjy/buildtalk/ui/discover/CourseListContract.java
b48131a35a233101c847f1422c8bb1f4713cda96
[]
no_license
Power-Android/BuildTalk
5e66f15d5300ac73e6abb0934831a0465b9f8a14
4bdb54cd6009da89eb014e03e6640b815ada74d6
refs/heads/master
2022-11-12T13:35:45.050616
2020-07-06T01:58:39
2020-07-06T01:58:39
183,206,297
0
0
null
null
null
null
UTF-8
Java
false
false
491
java
package com.bjjy.buildtalk.ui.discover; import com.bjjy.buildtalk.base.presenter.IPresenter; import com.bjjy.buildtalk.base.view.IView; import com.bjjy.buildtalk.entity.CourseEntity; /** * @author power * @date 2019/5/6 5:52 PM * @project BuildTalk * @description: */ public class CourseListContract { interface View extends IView{ void handlerCourseList(CourseEntity courseEntities, boolean isRefresh); } interface Presenter extends IPresenter<View>{ } }
[ "power_android@163.com" ]
power_android@163.com
b1c64de6f5669c7f3747349ce16c939498600651
e30f32cd85b5ee82c2a6239e4829cfd12d25dd7a
/src/test/java/com/lintips/inventario/domain/ProductoDataOnDemand.java
fc795a380f72e43b1c8e0bc1525dba3f1d025079
[]
no_license
paucls/cucumber_rest_json
f016fa71ed0f5288fde31ad15da158b3a82103d5
991b4a0a3ed05f15925525bc93a950338cfcb4ea
refs/heads/master
2020-12-24T15:49:18.042166
2012-12-13T17:27:29
2012-12-13T17:27:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
179
java
package com.lintips.inventario.domain; import org.springframework.roo.addon.dod.RooDataOnDemand; @RooDataOnDemand(entity = Producto.class) public class ProductoDataOnDemand { }
[ "paucls@gmail.com" ]
paucls@gmail.com
cf08eeb72ff35111fe88e6c4b6784c303cf09518
0e0dae718251c31cbe9181ccabf01d2b791bc2c2
/SCT2/tags/TAG_20110503_1020_PRE_XTEXT2.0_CHANGE/plugins/org.yakindu.sct.model.statechart/src/org/yakindu/model/sct/statechart/impl/PseudostateImpl.java
cd7f865586b3720c7c9858940a1bac3741ac42ec
[]
no_license
huybuidac20593/yakindu
377fb9100d7db6f4bb33a3caa78776c4a4b03773
304fb02b9c166f340f521f5e4c41d970268f28e9
refs/heads/master
2021-05-29T14:46:43.225721
2015-05-28T11:54:07
2015-05-28T11:54:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,710
java
/** * Copyright (c) 2011 committers of YAKINDU and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * Contributors: * committers of YAKINDU - initial API and implementation * */ package org.yakindu.model.sct.statechart.impl; import org.eclipse.emf.ecore.EClass; import org.yakindu.model.sct.statechart.Pseudostate; import org.yakindu.model.sct.statechart.StatechartPackage; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Pseudostate</b></em>'. * <!-- end-user-doc --> * <p> * </p> * * @generated */ public abstract class PseudostateImpl extends VertexImpl implements Pseudostate { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static final String copyright = "Copyright (c) 2011 committers of YAKINDU and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\nContributors:\r\ncommitters of YAKINDU - initial API and implementation\r\n"; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected PseudostateImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return StatechartPackage.Literals.PSEUDOSTATE; } } //PseudostateImpl
[ "a.muelder@googlemail.com" ]
a.muelder@googlemail.com
b279ec4a1d6d1c8c4a16008572a6bb0ae57c0607
7016cec54fb7140fd93ed805514b74201f721ccd
/src/java/com/echothree/control/user/order/common/edit/OrderPriorityEdit.java
b0c56920054b83308a98f5a67e057d9245abe6ed
[ "MIT", "Apache-1.1", "Apache-2.0" ]
permissive
echothreellc/echothree
62fa6e88ef6449406d3035de7642ed92ffb2831b
bfe6152b1a40075ec65af0880dda135350a50eaf
refs/heads/master
2023-09-01T08:58:01.429249
2023-08-21T11:44:08
2023-08-21T11:44:08
154,900,256
5
1
null
null
null
null
UTF-8
Java
false
false
1,213
java
// -------------------------------------------------------------------------------- // Copyright 2002-2023 Echo Three, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // -------------------------------------------------------------------------------- package com.echothree.control.user.order.common.edit; import com.echothree.control.user.order.common.spec.OrderPrioritySpec; public interface OrderPriorityEdit extends OrderPrioritySpec, OrderPriorityDescriptionEdit { String getPriority(); void setPriority(String priority); String getIsDefault(); void setIsDefault(String isDefault); String getSortOrder(); void setSortOrder(String sortOrder); }
[ "rich@echothree.com" ]
rich@echothree.com
8490bdf1963fe624728931445c3a03d3ef16b628
565d6d61c8003d5a4aee122034817d44e55b00ff
/spring-osgi-master/integration-tests/tests/src/test/java/org/springframework/osgi/iandt/syntheticEvents/ServiceListenerSyntheticEvents.java
01edfaa34b4221fc636ae2c950e77207b2c96ef8
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
vinayv1208/Egiants_tasks
c56b3e8d38c75a594d3d094845e42b1bab983542
894e6cc0f95757e87218105c31926bd3cb1a74ab
refs/heads/master
2023-01-09T21:10:09.690459
2019-09-22T13:11:39
2019-09-22T13:11:39
204,596,002
1
0
null
2022-12-31T02:49:54
2019-08-27T01:45:56
Java
UTF-8
Java
false
false
7,110
java
/* * Copyright 2006-2009 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.osgi.iandt.syntheticEvents; import java.awt.Polygon; import java.awt.Rectangle; import java.awt.Shape; import java.awt.geom.Area; import java.util.ArrayList; import java.util.Dictionary; import java.util.List; import java.util.Map; import java.util.Properties; import org.osgi.framework.Constants; import org.osgi.framework.ServiceRegistration; import org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext; import org.springframework.osgi.iandt.BaseIntegrationTest; import org.springframework.osgi.util.OsgiServiceUtils; /** * Integration test for synthetic events delivery of service listeners during * startup/shutdown. * * @author Costin Leau * */ public class ServiceListenerSyntheticEvents extends BaseIntegrationTest { private Shape area, rectangle, polygon; private ServiceRegistration areaReg, rectangleReg, polygonReg; private OsgiBundleXmlApplicationContext appCtx; private static List referenceBindServices, referenceUnbindServices; private static List collectionBindServices, collectionUnbindServices; public static class ReferenceListener { public void bind(Object service, Map properties) { referenceBindServices.add(service.toString()); }; public void unbind(Object service, Map properties) { referenceUnbindServices.add(service.toString()); }; } public static class CollectionListener { public void bind(Object service, Map properties) { collectionBindServices.add(service.toString()); }; public void unbind(Object service, Map properties) { collectionUnbindServices.add(service.toString()); }; } // register multiple services of the same type inside OSGi space private void registerMultipleServices() { area = new Area(); rectangle = new Rectangle(); polygon = new Polygon(); Dictionary polygonProp = new Properties(); polygonProp.put(Constants.SERVICE_RANKING, new Integer(1)); // first register polygon polygonReg = bundleContext.registerService(Shape.class.getName(), polygon, polygonProp); // then rectangle Dictionary rectangleProp = new Properties(); rectangleProp.put(Constants.SERVICE_RANKING, new Integer(10)); rectangleReg = bundleContext.registerService(Shape.class.getName(), rectangle, rectangleProp); // then area Dictionary areaProp = new Properties(); areaProp.put(Constants.SERVICE_RANKING, new Integer(100)); areaReg = bundleContext.registerService(Shape.class.getName(), area, areaProp); } protected void onSetUp() { referenceBindServices = new ArrayList(); referenceUnbindServices = new ArrayList(); collectionBindServices = new ArrayList(); collectionUnbindServices = new ArrayList(); } protected void onTearDown() { OsgiServiceUtils.unregisterService(areaReg); OsgiServiceUtils.unregisterService(rectangleReg); OsgiServiceUtils.unregisterService(polygonReg); try { if (appCtx != null) appCtx.close(); } catch (Exception ex) { ex.printStackTrace(); } referenceBindServices = null; referenceUnbindServices = null; collectionBindServices = null; collectionUnbindServices = null; } private void createAppCtx() { appCtx = new OsgiBundleXmlApplicationContext( new String[] { "/org/springframework/osgi/iandt/syntheticEvents/importers.xml" }); appCtx.setBundleContext(bundleContext); appCtx.refresh(); } // create appCtx each time since we depend we test startup/shutdown behaviour // and cannot have shared states public void testServiceReferenceEventsOnStartupWithMultipleServicesPresent() throws Exception { registerMultipleServices(); createAppCtx(); assertEquals("only one service bound at startup", 1, referenceBindServices.size()); assertEquals("wrong service bound", area.toString(), referenceBindServices.get(0).toString()); } public void testServiceReferenceEventsDuringLifetimeWithMultipleServicesPresent() throws Exception { createAppCtx(); registerMultipleServices(); assertEquals("multiple services should have been bound during runtime", 3, referenceBindServices.size()); assertEquals("wrong 1st service bound", polygon.toString(), referenceBindServices.get(0).toString()); assertEquals("wrong 2nd service bound", rectangle.toString(), referenceBindServices.get(1).toString()); assertEquals("wrong 3rd service bound", area.toString(), referenceBindServices.get(2).toString()); } public void testServiceReferenceEventsOnShutdownWithMultipleServicesPresent() throws Exception { createAppCtx(); registerMultipleServices(); appCtx.close(); assertEquals("only one service unbound at shutdown", 1, referenceUnbindServices.size()); assertEquals("wrong unbind at shutdown", area.toString(), referenceUnbindServices.get(0).toString()); appCtx = null; } public void testServiceCollectionEventsOnStartupWithMultipleServicesPresent() throws Exception { registerMultipleServices(); createAppCtx(); assertEquals("all services should have been bound at startup", 3, collectionBindServices.size()); assertEquals("wrong service bound", polygon.toString(), collectionBindServices.get(0).toString()); assertEquals("wrong service bound", rectangle.toString(), collectionBindServices.get(1).toString()); assertEquals("wrong service bound", area.toString(), collectionBindServices.get(2).toString()); } public void testServiceCollectionEventsDuringLifetimeWithMultipleServicesPresent() throws Exception { createAppCtx(); registerMultipleServices(); assertEquals("multiple services should have been bound during runtime", 3, referenceBindServices.size()); assertEquals("wrong 1st service bound", polygon.toString(), collectionBindServices.get(0).toString()); assertEquals("wrong 2nd service bound", rectangle.toString(), collectionBindServices.get(1).toString()); assertEquals("wrong 3rd service bound", area.toString(), collectionBindServices.get(2).toString()); } public void testServiceCollectionEventsOnShutdownWithMultipleServicesPresent() throws Exception { createAppCtx(); registerMultipleServices(); appCtx.close(); assertEquals("all services should have been bound at startup", 3, collectionUnbindServices.size()); assertEquals("wrong 1st service bound", polygon.toString(), collectionUnbindServices.get(0).toString()); assertEquals("wrong 2nd service bound", rectangle.toString(), collectionUnbindServices.get(1).toString()); assertEquals("wrong 3rd service bound", area.toString(), collectionUnbindServices.get(2).toString()); appCtx = null; } }
[ "vinayv.2208@gmail.com" ]
vinayv.2208@gmail.com
5b9c44ac908df10acf40681ef21de17f193ca77e
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module971/src/main/java/module971packageJava0/Foo185.java
7ab3a3c59b3cb2af4030c242cf58f612d2717984
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
391
java
package module971packageJava0; import java.lang.Integer; public class Foo185 { Integer int0; Integer int1; public void foo0() { new module971packageJava0.Foo184().foo5(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
d0c2056e04a56d982772d4211952e009ea2929f1
6ef4869c6bc2ce2e77b422242e347819f6a5f665
/devices/google/Pixel 2/29/QPP6.190730.005/src/framework/android/telephony/mbms/StreamingService.java
a59444f090264129d48fd9bebdad24d47a820aab
[]
no_license
hacking-android/frameworks
40e40396bb2edacccabf8a920fa5722b021fb060
943f0b4d46f72532a419fb6171e40d1c93984c8e
refs/heads/master
2020-07-03T19:32:28.876703
2019-08-13T03:31:06
2019-08-13T03:31:06
202,017,534
2
0
null
2019-08-13T03:33:19
2019-08-12T22:19:30
Java
UTF-8
Java
false
false
4,322
java
/* * Decompiled with CFR 0.145. */ package android.telephony.mbms; import android.net.Uri; import android.os.RemoteException; import android.telephony.MbmsStreamingSession; import android.telephony.mbms.InternalStreamingServiceCallback; import android.telephony.mbms.StreamingServiceInfo; import android.telephony.mbms.vendor.IMbmsStreamingService; import android.util.Log; import java.lang.annotation.Annotation; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; public class StreamingService implements AutoCloseable { public static final int BROADCAST_METHOD = 1; private static final String LOG_TAG = "MbmsStreamingService"; public static final int REASON_BY_USER_REQUEST = 1; public static final int REASON_END_OF_SESSION = 2; public static final int REASON_FREQUENCY_CONFLICT = 3; public static final int REASON_LEFT_MBMS_BROADCAST_AREA = 6; public static final int REASON_NONE = 0; public static final int REASON_NOT_CONNECTED_TO_HOMECARRIER_LTE = 5; public static final int REASON_OUT_OF_MEMORY = 4; public static final int STATE_STALLED = 3; public static final int STATE_STARTED = 2; public static final int STATE_STOPPED = 1; public static final int UNICAST_METHOD = 2; private final InternalStreamingServiceCallback mCallback; private final MbmsStreamingSession mParentSession; private IMbmsStreamingService mService; private final StreamingServiceInfo mServiceInfo; private final int mSubscriptionId; public StreamingService(int n, IMbmsStreamingService iMbmsStreamingService, MbmsStreamingSession mbmsStreamingSession, StreamingServiceInfo streamingServiceInfo, InternalStreamingServiceCallback internalStreamingServiceCallback) { this.mSubscriptionId = n; this.mParentSession = mbmsStreamingSession; this.mService = iMbmsStreamingService; this.mServiceInfo = streamingServiceInfo; this.mCallback = internalStreamingServiceCallback; } private void sendErrorToApp(int n, String string2) { try { this.mCallback.onError(n, string2); } catch (RemoteException remoteException) { // empty catch block } } /* * WARNING - Removed back jump from a try to a catch block - possible behaviour change. * Unable to fully structure code * Enabled aggressive block sorting * Enabled unnecessary exception pruning * Enabled aggressive exception aggregation * Lifted jumps to return sites */ @Override public void close() { var1_1 = this.mService; if (var1_1 == null) throw new IllegalStateException("No streaming service attached"); var1_1.stopStreaming(this.mSubscriptionId, this.mServiceInfo.getServiceId()); this.mParentSession.onStreamingServiceStopped(this); return; { catch (RemoteException var1_3) {} { Log.w("MbmsStreamingService", "Remote process died"); this.mService = null; this.sendErrorToApp(3, null); } } ** finally { lbl13: // 1 sources: this.mParentSession.onStreamingServiceStopped(this); throw var1_2; } public InternalStreamingServiceCallback getCallback() { return this.mCallback; } public StreamingServiceInfo getInfo() { return this.mServiceInfo; } public Uri getPlaybackUri() { Object object = this.mService; if (object != null) { try { object = object.getPlaybackUri(this.mSubscriptionId, this.mServiceInfo.getServiceId()); return object; } catch (RemoteException remoteException) { Log.w(LOG_TAG, "Remote process died"); this.mService = null; this.mParentSession.onStreamingServiceStopped(this); this.sendErrorToApp(3, null); return null; } } throw new IllegalStateException("No streaming service attached"); } @Retention(value=RetentionPolicy.SOURCE) public static @interface StreamingState { } @Retention(value=RetentionPolicy.SOURCE) public static @interface StreamingStateChangeReason { } }
[ "me@paulo.costa.nom.br" ]
me@paulo.costa.nom.br
a7002c24e3dcaaebdb0f56467827136f730e77d6
473fc28d466ddbe9758ca49c7d4fb42e7d82586e
/app/src/main/java/com/syd/source/aosp/cts/apps/CtsVerifier/src/com/android/cts/verifier/usb/accessory/AccessoryAttachmentHandler.java
f5e0fefd2e9ecf51de7d06eb3c49a096353bafc2
[]
no_license
lz-purple/Source
a7788070623f2965a8caa3264778f48d17372bab
e2745b756317aac3c7a27a4c10bdfe0921a82a1c
refs/heads/master
2020-12-23T17:03:12.412572
2020-01-31T01:54:37
2020-01-31T01:54:37
237,205,127
4
2
null
null
null
null
UTF-8
Java
false
false
2,549
java
/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.cts.verifier.usb.accessory; import android.app.Activity; import android.hardware.usb.UsbAccessory; import android.hardware.usb.UsbManager; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import java.util.ArrayList; /** * Utility to receive callbacks when an USB accessory is attached. */ public class AccessoryAttachmentHandler extends Activity { private static final ArrayList<AccessoryAttachmentObserver> sObservers = new ArrayList<>(); /** * Register an observer to be called when an USB accessory connects. * * @param observer The observer that should be called when an USB accessory connects. */ static void addObserver(@NonNull AccessoryAttachmentObserver observer) { synchronized (sObservers) { sObservers.add(observer); } } /** * Remove an observer that was added in {@link #addObserver}. * * @param observer The observer to remove */ static void removeObserver(@NonNull AccessoryAttachmentObserver observer) { synchronized (sObservers) { sObservers.remove(observer); } } @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); UsbAccessory accessory = getIntent().getParcelableExtra(UsbManager.EXTRA_ACCESSORY); synchronized (sObservers) { ArrayList<AccessoryAttachmentObserver> observers = (ArrayList<AccessoryAttachmentObserver>) sObservers.clone(); for (AccessoryAttachmentObserver observer : observers) { observer.onAttached(accessory); } } finish(); } /** * Callback when an accessory is attached */ interface AccessoryAttachmentObserver { void onAttached(UsbAccessory accessory); } }
[ "997530783@qq.com" ]
997530783@qq.com
eb9393e7cd4966e960cf2f12283a230f47c5d071
68bc0904cd1bbbd3efc61a0e99724cd4e4562124
/core/src/main/java/org/renjin/primitives/matrix/MatrixBuilder.java
f71a74aaa26a9d5e9caf77a267823dff448dc5dd
[]
no_license
sz-alook/renjin
4b2f4592eb2a85e31fe2ce861b6edf19f9f3a12e
38ec731066d7058b654a4f0882fd16204571b275
refs/heads/master
2020-04-09T05:05:34.951836
2012-06-29T08:07:17
2012-06-29T08:07:17
4,981,931
0
2
null
2018-02-18T10:05:52
2012-07-10T23:26:32
R
UTF-8
Java
false
false
489
java
package org.renjin.primitives.matrix; import java.util.Collection; import org.renjin.sexp.StringVector; import org.renjin.sexp.Vector; public interface MatrixBuilder { void setRowNames(Vector names); void setRowNames(Collection<String> names); void setColNames(StringVector names); void setColNames(Collection<String> names); int getRows(); int getCols(); void setValue(int row, int col, double value); void setValue(int row, int col, int value); Vector build(); }
[ "alex@bedatadriven.com@b722d886-ae41-2056-5ac6-6db9963f4c99" ]
alex@bedatadriven.com@b722d886-ae41-2056-5ac6-6db9963f4c99
d89b814ca931c325cefa6d6e87ab9fd53b22a582
729cecd15f257fbde46fa3acd483670b7399a516
/spring/src/main/java/com/spring/bean/PersonBean.java
b55c5d87d0a6ebd0a41fcbfe19a0db037494a898
[ "MIT", "BSD-2-Clause" ]
permissive
ksfzhaohui/blog
dcb0f573741edc159c45bbce057863078ac70255
9d6994f2d66f760c3dda507f08fcf2b2046814b8
refs/heads/master
2023-06-21T15:14:38.733445
2023-06-18T13:26:26
2023-06-18T13:26:26
140,855,650
107
47
BSD-2-Clause
2022-12-16T00:37:19
2018-07-13T14:18:27
Java
UTF-8
Java
false
false
1,739
java
package com.spring.bean; import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactoryAware; import org.springframework.beans.factory.BeanNameAware; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.InitializingBean; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; public class PersonBean implements BeanNameAware, BeanFactoryAware, ApplicationContextAware, InitializingBean, DisposableBean { private String name; public PersonBean() { System.out.println("PersonBean类构造方法"); } public String getName() { return name; } public void setName(String name) { this.name = name; System.out.println("set方法被调用"); } // 自定义的初始化函数 public void myInit() { System.out.println("myInit被调用"); } // 自定义的销毁方法 public void myDestroy() { System.out.println("myDestroy被调用"); } public void destroy() throws Exception { System.out.println("destory被调用"); } public void afterPropertiesSet() throws Exception { System.out.println("afterPropertiesSet被调用"); } public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { System.out.println("setApplicationContext被调用"); } public void setBeanFactory(BeanFactory beanFactory) throws BeansException { System.out.println("setBeanFactory被调用,beanFactory"); } public void setBeanName(String beanName) { System.out.println("setBeanName被调用,beanName:" + beanName); } public String toString() { return "name is :" + name; } }
[ "ksfzhaohui@126.com" ]
ksfzhaohui@126.com
00dc6770246f2b81765eb7e1e32edbccc41471f6
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_a39803494d92409b92af177a3a551c2cc11ec90f/QueryOperation/7_a39803494d92409b92af177a3a551c2cc11ec90f_QueryOperation_s.java
d50c700d14da2e3950cf899cbead5ae398ae3607
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
6,149
java
/* * Copyright (c) 2008-2013, Hazelcast, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * 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.hazelcast.map; import com.hazelcast.nio.ObjectDataInput; import com.hazelcast.nio.ObjectDataOutput; import com.hazelcast.nio.serialization.Data; import com.hazelcast.nio.serialization.SerializationService; import com.hazelcast.query.Predicate; import com.hazelcast.query.impl.IndexService; import com.hazelcast.query.impl.QueryEntry; import com.hazelcast.query.impl.QueryResultEntryImpl; import com.hazelcast.query.impl.QueryableEntry; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.concurrent.*; public class QueryOperation extends AbstractMapOperation { Predicate predicate; QueryResult result; public QueryOperation(String mapName, Predicate predicate) { super(mapName); this.predicate = predicate; } public QueryOperation() { } @Override public void run() throws Exception { List<Integer> initialPartitions = mapService.getOwnedPartitions().get(); IndexService indexService = mapService.getMapContainer(name).getIndexService(); Set<QueryableEntry> entries = null; if(!getNodeEngine().getHazelcastInstance().getPartitionService().hasOngoingMigration()){ entries = indexService.query(predicate); } result = new QueryResult(); if (entries != null) { for (QueryableEntry entry : entries) { result.add(new QueryResultEntryImpl(entry.getKeyData(), entry.getKeyData(), entry.getValueData())); } } else { // run in parallel runParallel(initialPartitions); } List<Integer> finalPartitions = mapService.getOwnedPartitions().get(); if (initialPartitions.equals(finalPartitions)) { result.setPartitionIds(finalPartitions); } if (mapContainer.getMapConfig().isStatisticsEnabled()) { ((MapService) getService()).getLocalMapStatsImpl(name).incrementOtherOperations(); } } private void runParallel(final List<Integer> initialPartitions) throws InterruptedException, ExecutionException { final SerializationService ss = getNodeEngine().getSerializationService(); final ExecutorService executor = getNodeEngine().getExecutionService().getExecutor("hz:query"); final List<Future<ConcurrentMap<Object, QueryableEntry>>> lsFutures = new ArrayList<Future<ConcurrentMap<Object, QueryableEntry>>>(initialPartitions.size()); for (final Integer partition : initialPartitions) { Future<ConcurrentMap<Object, QueryableEntry>> f = executor.submit(new Callable<ConcurrentMap<Object, QueryableEntry>>() { public ConcurrentMap<Object, QueryableEntry> call() { final PartitionContainer container = mapService.getPartitionContainer(partition); final RecordStore recordStore = container.getRecordStore(name); ConcurrentMap<Object, QueryableEntry> partitionResult = null; for (Record record : recordStore.getRecords().values()) { Data key = record.getKey(); Object value = null; if (record instanceof CachedDataRecord) { CachedDataRecord cachedDataRecord = (CachedDataRecord) record; value = cachedDataRecord.getCachedValue(); if (value == null) { value = ss.toObject(cachedDataRecord.getValue()); cachedDataRecord.setCachedValue(value); } } else if (record instanceof DataRecord) { value = ss.toObject(((DataRecord) record).getValue()); } else { value = record.getValue(); } final QueryEntry queryEntry = new QueryEntry(ss, key, key, value); if (predicate.apply(queryEntry)) { if (partitionResult == null) { partitionResult = new ConcurrentHashMap<Object, QueryableEntry>(); } partitionResult.put(queryEntry.getIndexKey(), queryEntry); } } return partitionResult; } }); lsFutures.add(f); } for (Future<ConcurrentMap<Object, QueryableEntry>> future : lsFutures) { final ConcurrentMap<Object, QueryableEntry> r = future.get(); if (r != null) { for (QueryableEntry entry : r.values()) { result.add(new QueryResultEntryImpl(entry.getKeyData(), entry.getKeyData(), entry.getValueData())); } } } } @Override public Object getResponse() { return result; } @Override protected void writeInternal(ObjectDataOutput out) throws IOException { super.writeInternal(out); out.writeUTF(name); out.writeObject(predicate); } @Override protected void readInternal(ObjectDataInput in) throws IOException { super.readInternal(in); name = in.readUTF(); predicate = in.readObject(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
54d72ce7a883894278e4e5dc7053eb76f5cd2760
b70b38b6443c5184c02c262c974c2c5ba0540782
/Design_Patterns/Mediator/Sensor/Sensor.java
842934f33cc398808cefb0f9001ed9762b606d49
[]
no_license
bhavya104/Object-Oriented-Design-1
faffe1dcab7c974f634dde00010b1d63df0838db
37e33a305f9f7ef5cb7360251d7cd8c81188bded
refs/heads/master
2022-01-19T17:44:09.161976
2018-08-23T11:15:38
2018-08-23T11:15:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
207
java
package com.javacodegeeks.patterns.mediatorpattern; public class Sensor { public boolean checkTemperature(int temp){ System.out.println("Temperature reached "+temp+" *C"); return true; } }
[ "chaklader@macs-MacBook-Pro.local" ]
chaklader@macs-MacBook-Pro.local
b1b7fbdbb21dcefd9ea84d147b90c8c6337d61fd
fd066712bcbc2e9d3c51e7ca88e2f3db8d8db7db
/codding/src/main/java/net/neoremind/mycode/argorithm/leetcode/UniqueBinarySearchTreesII.java
425ca6bfbf3bb045f8442289ad29c01b8ea4be77
[]
no_license
DongZcC/coddding
ee88acb9d005b2743bf28fb90b134c3419036d27
bb91b4582adbd5091e82d46002175a924559fd36
refs/heads/master
2022-10-17T12:00:03.510024
2022-10-11T01:15:38
2022-10-11T01:15:38
161,160,347
0
1
null
2018-12-10T10:53:35
2018-12-10T10:53:34
null
UTF-8
Java
false
false
2,616
java
package net.neoremind.mycode.argorithm.leetcode; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; import java.util.ArrayList; import java.util.List; import org.junit.Test; import net.neoremind.mycode.argorithm.leetcode.support.TreeNode; /** * Given an integer n, generate all structurally unique BST's (binary search trees) that store values 1...n. * <p> * For example, * Given n = 3, your program should return all 5 unique BST's shown below. * <p> * 1 3 3 2 1 * \ / / / \ \ * 3 2 1 1 3 2 * / / \ \ * 2 1 2 3 * <p> * https://discuss.leetcode.com/topic/2940/java-solution-with-dp/2 * * @author zhangxu * @see https://leetcode.com/problems/unique-binary-search-trees-ii/ */ //TODO 思路和unique-binary-search-tree一样,只不过稍微复杂需要输出所有的树 public class UniqueBinarySearchTreesII { TreeNode deepCopy(TreeNode root) { if (root == null) { return null; } TreeNode tmp = new TreeNode(1); tmp.left = deepCopy(root.left); tmp.right = deepCopy(root.right); return tmp; } int cur = 0; /** * in-order traversal */ void setValue(TreeNode root) { if (root.left != null) { setValue(root.left); } root.val = cur++; if (root.right != null) { setValue(root.right); } } public List<TreeNode> generateTrees(int n) { if (n <= 0) { List<TreeNode> res = new ArrayList<TreeNode>(); res.add(null); return res; } List<TreeNode>[] dp = new ArrayList[n + 1]; for (int i = 0; i < n + 1; ++i) { dp[i] = new ArrayList<TreeNode>(); } dp[0].add(null); for (int i = 1; i <= n; ++i) { for (int j = 0; j < i; ++j) { for (int k = 0; k < dp[j].size(); ++k) { for (int l = 0; l < dp[i - 1 - j].size(); ++l) { TreeNode tmp = new TreeNode(1); tmp.left = deepCopy(dp[j].get(k)); tmp.right = deepCopy(dp[i - 1 - j].get(l)); dp[i].add(tmp); } } } } // 上面只是把树的相对位置摆好了,剩下的就是填1..n的数字 for (int i = 0; i < dp[n].size(); ++i) { cur = 1; setValue(dp[n].get(i)); } return dp[n]; } }
[ "notyetfish@hotmail.com" ]
notyetfish@hotmail.com
5c5b0e0b4b76a52e3b99d6fc470a0bdef216f79d
2122d24de66635b64ec2b46a7c3f6f664297edc4
/dp/src/main/java/com/lee/dp/prototype/example1/OrderBusiness.java
a5dda00ba792419d663e12f0d698f13da1a64017
[]
no_license
yiminyangguang520/Java-Learning
8cfecc1b226ca905c4ee791300e9b025db40cc6a
87ec6c09228f8ad3d154c96bd2a9e65c80fc4b25
refs/heads/master
2023-01-10T09:56:29.568765
2022-08-29T05:56:27
2022-08-29T05:56:27
92,575,777
5
1
null
2023-01-05T05:21:02
2017-05-27T06:16:40
Java
UTF-8
Java
false
false
2,799
java
package com.lee.dp.prototype.example1; /** * 处理订单的业务对象 */ public class OrderBusiness { /** * 创建订单的方法 * * @param order 订单的接口对象 */ public void saveOrder(OrderApi order) { //根据业务要求,当订单的预定的产品数量超过1000的时候,就需要把订单拆成两份订单 //当然如果要做好,这里的1000应该做成常量,这么做是为了演示简单 //1:判断当前的预定产品数量是否大于1000 while (order.getOrderProductNum() > 1000) { //2:如果大于,还需要继续拆分 //2.1再新建一份订单,跟传入的订单除了数量不一样外,其他都相同 OrderApi newOrder = null; if (order instanceof PersonalOrder) { //创建相应的新的订单对象 PersonalOrder p2 = new PersonalOrder(); //然后进行赋值,但是产品数量为1000 PersonalOrder p1 = (PersonalOrder) order; p2.setCustomerName(p1.getCustomerName()); p2.setProductId(p1.getProductId()); p2.setOrderProductNum(1000); //然后再设置给newOrder newOrder = p2; } else if (order instanceof EnterpriseOrder) { //创建相应的订单对象 EnterpriseOrder e2 = new EnterpriseOrder(); //然后进行赋值,但是产品数量为1000 EnterpriseOrder e1 = (EnterpriseOrder) order; e2.setEnterpriseName(e1.getEnterpriseName()); e2.setProductId(e1.getProductId()); e2.setOrderProductNum(1000); //然后再设置给newOrder newOrder = e2; } //2.2原来的订单保留,把数量设置成减少1000 order.setOrderProductNum(order.getOrderProductNum() - 1000); //然后是业务功能处理,省略了,打印输出,看一下 System.out.println("拆分生成订单==" + newOrder); } //3:不超过,那就直接业务功能处理,省略了,打印输出,看一下 System.out.println("订单==" + order); } // public void saveOrder2(OrderApi order){ // int oldNum = order.getOrderProductNum(); // while(oldNum > 1000){ // //定义一个表示被拆分出来的新订单对象 // OrderApi newOrder = null; // // if(order instanceof PersonalOrder){ // //创建相应的订单对象 // PersonalOrder p2 = new PersonalOrder(); // //然后进行赋值等,省略了 // //然后再设置给newOrder // newOrder = p2; // }else if(order instanceof EnterpriseOrder){ // //创建相应的订单对象 // EnterpriseOrder e2 = new EnterpriseOrder(); // //然后进行赋值等,省略了 // //然后再设置给newOrder // newOrder = e2; // } // //然后进行拆分和其他业务功能处理,省略了 // } // } }
[ "litz-a@glodon.com" ]
litz-a@glodon.com
a989ed6f7e1c863fb989e340746a129cc08c3d9b
f84d8e66c03a18eade89a98fdbb3c551a94084dd
/src/me/neznamy/tab/shared/packets/PacketPlayOutScoreboardTeam.java
655599b728c32137e7615da56ba8744b8d1630d0
[ "Apache-2.0" ]
permissive
Phyrone/TAB
5e0af7b48f4ca8d37322df14844212517ef48b91
6e5ade52a49937bf15ce89fe3011b08d424f0043
refs/heads/master
2022-02-20T23:45:17.957791
2019-09-29T12:04:40
2019-09-29T12:04:40
212,518,247
1
0
Apache-2.0
2019-10-03T07:13:59
2019-10-03T07:13:58
null
UTF-8
Java
false
false
4,879
java
package me.neznamy.tab.shared.packets; import java.lang.reflect.Field; import java.util.Collection; import java.util.Collections; import java.util.Map; import me.neznamy.tab.platforms.bukkit.packets.method.MethodAPI; import me.neznamy.tab.shared.Placeholders; import me.neznamy.tab.shared.ProtocolVersion; import me.neznamy.tab.shared.Shared; import net.md_5.bungee.protocol.packet.Team; public class PacketPlayOutScoreboardTeam extends UniversalPacketPlayOut{ private String team; private String prefix; private String suffix; private String visibility; private String teamPush; private EnumChatFormat chatFormat; private Collection<String> entities; private int action; private int signature; @SuppressWarnings("unchecked") public PacketPlayOutScoreboardTeam(String team, String prefix, String suffix, String visibility, String teamPush, Collection<String> entities, int action, int signature, EnumChatFormat format) { this.team = team; this.prefix = prefix; this.suffix = suffix; this.visibility = visibility; this.teamPush = teamPush; this.entities = (Collection<String>) (entities == null ? Collections.emptyList() : entities); this.action = action; this.signature = signature; this.chatFormat = format == null ? EnumChatFormat.RESET : format; } public Object toNMS(ProtocolVersion clientVersion) throws Exception { if (team == null || team.length() == 0) throw new IllegalArgumentException("Team name cannot be null/empty"); String prefix = this.prefix; String suffix = this.suffix; if (clientVersion.getMinorVersion() < 13) { if (prefix != null && prefix.length() > 16) prefix = prefix.substring(0, 16); if (suffix != null && suffix.length() > 16) suffix = suffix.substring(0, 16); } Object packet = MethodAPI.getInstance().newPacketPlayOutScoreboardTeam(); NAME.set(packet, team); if (ProtocolVersion.SERVER_VERSION.getMinorVersion() >= 13) { DISPLAYNAME.set(packet, Shared.mainClass.createComponent(team)); if (prefix != null && prefix.length() > 0) { PREFIX.set(packet, Shared.mainClass.createComponent(prefix)); String last = Placeholders.getLastColors(prefix); if (last != null && last.length() > 0) { chatFormat = EnumChatFormat.getByCharacter(last.toCharArray()[1]); } if (chatFormat != null) CHATFORMAT.set(packet, chatFormat.toNMS()); } if (suffix != null && suffix.length() > 0) SUFFIX.set(packet, Shared.mainClass.createComponent(suffix)); } else { DISPLAYNAME.set(packet, team); if (prefix != null) PREFIX.set(packet, prefix); if (suffix != null) SUFFIX.set(packet, suffix); } if (ProtocolVersion.SERVER_VERSION.getMinorVersion() >= 9) PUSH.set(packet, teamPush); PLAYERS.set(packet, entities); ACTION.set(packet, action); SIGNATURE.set(packet, signature); if (ProtocolVersion.SERVER_VERSION.getMinorVersion() >= 8) VISIBILITY.set(packet, visibility); return packet; } public Object toBungee(ProtocolVersion clientVersion) { String teamDisplay = team; int color = 0; if (clientVersion.getMinorVersion() >= 13) { if (prefix != null) prefix = (String) Shared.mainClass.createComponent(prefix); if (prefix != null) suffix = (String) Shared.mainClass.createComponent(suffix); teamDisplay = (String) Shared.mainClass.createComponent(team); color = chatFormat.toBungee(); } else { if (prefix != null && prefix.length() > 16) prefix = prefix.substring(0, 16); if (suffix != null && suffix.length() > 16) suffix = suffix.substring(0, 16); } return new Team(team, (byte)action, teamDisplay, prefix, suffix, visibility, teamPush, color, (byte)signature, entities.toArray(new String[0])); } public Object toVelocity(ProtocolVersion clientVersion) { return null; } private static Map<String, Field> fields = getFields(MethodAPI.PacketPlayOutScoreboardTeam); private static Field NAME = fields.get("a"); private static Field DISPLAYNAME = fields.get("b"); private static Field PREFIX = fields.get("c"); private static Field SUFFIX = fields.get("d"); private static Field VISIBILITY; private static Field CHATFORMAT; private static Field PUSH; public static Field PLAYERS; private static Field ACTION; public static Field SIGNATURE; static { if (ProtocolVersion.SERVER_VERSION.getMinorVersion() >= 9) { //1.9+ VISIBILITY = fields.get("e"); PUSH = fields.get("f"); PLAYERS = fields.get("h"); ACTION = fields.get("i"); SIGNATURE = fields.get("j"); if (ProtocolVersion.SERVER_VERSION.getMinorVersion() >= 13) { CHATFORMAT = fields.get("g"); } } else if (ProtocolVersion.SERVER_VERSION.getMinorVersion() >= 8) { //1.8.x VISIBILITY = fields.get("e"); PLAYERS = fields.get("g"); ACTION = fields.get("h"); SIGNATURE = fields.get("i"); } else { //1.5.x - 1.7.x PLAYERS = fields.get("e"); ACTION = fields.get("f"); SIGNATURE = fields.get("g"); } } }
[ "n.e.z.n.a.m.y@azet.sk" ]
n.e.z.n.a.m.y@azet.sk
23b3988eaf408594e08c2709b9a3fdb3caca3b22
3629277eeb20b53b394fad18f0d5b2cf0c81858e
/common-orm/src/main/java/jef/database/meta/Reference.java
c733f5ed5b9ea4d3f5652e51c17451eb18960f96
[ "Apache-2.0" ]
permissive
zhanglei/ef-orm
6ccb479c23e2e212a4eccfbf1f8228d11ff62298
57b0af791c33ef56633318fdc2d60155835bf202
refs/heads/master
2021-01-16T22:51:26.273872
2015-08-15T04:51:02
2015-08-15T04:51:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,302
java
/* * JEF - Copyright 2009-2010 Jiyi (mr.jiyi@gmail.com) * * 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 jef.database.meta; import java.util.ArrayList; import java.util.List; import jef.database.annotation.JoinType; import jef.database.query.Query; import jef.database.query.ReadOnlyQuery; import jef.database.query.ReferenceType; import jef.tools.Assert; import org.apache.commons.lang.ObjectUtils; /** * 关于多表操作的三个概念设计 * jef.database.meta.JoinKey类:描述两个实体间的一组关系。两个实体间的关系可能由多个jef.database.meta.JoinKey构成 * * Reference:描述两个实体的关系,这个关系除了包含多个JoinKey意外,还包含了A或者B中引用对方的那个字段名 * @author Jiyi * */ public class Reference{ /** * 链接目标关系,定义了关联的操作方式, * 详细参见{@link ReferenceType} */ private ReferenceType type; /** * 发起表 */ private ITableMetadata fromType; /** * 要链接到一个目标的表(类)。 */ private ITableMetadata targetType; /** * 连接路径 */ private JoinPath hint; /** * 产生一个反向的Reference关系 * @param path * @param r * @return */ public static Reference createRevse(JoinPath path,Reference r){ Reference ref=new Reference(r.getTargetType(),r.getType(),r.getThisType()); ref.setHint(path); return ref; } /** * 构造 * @param target 引用表 * @param refType 引用类型 * @param source 被引用表 */ public Reference(ITableMetadata target, ReferenceType refType, ITableMetadata source) { this.type=refType; this.fromType=source; this.targetType=target; Assert.notNull(type); Assert.notNull(fromType); Assert.notNull(targetType); } /** * 空构造 * 必须有。会通过反射调用 */ @SuppressWarnings("unused") private Reference(){}; /** * 返回引用类型 * @return 引用类型 */ public ReferenceType getType() { return type; } /** * 设置引用类型 * @param type 引用类型 */ public void setType(ReferenceType type) { this.type = type; } /** * 返回被引用表 * @return */ public ITableMetadata getTargetType() { return targetType; } /** * 设置被引用表 * @param targetType */ public void setTargetType(ITableMetadata targetType) { this.targetType = targetType; } /** * 返回引用表 * @return */ public ITableMetadata getThisType() { return fromType; } public String toString(){ StringBuilder sb=new StringBuilder(); if(fromType!=null) sb.append("Join:").append(fromType.getThisType().getSimpleName()).append("->"); if(targetType!=null) sb.append(targetType.getThisType().getSimpleName()); if(this.hint!=null){ sb.append(", CustomPath: "+hint); sb.append("\n"); } return sb.toString(); } //当没有配置Join路径时,通过自动查找的方式来寻找Join路径。 //这是一种为了减少配置工作量而不得不做的容错处理。(不太推荐依赖这种容错机制) private JoinPath findPath(ITableMetadata thisType, ITableMetadata targetType) { //先在当前表中查询已定义的可用引用关系。 for(Reference ref:thisType.getRefFieldsByRef().keySet()){ if(ref==this){ continue; } if(ref.getThisType()==thisType && ref.getTargetType()==targetType && ref.getHint()!=null){ return ref.getHint(); } } //再到目标表中查询可用的反向引用关系。 for(Reference ref:targetType.getRefFieldsByRef().keySet()){ if(ref.getThisType()==targetType && ref.getTargetType()==thisType && ref.getHint()!=null){ return ref.getHint().flip(); } } throw new IllegalArgumentException("Can not find the join path from "+thisType.getSimpleName()+" to "+ targetType.getSimpleName()); } @Override public boolean equals(Object obj) { if(!(obj instanceof Reference))return false; Reference o=(Reference)obj; if(!ObjectUtils.equals(this.fromType, o.fromType))return false; if(!ObjectUtils.equals(this.targetType, o.targetType))return false; if(this.type!=o.type)return false; if(!ObjectUtils.equals(this.hint, o.hint))return false; return true; } @Override public int hashCode() { int hashCode=this.fromType.hashCode()+this.targetType.hashCode()+this.type.hashCode(); return hashCode; } public JoinPath getHint() { return hint; } /** * 返回到目标实体表的路径 */ public JoinPath toJoinPath(){ Assert.notNull(this.targetType,"No join target found."); if(this.hint!=null )return hint; this.hint=findPath(fromType, targetType); return hint; } public void setHint(JoinPath hint) { Query<?> leftq=ReadOnlyQuery.getEmptyQuery(this.fromType); Query<?> rightq=ReadOnlyQuery.getEmptyQuery(this.targetType); JoinPath path=hint.accept(leftq, rightq); Assert.notNull(path); this.hint = hint; } /** * 返回关联配置的Join类型。 * 默认类型为左连接 * @return Join类型。 * @see JoinType */ public JoinType getJoinType(){ JoinPath path=toJoinPath(); if(path==null){ return JoinType.LEFT; } return path.getType(); } /** * 得到使用这个引用的全部引用字段 * @return */ public List<AbstractRefField> getAllRefFields(){ return fromType.getRefFieldsByRef().get(this); } private List<Reference> reverse; /** * 得到目前对象对当前对象的反向引用关系。这个方法必须在所有级联关系初始化后调用,一般在第一次查询操作的时候才能调用。 * @return */ public List<Reference> getExistReverseReference(){ if(null==reverse){ reverse=new ArrayList<Reference>(); for(Reference rr:getTargetType().getRefFieldsByRef().keySet()){ if(isReverse(rr)){ //出现多个反向关联,由于JoinDesc的限定条件存在,正向关联被分化,当反向关联查找时,会出现重复的关联。 //这种情况下,如果正向关联是多个的 if(!reverse.isEmpty()){ throw new IllegalArgumentException(); } reverse.add(rr); } } } return reverse; } private boolean isReverse(Reference ref){ if(this.fromType!=ref.targetType || this.targetType!=ref.fromType || type.reverse()!=ref.type){ return false; } if(hint.getJoinKeys().length!=ref.hint.getJoinKeys().length){ return false; } for(JoinKey key:hint.getJoinKeys()){ if(!hasReverse(key,ref.hint.getJoinKeys())){ return false; } } return true; } private boolean hasReverse(JoinKey key, JoinKey[] joinKeys) { String left=key.getField().name(); String right=key.getRightAsField().name(); for(JoinKey k:joinKeys){ if(right.equals(k.getField().name()) && left.equals(k.getRightAsField().name())){ return true; } } return false; } }
[ "hzjiyi@gmail.com" ]
hzjiyi@gmail.com
d2e0f6bf87164e8307b88b23e4a0cd4fa7c20c96
77c0c4a462091aa0f5f33ea2b4b8e1e772fab90f
/AcciMarket-temp/src-gen/ri-citibanamex/com/citi/insurance/catalogos/persistance/TitularcontratoByNombreSpecification.java
84897ef3ef8a7a895635c8c741612196b7dd5526
[]
no_license
javoPB/test-git
29a89cb69f98f0c886f3592ba138e17d9cace281
d8cf1716d168152660c2a3c833894d6f7b5955de
refs/heads/master
2023-01-28T17:28:18.421100
2020-12-09T18:59:21
2020-12-09T18:59:21
300,303,289
0
0
null
null
null
null
UTF-8
Java
false
false
855
java
package com.citi.insurance.catalogos.persistence; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; import com.citi.insurance.catalogos.entity.Titularcontrato; import com.citi.insurance.catalogos.entity.Titularcontrato_; import com.citi.insurance.catalogos.support.persistence.BaseSpecification; public class TitularcontratoByNombreSpecification extends BaseSpecification<Titularcontrato> { private final String name; public TitularcontratoByNombreSpecification(String name) { this.name = name; } @Override public Predicate toPredicate(Root<Titularcontrato> root, CriteriaQuery<?> cq, CriteriaBuilder cb) { return cb.like(root.get(Titularcontrato_.nombre), "%"+this.name+"%"); } }
[ "pbjavouam@gmail.com" ]
pbjavouam@gmail.com
d6a7ae96b0caaa3ffbd2f2b797377d715b2d1ec9
0529524c95045b3232f6553d18a7fef5a059545e
/app/src/androidTest/java/TestCase_33020A2A591B70BEE7C7B4E0B6FAD20180D9C0D2A85BEA325B925C9979BA34F9_253132632.java
9b1105c65969f09dd09943a0f7914e35e55b6deb
[]
no_license
sunxiaobiu/BasicUnitAndroidTest
432aa3e10f6a1ef5d674f269db50e2f1faad2096
fed24f163d21408ef88588b8eaf7ce60d1809931
refs/heads/main
2023-02-11T21:02:03.784493
2021-01-03T10:07:07
2021-01-03T10:07:07
322,577,379
0
0
null
null
null
null
UTF-8
Java
false
false
600
java
import android.os.PersistableBundle; import androidx.test.runner.AndroidJUnit4; import org.easymock.EasyMock; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(AndroidJUnit4.class) public class TestCase_33020A2A591B70BEE7C7B4E0B6FAD20180D9C0D2A85BEA325B925C9979BA34F9_253132632 { @Test public void testCase() throws Exception { Object[] var2 = new Object[0]; Object var3 = EasyMock.createMock(Object[].class); var3 = ((Object[])var3)[0]; PersistableBundle var4 = (PersistableBundle)var3; String var1 = "android"; var4.getInt(var1, 0); } }
[ "sunxiaobiu@gmail.com" ]
sunxiaobiu@gmail.com
cd0ba87a23c4b11543b1d64f29d44db8e4ca0d54
50baf46a384bae0c291aee25428cb1b180a4ba5f
/java/j2ee/study-j2ee-jmx/src/main/java/com/heaven7/study/j2ee/jmx/HelloWorldAgent.java
d7ca446a345f9b6c0d8ef77d97ae425aa47631e5
[ "Apache-2.0" ]
permissive
LightSun/research-institute
9c84b5e6bb3005614cc923007ef436c621d33190
48eb3500a00b69bca78242fd648cc1f818b394b0
refs/heads/master
2021-05-15T00:24:18.066470
2019-09-07T07:35:29
2019-09-07T07:35:29
103,363,180
2
1
null
null
null
null
UTF-8
Java
false
false
2,145
java
package com.heaven7.study.j2ee.jmx; import com.sun.jdmk.comm.HtmlAdaptorServer; import java.io.IOException; import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; import javax.management.InstanceAlreadyExistsException; import javax.management.MBeanRegistrationException; import javax.management.MBeanServer; import javax.management.MBeanServerFactory; import javax.management.MalformedObjectNameException; import javax.management.NotCompliantMBeanException; import javax.management.ObjectName; import javax.management.remote.JMXConnectorServer; import javax.management.remote.JMXConnectorServerFactory; import javax.management.remote.JMXServiceURL; public class HelloWorldAgent { public static void main(String[] args) throws MalformedObjectNameException, NullPointerException, InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException, IOException { int rmiPort = 1099; String jmxServerName = "TestJMXServer"; // jdkfolder/bin/rmiregistry.exe 9999 Registry registry = LocateRegistry.createRegistry(rmiPort); MBeanServer mbs = MBeanServerFactory.createMBeanServer(jmxServerName); //MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); HtmlAdaptorServer adapter = new HtmlAdaptorServer(); ObjectName adapterName; adapterName = new ObjectName(jmxServerName + ":name=" + "htmladapter"); adapter.setPort(9294); adapter.start(); mbs.registerMBean(adapter, adapterName); ObjectName objName = new ObjectName(jmxServerName + ":name=" + "HelloWorld"); mbs.registerMBean(new HelloWorld(), objName); JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:" + rmiPort + "/" + jmxServerName); System.out.println("JMXServiceURL: " + url.toString()); JMXConnectorServer jmxConnServer = JMXConnectorServerFactory.newJMXConnectorServer(url, null, mbs); jmxConnServer.start(); } }
[ "978136772@qq.com" ]
978136772@qq.com
10e23cc6539803108ae32be2add7287d4fbe4772
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/no_seeding/56_jhandballmoves-visu.handball.moves.actions.PrintActualSequenzAction-1.0-6/visu/handball/moves/actions/PrintActualSequenzAction_ESTest_scaffolding.java
a92b4abb9e00142fab04f2b7925f1a514c9e8f4f
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,944
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Oct 28 19:40:02 GMT 2019 */ package visu.handball.moves.actions; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.junit.AfterClass; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class PrintActualSequenzAction_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "visu.handball.moves.actions.PrintActualSequenzAction"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @AfterClass public static void clearEvoSuiteFramework(){ Sandbox.resetDefaultSecurityManager(); java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); setSystemProperties(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); java.lang.System.setProperty("user.dir", "/home/pderakhshanfar/evosuite-model-seeding-ee/evosuite-model-seeding-empirical-evaluation"); java.lang.System.setProperty("user.language", "en"); java.lang.System.setProperty("user.home", "/home/pderakhshanfar"); java.lang.System.setProperty("java.io.tmpdir", "/tmp"); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(PrintActualSequenzAction_ESTest_scaffolding.class.getClassLoader() , "visu.handball.moves.model.player.Ball", "visu.handball.moves.resources.Resources", "visu.handball.moves.views.BallDrawer", "visu.handball.moves.Main", "visu.handball.moves.model.player.MovePoint", "visu.handball.moves.actions.AbstractPrintAction", "visu.handball.moves.views.Field", "visu.handball.moves.actions.SetMoveNameAction", "visu.handball.moves.model.ColorModelListener", "visu.handball.moves.model.ColorModel", "visu.handball.moves.model.MoveEvent", "visu.handball.moves.actions.AbstractExportAction", "visu.handball.moves.model.player.HighlightableItem", "visu.handball.moves.views.PlayerToolBar", "visu.handball.moves.views.CommentView", "visu.handball.moves.actions.PrintActualSequenzAction", "visu.handball.moves.model.PlayerRemovedListener", "visu.handball.moves.views.DefenderDrawer", "visu.handball.moves.model.TableHandballModel", "visu.handball.moves.model.HandballModelListener", "visu.handball.moves.model.player.Player", "visu.handball.moves.model.player.Circle", "visu.handball.moves.model.animation.Animator", "visu.handball.moves.actions.CloseAction", "visu.handball.moves.views.CircleDrawer", "visu.handball.moves.model.animation.AnimationModel", "visu.handball.moves.views.StatusBar", "visu.handball.moves.actions.AbstractPrintAction$SequencePagePrintable", "visu.handball.moves.model.player.Offender", "visu.handball.moves.views.OffenderDrawer", "visu.handball.moves.views.AbstractPlayerDrawer", "visu.handball.moves.model.player.Defender", "visu.handball.moves.model.HandballModel", "visu.handball.moves.actions.AbstractSupportSaveAction", "visu.handball.moves.controller.HandballFileFilter", "visu.handball.moves.actions.SaveAction", "visu.handball.moves.model.HandballModel$State" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(PrintActualSequenzAction_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "visu.handball.moves.actions.AbstractExportAction", "visu.handball.moves.actions.AbstractPrintAction", "visu.handball.moves.actions.PrintActualSequenzAction", "visu.handball.moves.resources.Resources", "visu.handball.moves.model.HandballModel", "visu.handball.moves.model.player.Player", "visu.handball.moves.model.player.Defender", "visu.handball.moves.model.player.Offender", "visu.handball.moves.model.player.Circle", "visu.handball.moves.model.player.Ball", "visu.handball.moves.Main", "visu.handball.moves.actions.AbstractPrintAction$SequencePagePrintable", "visu.handball.moves.model.ColorModel", "visu.handball.moves.views.AbstractPlayerDrawer", "visu.handball.moves.views.DefenderDrawer", "visu.handball.moves.views.CircleDrawer", "visu.handball.moves.views.BallDrawer", "visu.handball.moves.views.OffenderDrawer", "visu.handball.moves.model.MoveEvent", "visu.handball.moves.model.TableHandballModel", "visu.handball.moves.model.HandballModel$State" ); } }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
123b2d2e90e9b40572097667bf90e919d3d024d5
5675f7d6d2ff8f7c10200e67eecaa03cfe451bed
/service/src/main/java/aaron/baseinfo/service/pojo/vo/SubjectVo.java
df780f5fec8f44f1a60fb9d2f841fb7bb8d53514
[]
no_license
AaronX123/aaron-baseinfo
c490a37364fd28a38c4363ca7e12ceb0730a7e70
988ed279333e5e3e910884fafc78fb472bee3312
refs/heads/master
2021-02-13T02:26:40.075826
2020-05-28T02:31:22
2020-05-28T02:31:22
244,652,736
0
0
null
null
null
null
UTF-8
Java
false
false
3,400
java
package aaron.baseinfo.service.pojo.vo; import aaron.baseinfo.service.pojo.model.SubjectAnswer; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import javax.validation.Valid; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import java.io.Serializable; import java.util.List; /** * 题目VO * * @Date: 2019/9/5 * @Version: 1.0 * @Maintenance Records: */ public class SubjectVo extends BaseItemVo implements Serializable { private static final long serialVersionUID = 8413924345677180367L; /** * 题目 */ @NotBlank(message = "题目内容不能为空!") private String name; /** * 题目类型id */ @JsonSerialize(using = ToStringSerializer.class) @NotNull(message = "题型不能为空!") private Long subjectTypeId; /** * 题目类型名 */ private String subjectTypeName; /** * 难度id */ @JsonSerialize(using = ToStringSerializer.class) @NotNull(message = "题目难度不能为空!") private Long difficulty; /** * 题目类别id */ @JsonSerialize(using = ToStringSerializer.class) @NotNull(message = "题目类别不能为空!") private Long categoryId; /** * 题目类别名 */ private String categoryName; @Valid private List<SubjectAnswerVo> subjectAnswerVoList; public SubjectVo() { } public String getName() { return name; } public void setName(String name) { this.name = name; } public Long getSubjectTypeId() { return subjectTypeId; } public void setSubjectTypeId(Long subjectTypeId) { this.subjectTypeId = subjectTypeId; } public String getSubjectTypeName() { return subjectTypeName; } public void setSubjectTypeName(String subjectTypeName) { this.subjectTypeName = subjectTypeName; } public Long getDifficulty() { return difficulty; } public void setDifficulty(Long difficulty) { this.difficulty = difficulty; } public Long getCategoryId() { return categoryId; } public void setCategoryId(Long categoryId) { this.categoryId = categoryId; } public String getCategoryName() { return categoryName; } public void setCategoryName(String categoryName) { this.categoryName = categoryName; } public List<SubjectAnswerVo> getSubjectAnswerVOList() { return subjectAnswerVoList; } public void setSubjectAnswerVOList(List<SubjectAnswerVo> subjectAnswerVOList) { this.subjectAnswerVoList = subjectAnswerVOList; } @Override public String toString() { return "SubjectVO{" + "name='" + name + '\'' + ", subjectTypeId=" + subjectTypeId + ", subjectTypeName='" + subjectTypeName + '\'' + ", difficulty=" + difficulty + ", categoryId=" + categoryId + ", categoryName='" + categoryName + '\'' + ", subjectAnswerVOList=" + subjectAnswerVoList + ", id=" + id + ", status=" + status + ", version=" + version + ", remark='" + remark + '\'' + '}'; } }
[ "739243573@qq.com" ]
739243573@qq.com
718fa4c1c395ab478e20812ee951dff956e1db4d
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/digits/08c7ea4ac39aa6a5ab206393bb4412de9d2c365ecdda9c1b391be963c1811014ed23d2722d7433b8e8a95305eee314d39da4950f31e01f9147f90af91a5c433a/001/mutations/922/digits_08c7ea4a_001.java
314082167d4e21ca42852b740dfbc161c5a13e53
[]
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
3,703
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class digits_08c7ea4a_001 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { digits_08c7ea4a_001 mainClass = new digits_08c7ea4a_001 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { IntObj num = new IntObj (), numl = new IntObj (), n = new IntObj (), d0 = new IntObj (), d1 = new IntObj (), d2 = new IntObj (), d3 = new IntObj (), d4 = new IntObj (), d5 = new IntObj (), d6 = new IntObj (), d7 = new IntObj (), d8 = new IntObj (), d9 = new IntObj (); output += (String.format ("\nEnter an integer > ")); num.value = scanner.nextInt (); numl.value = num.value; n.value = 0; while (numl.value > 0) { n.value += 1; numl.value = numl.value / 10; } d0.value = num.value % 10; num.value = (num.value - d0.value) / 10; d1.value = num.value % 10; num.value = (num.value - d1.value) / 10; d2.value = num.value % 10; num.value = (num.value - d2.value) / 10; d3.value = num.value % 10; num.value = (num.value - d3.value) / 10; d4.value = num.value % 10; num.value = (num.value - d4.value) / 10; d5.value = num.value % 10; num.value = (num.value - d5.value) / 10; d6.value = num.value % 10; num.value = (num.value - d6.value) / 10; d7.value = num.value % 10; num.value = (num.value - d7.value) / 10; ((num.value) - (d7.value)) / 10 = num.value % 10; num.value = (num.value - d8.value) / 10; d9.value = num.value % 10; num.value = (num.value - d9.value) / 10; output += (String.format ("\n%d\n", d0.value)); if (n.value > 1) { output += (String.format ("%d\n", d1.value)); } if (n.value > 2) { output += (String.format ("%d\n", d2.value)); } if (n.value > 3) { output += (String.format ("%d\n", d3.value)); } if (n.value > 4) { output += (String.format ("%d\n", d4.value)); } if (n.value > 5) { output += (String.format ("%d\n", d5.value)); } if (n.value > 6) { output += (String.format ("%d\n", d6.value)); } if (n.value > 7) { output += (String.format ("%d\n", d7.value)); } if (n.value > 8) { output += (String.format ("%d\n", d8.value)); } if (n.value > 9) { output += (String.format ("%d\n", d9.value)); } output += (String.format ("That's all, have a nice day!\n")); if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
e56e26eb4e7a426c83d3d8f1f14584eccb3d99c8
84de785f113a03a5e200218fa41711e67cd61b63
/support/src/main/java/org/fourthline/cling/support/model/item/AudioItem.java
8f6081702aa6fa503f2fb20387142deb030e2f6c
[]
no_license
bubbleguuum/cling
3be10c3096334fce691a815c730935e73c654d97
28ee8b0fbbc0b71a73e383af530f6bb168b1f9f7
refs/heads/master
2021-01-18T08:24:29.950159
2013-10-26T13:02:46
2013-10-26T13:02:46
2,954,144
1
0
null
null
null
null
UTF-8
Java
false
false
4,565
java
/* * Copyright (C) 2011 4th Line GmbH, Switzerland * * This program 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 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.fourthline.cling.support.model.item; import org.fourthline.cling.support.model.Person; import org.fourthline.cling.support.model.Res; import org.fourthline.cling.support.model.container.Container; import java.net.URI; import java.util.Arrays; import java.util.List; import static org.fourthline.cling.support.model.DIDLObject.Property.DC; import static org.fourthline.cling.support.model.DIDLObject.Property.UPNP; /** * @author Christian Bauer */ public class AudioItem extends Item { public static final Class CLASS = new Class("object.item.audioItem"); public AudioItem() { setClazz(CLASS); } public AudioItem(Item other) { super(other); } public AudioItem(String id, Container parent, String title, String creator, Res... resource) { this(id, parent.getId(), title, creator, resource); } public AudioItem(String id, String parentID, String title, String creator, Res... resource) { super(id, parentID, title, creator, CLASS); if (resource != null) { getResources().addAll(Arrays.asList(resource)); } } public String getFirstGenre() { return getFirstPropertyValue(UPNP.GENRE.class); } public String[] getGenres() { List<String> list = getPropertyValues(UPNP.GENRE.class); return list.toArray(new String[list.size()]); } public AudioItem setGenres(String[] genres) { removeProperties(UPNP.GENRE.class); for (String genre : genres) { addProperty(new UPNP.GENRE(genre)); } return this; } public String getDescription() { return getFirstPropertyValue(DC.DESCRIPTION.class); } public AudioItem setDescription(String description) { replaceFirstProperty(new DC.DESCRIPTION(description)); return this; } public String getLongDescription() { return getFirstPropertyValue(UPNP.LONG_DESCRIPTION.class); } public AudioItem setLongDescription(String description) { replaceFirstProperty(new UPNP.LONG_DESCRIPTION(description)); return this; } public Person getFirstPublisher() { return getFirstPropertyValue(DC.PUBLISHER.class); } public Person[] getPublishers() { List<Person> list = getPropertyValues(DC.PUBLISHER.class); return list.toArray(new Person[list.size()]); } public AudioItem setPublishers(Person[] publishers) { removeProperties(DC.PUBLISHER.class); for (Person publisher : publishers) { addProperty(new DC.PUBLISHER(publisher)); } return this; } public URI getFirstRelation() { return getFirstPropertyValue(DC.RELATION.class); } public URI[] getRelations() { List<URI> list = getPropertyValues(DC.RELATION.class); return list.toArray(new URI[list.size()]); } public AudioItem setRelations(URI[] relations) { removeProperties(DC.RELATION.class); for (URI relation : relations) { addProperty(new DC.RELATION(relation)); } return this; } public String getLanguage() { return getFirstPropertyValue(DC.LANGUAGE.class); } public AudioItem setLanguage(String language) { replaceFirstProperty(new DC.LANGUAGE(language)); return this; } public String getFirstRights() { return getFirstPropertyValue(DC.RIGHTS.class); } public String[] getRights() { List<String> list = getPropertyValues(DC.RIGHTS.class); return list.toArray(new String[list.size()]); } public AudioItem setRights(String[] rights) { removeProperties(DC.RIGHTS.class); for (String right : rights) { addProperty(new DC.RIGHTS(right)); } return this; } }
[ "cb@4thline.com" ]
cb@4thline.com
1e865b5dcad5c56bc3abecffad3606b6b71aa8c3
7fdc7740a7b4958e26f4bdd0c67e2f33c9d032ab
/SpringBoot/spring-security-test/src/main/java/com/test/securtiy/component/ajax/AjaxLoginAuthenticationToken.java
a26eb96b0a5abf8a91be7765fe98b06a3c9de3ad
[]
no_license
lysjava1992/javabase
9290464826d89c0415bb7c6084aa649de1496741
9d403aae8f20643fe1bf370cabcdd93164ea604b
refs/heads/master
2023-06-22T02:25:21.573301
2021-12-12T03:35:36
2021-12-12T03:35:36
216,582,761
0
0
null
null
null
null
UTF-8
Java
false
false
2,535
java
package com.test.securtiy.component.ajax; import org.springframework.security.authentication.AbstractAuthenticationToken; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.SpringSecurityCoreVersion; import org.springframework.util.Assert; import java.util.Collection; public class AjaxLoginAuthenticationToken extends AbstractAuthenticationToken { private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID; /** * 认证主体 * 用户名 */ private final Object principal; /** * 证书 * 密码 */ private Object credentials; /** * This constructor can be safely used by any code that wishes to create a * <code>UsernamePasswordAuthenticationToken</code>, as the {@link #isAuthenticated()} * will return <code>false</code>. * */ public AjaxLoginAuthenticationToken(Object principal, Object credentials) { super(null); this.principal = principal; this.credentials = credentials; setAuthenticated(false); } /** * This constructor should only be used by <code>AuthenticationManager</code> or * <code>AuthenticationProvider</code> implementations that are satisfied with * producing a trusted (i.e. {@link #isAuthenticated()} = <code>true</code>) * authentication token. * @param principal * @param credentials * @param authorities */ public AjaxLoginAuthenticationToken(Object principal, Object credentials, Collection<? extends GrantedAuthority> authorities) { super(authorities); this.principal = principal; this.credentials = credentials; super.setAuthenticated(true); // must use super, as we override } @Override public Object getCredentials() { return this.credentials; } @Override public Object getPrincipal() { return this.principal; } @Override public void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentException { Assert.isTrue(!isAuthenticated, "Cannot set this token to trusted - use constructor which takes a GrantedAuthority list instead"); super.setAuthenticated(false); } @Override public void eraseCredentials() { super.eraseCredentials(); this.credentials = null; } }
[ "763644568@qq.com" ]
763644568@qq.com
399c6ffe058b4d336d8e989c0cfa30ca98709313
79162ace613282d02d30ced1869c4ecf92c2ff57
/dao.mybatis.xnly/src/main/java/com/myweb/dao/impl/FrameWorkDaoImpl.java
f3f416c3773c86ff540ebf08b7854bf19704c154
[]
no_license
wangyongst/backend
93e96fffd867ecfd4caceeba540fd731f25f8306
5687ffec66b5493c59e550b16afc2535523b2f02
refs/heads/master
2021-09-11T23:36:39.685910
2018-04-13T04:00:27
2018-04-13T04:00:27
60,140,932
0
0
null
null
null
null
UTF-8
Java
false
false
2,771
java
package com.myweb.dao.impl; import com.myweb.dao.FrameWorkDao; import com.myweb.dao.mybatis.MyFrameWorkMapper; import com.myweb.dao.mybatis.mapper.*; import com.myweb.pojo.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import java.util.List; @Repository("frameWorkDao") public class FrameWorkDaoImpl implements FrameWorkDao { @Autowired private UserMapper userMapper; @Autowired private TableinfoMapper tableinfoMapper; @Autowired private ShuxingMapper shuxingMapper; @Autowired private LaorenMapper laorenMapper; @Autowired private CaijiMapper caijiMapper; @Autowired private FuwuMapper fuwuMapper; @Autowired private MyFrameWorkMapper myFrameWorkMapper; @Override public List<User> findUsersByUsernameAndPassword(String username, String password) { UserExample userExample = new UserExample(); userExample.createCriteria().andUsernameEqualTo(username).andPasswordEqualTo(password); return userMapper.selectByExample(userExample); } @Override public List<Menu> findMenusByParentAndShuxin(int parent, int shuxin) { MenuExample menuExample = new MenuExample(); menuExample.createCriteria().andParentEqualTo(parent); return myFrameWorkMapper.queryByParentAndRole(parent, shuxin); } @Override public long totalLaoren() { return laorenMapper.countByExample(null); } @Override public long totalCaiji() { return caijiMapper.countByExample(null); } @Override public long totalFuwu(String fuwutype) { FuwuExample fuwuExample = new FuwuExample(); fuwuExample.createCriteria().andFuwutypeEqualTo(fuwutype); return fuwuMapper.countByExample(fuwuExample); } @Override public List<Tableinfo> findTableinfosByDisable(String tablename, Integer tabledisable, Integer modaldisable) { TableinfoExample tableinfoExample = new TableinfoExample(); if(tabledisable != null && tabledisable == 0){ tableinfoExample.createCriteria().andTablenameEqualTo(tablename).andTabledisableEqualTo("0"); }else{ tableinfoExample.createCriteria().andTablenameEqualTo(tablename).andModaldisableEqualTo("1"); } tableinfoExample.setOrderByClause("shunxu"); return tableinfoMapper.selectByExample(tableinfoExample); } @Override public List<Shuxing> findShuxingsByName(String name) { ShuxingExample shuxingExample = new ShuxingExample(); shuxingExample.createCriteria().andNameEqualTo(name); shuxingExample.setOrderByClause("shunxu"); return shuxingMapper.selectByExample(shuxingExample); } }
[ "wangyongst@gmail.com" ]
wangyongst@gmail.com
0cb08ef1822928259c2808b60905fe3eaa9bd063
408fa67e9d4a425f164da274ed7dd65e3ae155ca
/spring-boot/002-properties-value/src/test/java/com/git/hui/boot/test/PropertyPlaceHolderHelperTest.java
b381df452849cc7b0587c5994f85be04a99cc0b2
[ "Apache-2.0" ]
permissive
liuyueyi/spring-boot-demo
c7d1c73135d998b366c793ab05ce5fed295cc32a
8960892da18cc3aa3f32b131d6d524d13bbec6fa
refs/heads/master
2023-08-30T22:52:04.738407
2023-08-16T14:50:02
2023-08-16T14:50:02
149,739,805
584
328
Apache-2.0
2023-04-29T12:52:28
2018-09-21T09:14:27
Java
UTF-8
Java
false
false
2,800
java
package com.git.hui.boot.test; import javafx.scene.control.TextFormatter; import javafx.util.StringConverter; import org.apache.commons.lang.text.ExtendedMessageFormat; import org.junit.Test; import org.slf4j.helpers.FormattingTuple; import org.slf4j.helpers.MessageFormatter; import org.springframework.boot.test.json.GsonTester; import org.springframework.util.PropertyPlaceholderHelper; import java.text.MessageFormat; import java.util.HashMap; import java.util.Map; /** * @author yihui * @date 2021/6/8 */ public class PropertyPlaceHolderHelperTest { @Test public void testPropertyHolderHelper() { PropertyPlaceholderHelper propertyPlaceholderHelper = new PropertyPlaceholderHelper("${", "}", ":", true); String template = "hello ${demo.dd:123} world!"; Map<String, String> map = new HashMap<>(); map.put("demo.dd", "value"); String ans = propertyPlaceholderHelper.replacePlaceholders(template, map::get); System.out.println(ans); template = "hello ${demo.dd::} world!"; ans = propertyPlaceholderHelper.replacePlaceholders(template, map::get); System.out.println(ans); template = "hello ${demo.dd:: world!"; ans = propertyPlaceholderHelper.replacePlaceholders(template, map::get); System.out.println(ans); template = "hello ${demo.cc} world!"; ans = propertyPlaceholderHelper.replacePlaceholders(template, map::get); System.out.println(ans); template = "hello ${demo.dd: ${demo.dd} world!"; ans = propertyPlaceholderHelper.replacePlaceholders(template, map::get); System.out.println(ans); template = "hello ${demo.dd: ${demo.dd}} world!"; ans = propertyPlaceholderHelper.replacePlaceholders(template, map::get); System.out.println(ans); } @Test public void testReplace() { // jdk 占位替换 String msg = "{0}{1}{2}{3}{4}{5}{6}{7}{8}"; Object[] array = new Object[]{"A", "B", "C", "D", "E", "F", "G", "H", "I",}; String value = MessageFormat.format(msg, array); System.out.println(value); // 格式化字符串时,两个单引号才表示一个单引号,单个单引号会被省略,除非中文单引号不会被省略 String out = MessageFormat.format("hello ''{0}''!", "hhui.top"); System.out.println(out); // 单引号会使其后面的占位符均失效,导致直接输出占位符 System.out.println(MessageFormat.format("hello '{0}", "hhui.top")); } @Test public void testReplaceV2() { // slf4j 日志占位替换 FormattingTuple tupple = MessageFormatter.format("hello {}, there is something wrong", "world"); System.out.println(tupple.getMessage()); } }
[ "bangzewu@126.com" ]
bangzewu@126.com
213864850f8eb6c5b2e5fe1fc6b7f26a85c13d66
5e40ce227d5a952d862db650f5c1505032fa535f
/jackknife-av/src/main/java/com/lwh/jackknife/av/util/EffectUtils.java
ef3817acc983a0acbfe22156a905ceea910942e0
[ "Apache-2.0" ]
permissive
wolfking0608/jackknife
d3095ecb5fae2d8d15947d6ccea11454ec993772
3423bf374360c6372920bc094f3327b8a6a7f62e
refs/heads/master
2020-06-25T22:10:24.896433
2019-07-29T08:10:38
2019-07-29T08:10:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
983
java
package com.lwh.jackknife.av.util; public class EffectUtils { /** * 音效的类型:正常。 */ public static final int MODE_NORMAL = 0x0; /** * 音效的类型:萝莉。 */ public static final int MODE_LUOLI = 0x1; /** * 音效的类型:大叔。 */ public static final int MODE_DASHU = 0x2; /** * 音效的类型:惊悚。 */ public static final int MODE_JINGSONG = 0x3; /** * 音效的类型:搞怪。 */ public static final int MODE_GAOGUAI = 0x4; /** * 音效的类型:空灵。 */ public static final int MODE_KONGLING = 0x5; /** * 音效处理。 * * @param path 需要变声的原音频文件 * @param type 音效的类型 */ public native static void fix(String path, int type); static { System.loadLibrary("fmodL"); System.loadLibrary("fmod"); System.loadLibrary("jknfav"); } }
[ "924666990@qq.com" ]
924666990@qq.com
59bdf72d599e2a26f7c3bb126208ea2cda4952e2
407bb1881304b90d8403076365427f05a1a17d1b
/ml4j-nn-api/src/main/java/org/ml4j/nn/NeuralNetwork.java
49fbff87148da8e9a988e09822d22692277b906f
[ "Apache-2.0" ]
permissive
ml4jarchive/ml4j-api
a00f59f184a5c5de3138a8a2af4e77779e64e40d
cbd2db2fcde5d6f9ea87d133eb2c57df8066a241
refs/heads/master
2023-05-07T22:19:01.370953
2020-02-20T12:54:07
2020-02-20T12:54:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
990
java
/* * Copyright 2017 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.ml4j.nn; import java.io.Serializable; /** * Base interface for classes representing a NeuralNetwork. * * @author Michael Lavelle * * @param <C> The NeuralNetworkContext used with this NeuralNetwork * @param <N> The type of NeuralNetwork */ public interface NeuralNetwork<C extends NeuralNetworkContext, N extends NeuralNetwork<C, N>> extends Serializable { }
[ "michael@lavelle.name" ]
michael@lavelle.name
bfdf3e7a44b4295ae80557f6fbf8e5fdad8828c8
23264a7b2651158a7e9866c2960abc36b6540aa4
/src/main/java/com/liuyanzhao/forum/entity/Comment.java
c25881017820981a044998f6d5b2577928f322a1
[]
no_license
hyydouble/codergroup
91e57d2f2c042504bc94d7f518d72b36af55e961
1828a48496193d3ee23e8ad542cf1e9354cad4fc
refs/heads/master
2022-11-12T07:05:51.222164
2020-07-13T03:42:25
2020-07-13T03:42:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,953
java
package com.liuyanzhao.forum.entity; import com.liuyanzhao.forum.util.DateUtil; import lombok.Data; import org.hibernate.validator.constraints.NotEmpty; import javax.persistence.*; import javax.validation.constraints.Pattern; import javax.validation.constraints.Size; import java.io.Serializable; import java.sql.Timestamp; import java.util.List; import java.util.Objects; /** * @author 言曌 * @date 2018/3/19 下午9:54 */ @Entity(name = "comment") @Data public class Comment implements Serializable { private static final long serialVersionUID = -4502134548520740266L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) // 自增长策略 private Long id; @Column(name = "pid") private Long pid;//父分类 @NotEmpty(message = "评论内容不能为空") @Size(max = 10000, message = "评论内容不能多于500个字符") @Column(nullable = false) private String content; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "user_id") private User user; private Integer floor;//楼层 @Column(name = "is_sticky") private Integer isSticky = 0;//置顶状态,0表示不置顶,1置顶 @org.hibernate.annotations.CreationTimestamp // 由数据库自动创建时间 @Column(name = "create_time") private Timestamp createTime; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "article_id") private Article article;//所属文章 //这里要把数据库的外键删除 @OneToMany(cascade = {CascadeType.DETACH}, fetch = FetchType.LAZY) @JoinColumn(name = "pid", referencedColumnName = "id") @OrderBy("id") private List<Comment> commentList; @JoinColumn(name = "reply_user_id") @OneToOne(fetch = FetchType.LAZY) private User replyUser; //赞的数量 @Column(name = "zan_size") private Integer zanSize = 0; //踩的数量 @Column(name = "cai_size") private Integer caiSize = 0; @Pattern(regexp = "publish|draft|private|deleted") @Column(name = "status") private String status = "publish"; @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY) @JoinTable(name = "comment_zan", joinColumns = @JoinColumn(name = "comment_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "zan_id", referencedColumnName = "id")) private List<Zan> zanList; public List<Zan> getZanList() { return zanList; } public void setZanList(List<Zan> zanList) { this.zanList = zanList; this.zanSize = this.zanList.size(); } /** * 点赞 * * @param zan * @return */ public boolean addZan(Zan zan) { boolean isExist = false; // 判断重复 for (int index = 0; index < this.zanList.size(); index++) { if (Objects.equals(this.zanList.get(index).getUser().getId(), zan.getUser().getId())) { isExist = true; this.zanList.remove(index); break; } } if (!isExist) { this.zanList.add(zan); } this.zanSize = this.zanList.size(); return isExist; } /** * 取消点赞 * * @param zanId */ public void removeZan(Long zanId) { for (int index = 0; index < this.zanList.size(); index++) { if (Objects.equals(this.zanList.get(index).getId(), zanId)) { this.zanList.remove(index); break; } } this.zanSize = this.zanList.size(); } @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY) @JoinTable(name = "comment_cai", joinColumns = @JoinColumn(name = "comment_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "cai_id", referencedColumnName = "id")) private List<Cai> caiList; public List<Cai> getCaiList() { return caiList; } public void setCaiList(List<Cai> caiList) { this.caiList = caiList; this.caiSize = this.caiList.size(); } /** * 点踩 * * @param cai * @return */ public boolean addCai(Cai cai) { boolean isExist = false; // 判断重复 for (int index = 0; index < this.caiList.size(); index++) { if (Objects.equals(this.caiList.get(index).getUser().getId(), cai.getUser().getId())) { isExist = true; this.caiList.remove(index); break; } } if (!isExist) { this.caiList.add(cai); } this.caiSize = this.caiList.size(); return isExist; } /** * 取消点踩 * * @param zanId */ public void removeCai(Long zanId) { for (int index = 0; index < this.caiList.size(); index++) { if (Objects.equals(this.caiList.get(index).getId(), zanId)) { this.caiList.remove(index); break; } } this.caiSize = this.caiList.size(); } @Transient public String easyCreateTime; public String getEasyCreateTime() { if (getCreateTime() == null) { return null; } return DateUtil.getRelativeDate(getCreateTime()); } public Comment() { } public Comment(User user, Article article, String content) { this.article = article; this.content = content; this.user = user; } public Comment(User user, Article article, Long pid, String content) { this.user = user; this.article = article; this.pid = pid; this.content = content; } @Override public String toString() { return "Comment{" + "id=" + id + ", pid=" + pid + ", content='" + content + '\'' + ", createTime=" + createTime + '}'; } }
[ "847064370@qq.com" ]
847064370@qq.com
8bb07a4f2d39d896a35a58bcd356b443fd33fcd4
b9852e928c537ce2e93aa7e378689e5214696ca5
/hse-main-phone-app/src/main/java/com/hd/hse/main/phone/ui/activity/adapter/MyListViewAdapter.java
d5e716c13a4f76cf2498ab57669f23ad797038bb
[]
no_license
zhanshen1373/Hseuse
bc701c6de7fd88753caced249032f22d2ca39f32
110f9d1a8db37d5b0ea348069facab8699e251f1
refs/heads/master
2023-04-04T08:27:10.675691
2021-03-29T07:44:02
2021-03-29T07:44:02
352,548,680
0
2
null
null
null
null
UTF-8
Java
false
false
1,452
java
package com.hd.hse.main.phone.ui.activity.adapter; import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; import com.hd.hse.main.phone.R; import java.util.List; /** * Created by dubojian on 2017/10/16. */ public class MyListViewAdapter extends BaseAdapter { private List<String> data; private Context mContext; public MyListViewAdapter(Context mContext,List<String> data) { this.data = data; this.mContext = mContext; } @Override public int getCount() { return data.size(); } @Override public Object getItem(int position) { return data.get(position); } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHold vh = null; if (convertView == null) { vh = new ViewHold(); convertView = View.inflate(mContext, R.layout.worker_message_notify, null); vh.tv = (TextView) convertView.findViewById(R.id.worker_messagenotify_content); convertView.setTag(vh); } else { vh = (ViewHold) convertView.getTag(); } vh.tv.setText("\t\t\t\t"+data.get(position)); return convertView; } static class ViewHold{ TextView tv; } }
[ "dubojian@ushayden.com" ]
dubojian@ushayden.com
991015aace462c45bfc9ca9d2c7bd595ca400016
0606cf494e12067367580095addd4ebf6281a53a
/app/src/main/java/com/ace/member/start/StartActivity.java
9656fdac1f192e27382ed3c6421ab3c7999ee602
[]
no_license
kothsada/ace_member_android
d870d4a32e4e1cb669ee95f33fd0df0f4c60629c
f256216f8e5c49d2b00db0a39eecab6ed68a3257
refs/heads/master
2022-04-18T16:20:07.548800
2020-04-18T16:07:05
2020-04-18T16:07:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,431
java
package com.ace.member.start; import android.app.Dialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.FragmentTransaction; import android.view.View; import android.widget.TextView; import com.ace.member.BuildConfig; import com.ace.member.R; import com.ace.member.base.BaseActivity; import com.ace.member.gesture_unlock.UnlockActivity; import com.ace.member.login.LoginActivity; import com.ace.member.main.MainActivity; import com.ace.member.utils.AppGlobal; import com.ace.member.utils.Session; import com.og.LibSession; import com.og.event.MessageEvent; import com.og.update.UpdateChecker; import com.og.utils.*; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; import java.util.HashMap; import java.util.Map; import javax.inject.Inject; import butterknife.BindView; public class StartActivity extends BaseActivity implements StartContract.StartView { public static final int ACTION_TYPE_1_START = 1; @Inject StartPresenter mStartPresenter; @BindView(R.id.tv_version) TextView mVersion; private UpdateChecker mUpdateChecker = new UpdateChecker(); private boolean mIsLogin = true; private boolean isFirst = true; private String mFingerprintPhone; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (!isTaskRoot()) { finish(); return; } PERMISSIONS = new String[]{android.Manifest.permission.READ_PHONE_STATE, android.Manifest.permission.WRITE_EXTERNAL_STORAGE}; DaggerStartComponent.builder().startPresenterModule(new StartPresenterModule(this, this)).build().inject(this); } @Override protected int getContentViewID() { return R.layout.activity_start; } //指纹的登录失败处理 protected void loginFail() { showLogin(); } @Override protected void onResume() { super.onResume(); if (mPermissionsChecker.lacksPermissions(PERMISSIONS)) { setPermissions(); } else { if (isFirst) { initActivity(); } } } @Override protected void onStop() { super.onStop(); isFirst = false; } @Subscribe(threadMode = ThreadMode.MAIN) public void onMessageEvent(MessageEvent messageEvent) { mStartPresenter.onMessageEvent(messageEvent); } protected void initActivity() { super.initActivity(); mStartPresenter.start(); } @Override public void setVersion(String version) { version = getString(R.string.member_system) + " " + version; mVersion.setText(version); } @Override public void superMessageEvent(MessageEvent messageEvent) { super.onMessageEvent(messageEvent); } @Override public void showBlock(String msg) { DialogFactory.block(StartActivity.this, msg); } @Override public void showCheckForDialog() { mUpdateChecker.checkForDialog(StartActivity.this, BuildConfig.UPGRADE_URL); } @Override public void showVersionNotSupported() { findViewById(R.id.tvVersionNotSupported).setVisibility(View.VISIBLE); } @Override public void hideVersionNotSupported() { findViewById(R.id.tvVersionNotSupported).setVisibility(View.GONE); } @Override public boolean getIsLogin() { return mIsLogin; } @Override public void setIsLogin(boolean isLogin) { mIsLogin = isLogin; } @Override public String getGesture() { return mPreferencesUser.getString(AppGlobal.PREFERENCES_GESTURE_USER, ""); } @Override public void showUnlock() { Intent intent = new Intent(StartActivity.this, UnlockActivity.class); intent.putExtra("action_type", ACTION_TYPE_1_START); startActivity(intent); finish(); } @Override public void showFingerprintDialog(final String phone) { final FingerprintDialog dialog = FingerprintDialog.newInstance(this); mFingerprintPhone = phone; dialog.setCancelable(false); FragmentTransaction content = getSupportFragmentManager().beginTransaction(); content.add(dialog, null).commitAllowingStateLoss(); //dialog.show(getSupportFragmentManager(),"dialog"); dialog.startAuth(new FingerprintDialog.PartAuthResult() { @Override public void cancelFingerprint() { dialog.dismiss(); mStartPresenter.notFingerprintLogin(getGesture()); //清除记录登录账号 mPreferencesUser.edit().putString(AppGlobal.LOGIN_USER_PHONE, "").apply(); finish(); } @Override public void authSuccess() { dialog.dismiss(); Map<String, String> p = new HashMap<>(); Session.deviceID = Utils.getDeviceID(mContext); p.put("phone", phone); p.put("password", ""); p.put("version_name", LibSession.sVersionName); p.put("device_id", Session.deviceID); p.put("is_device", Session.isSessionTimeOut + ""); p.put("use_fingerprint", "true"); mStartPresenter.login(p); } @Override public void authFail() { dialog.dismiss(); mStartPresenter.notFingerprintLogin(getGesture()); finish(); } }); } //密码验证成功后的异地登录弹窗 public void showPrompt() { Dialog mDialog = new CustomDialog.Builder(mContext).setMessage(R.string.login_again2).setIcon(R.drawable.ic_warining).setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); mStartPresenter.clearDeviceID(mFingerprintPhone); } }).setNegativeButton(R.string.no, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); System.exit(0); } }).create(); mDialog.setCancelable(false); mDialog.show(); } public void setAgainLogin() { try { Map<String, String> p = new HashMap<>(); Session.deviceID = Utils.getDeviceID(mContext); p.put("phone", mFingerprintPhone); p.put("password", ""); p.put("version_name", LibSession.sVersionName); p.put("device_id", Session.deviceID); p.put("is_device", Session.isSessionTimeOut + ""); p.put("use_fingerprint", "true"); mStartPresenter.login(p); } catch (Exception e) { FileUtils.addErrorLog(e); } } @Override public void toMainActivity() { Intent it = new Intent(this, MainActivity.class); startActivity(it); finish(); } @Override public void showLogin() { Intent intent = new Intent(StartActivity.this, LoginActivity.class); startActivity(intent); finish(); } @Override public void finishSelf() { finish(); } }
[ "771613512@qq.com" ]
771613512@qq.com
c79ce926cc81cb5cd3822887ddea26220d38a6bf
a10543f3d7106dc324c4f4d8ed032a8a416ab895
/src/main/java/com/alibaba/sdk/android/dpa/util/DpaReschedulableTimer.java
2aad8e8138cbeb4ec6225b8d2266ba4555419762
[]
no_license
whywuzeng/jingmgouproject
32bfa45339700419842df772b91a2c178dcf0e23
0a6d1b9d33f7dca653f199181446b2a2ba8a07a4
refs/heads/master
2022-07-15T21:32:28.100332
2022-06-24T10:12:28
2022-06-24T10:12:28
81,888,796
1
4
null
null
null
null
UTF-8
Java
false
false
1,105
java
package com.alibaba.sdk.android.dpa.util; import java.util.Timer; import java.util.TimerTask; public class DpaReschedulableTimer extends Timer { private Runnable task; private Timer timer = new Timer(); private TimerTask timerTask; public void reschedule(long paramLong) { this.timerTask.cancel(); this.timerTask = new TimerTask() { public void run() { DpaReschedulableTimer.this.task.run(); } }; this.timer.schedule(this.timerTask, paramLong); } public void schedule(Runnable paramRunnable, long paramLong) { if (this.task != null) { reschedule(paramLong); return; } this.task = paramRunnable; this.timerTask = new TimerTask() { public void run() { DpaReschedulableTimer.this.task.run(); } }; this.timer.schedule(this.timerTask, paramLong); } } /* Location: F:\一周备份\面试apk\希望代码没混淆\jingmgou\jingmgou2\classes-dex2jar.jar * Qualified Name: com.alibaba.sdk.android.dpa.util.DpaReschedulableTimer * JD-Core Version: 0.6.2 */
[ "jiushiqiangone@sina.com" ]
jiushiqiangone@sina.com
0eb9bc5f0229aa5da3f0ab89fa7aba89d680476c
d2eee6e9a3ad0b3fd2899c3d1cf94778615b10cb
/PROMISE/archives/synapse/1.2/org/apache/synapse/mediators/annotations/Execute.java
66497f2551d19b3a7e4b9d52b982f51444abc37f
[]
no_license
hvdthong/DEFECT_PREDICTION
78b8e98c0be3db86ffaed432722b0b8c61523ab2
76a61c69be0e2082faa3f19efd76a99f56a32858
refs/heads/master
2021-01-20T05:19:00.927723
2018-07-10T03:38:14
2018-07-10T03:38:14
89,766,606
5
1
null
null
null
null
UTF-8
Java
false
false
312
java
package org.apache.synapse.mediators.annotations; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Retention; import java.lang.annotation.Target; @Target({METHOD}) @Retention(RUNTIME) public @interface Execute { }
[ "hvdthong@github.com" ]
hvdthong@github.com
1a891245d8b261389d45bfc46a8e98cf6dbd8c58
c5d44808c7f58b4eb621e8ef9105a201d08be44a
/projects/repository/source/java/org/alfresco/repo/forum/CommentServiceImpl.java
07fa8bedbc880e2a8b122cecbc2fbcbdc28f3c76
[]
no_license
poenneby/gigfork
eacf3218067f7bcb7a49401d25e1c2a7811353c1
109a1f01a5de710a37d499157cf1353d5ccc00c2
refs/heads/master
2020-12-24T13:21:54.169796
2012-04-16T14:52:53
2012-04-16T14:52:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,677
java
/* * Copyright (C) 2005-2011 Alfresco Software Limited. * * This file is part of Alfresco * * Alfresco 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 3 of the License, or * (at your option) any later version. * * Alfresco 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 Alfresco. If not, see <http://www.gnu.org/licenses/>. */ package org.alfresco.repo.forum; import java.util.List; import org.alfresco.model.ContentModel; import org.alfresco.model.ForumModel; import org.alfresco.service.cmr.repository.ChildAssociationRef; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeService; import org.alfresco.service.namespace.NamespaceService; import org.alfresco.service.namespace.QName; /** * @author Neil Mc Erlean * @since 4.0 */ public class CommentServiceImpl implements CommentService { /** * Naming convention for Share comment model. fm:forum contains fm:topic */ private static final QName FORUM_TO_TOPIC_ASSOC_QNAME = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "Comments"); // Injected services private NodeService nodeService; public void setNodeService(NodeService nodeService) { this.nodeService = nodeService; } @Override public NodeRef getDiscussableAncestor(NodeRef descendantNodeRef) { // For "Share comments" i.e. fm:post nodes created via the Share commenting UI, the containment structure is as follows: // fm:discussable // - fm:forum // - fm:topic // - fm:post // For other fm:post nodes the ancestor structure may be slightly different. (cf. Share discussions, which don't have 'forum') // // In order to ensure that we only return the discussable ancestor relevant to Share comments, we'll climb the // containment tree in a controlled manner. // We could navigate up looking for the first fm:discussable ancestor, but that might not find the correct node - it could, // for example, find a parent folder which was discussable. NodeRef result = null; if (nodeService.getType(descendantNodeRef).equals(ForumModel.TYPE_POST)) { NodeRef topicNode = nodeService.getPrimaryParent(descendantNodeRef).getParentRef(); if (nodeService.getType(topicNode).equals(ForumModel.TYPE_TOPIC)) { NodeRef forumNode = nodeService.getPrimaryParent(topicNode).getParentRef(); if (nodeService.getType(forumNode).equals(ForumModel.TYPE_FORUM)) { NodeRef discussableNode = nodeService.getPrimaryParent(forumNode).getParentRef(); if (nodeService.hasAspect(discussableNode, ForumModel.ASPECT_DISCUSSABLE)) { result = discussableNode; } } } } return result; } @Override public NodeRef getShareCommentsTopic(NodeRef discussableNode) { NodeRef result = null; if (nodeService.hasAspect(discussableNode, ForumModel.ASPECT_DISCUSSABLE)) { // We navigate down the "Share comments" containment model, which is based on the more general forum model, // but with certain naming conventions. List<ChildAssociationRef> fora = nodeService.getChildAssocs(discussableNode, ForumModel.ASSOC_DISCUSSION, ForumModel.ASSOC_DISCUSSION, true); // There should only be one such assoc. if ( !fora.isEmpty()) { final NodeRef firstForumNode = fora.get(0).getChildRef(); List<ChildAssociationRef> topics = nodeService.getChildAssocs(firstForumNode, ContentModel.ASSOC_CONTAINS, FORUM_TO_TOPIC_ASSOC_QNAME, true); // Likewise, only one. if ( !topics.isEmpty()) { final NodeRef firstTopicNode = topics.get(0).getChildRef(); result = firstTopicNode; } } } return result; } }
[ "me@gigfork.com" ]
me@gigfork.com
2c0028de317b44ba98c646ecb652fc6f1c91b2f1
ff6ce43c01e5db344fb4dd77821af379925b4be8
/src/main/java/com/PatientModule/PatientModule/Aop/TrackExecutionTime.java
578fa889e899d827fe46c07696defa8d4e080e92
[]
no_license
DineshJayaprakash/PatientModule
3eaf14d1a26210193677fb68aeb1b04d71b5a2ed
18b82dbe68c4a193fe1e4f93175eeec182cc0b2f
refs/heads/master
2023-02-16T20:39:01.876062
2021-01-11T05:57:13
2021-01-11T05:57:13
328,563,406
0
0
null
null
null
null
UTF-8
Java
false
false
498
java
package com.PatientModule.PatientModule.Aop; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * TrackExecutionTime * * @created By Dinesh J * @CreatedDate : 09/12 * @description used to track the execution time of all the method annotated with TrackExecutionTime */ @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface TrackExecutionTime { }
[ "=" ]
=
d03b0bd3f3a5c44304a832c478db911b028312a4
89547c6b85ef9dfad2e09f4c9af2e0a1ba9330d4
/iam-login-service/src/main/java/it/infn/mw/iam/authn/x509/IamX509PreauthenticationProcessingFilter.java
0bbda35cbe0ba9df4aa5c83958859b8265dd5248
[ "Apache-2.0" ]
permissive
indigo-iam/iam
dbb521ce3134c3f8f1e5ad14d9d1826f6c57fd88
59ce2cefc517e4b7a50ff33dbbe050f8286dd1db
refs/heads/master
2023-09-01T11:56:18.433093
2023-06-08T12:15:33
2023-06-08T12:15:33
53,593,420
95
48
NOASSERTION
2023-09-14T13:56:38
2016-03-10T15:02:53
Java
UTF-8
Java
false
false
4,770
java
/** * Copyright (c) Istituto Nazionale di Fisica Nucleare (INFN). 2016-2021 * * 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 it.infn.mw.iam.authn.x509; import java.io.IOException; import java.util.Optional; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.core.Authentication; import org.springframework.security.web.authentication.AuthenticationSuccessHandler; import org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter; public class IamX509PreauthenticationProcessingFilter extends AbstractPreAuthenticatedProcessingFilter { public static final Logger LOG = LoggerFactory.getLogger(IamX509PreauthenticationProcessingFilter.class); public static final String X509_CREDENTIAL_SESSION_KEY = "IAM_X509_CRED"; public static final String X509_ERROR_KEY = "IAM_X509_AUTHN_ERROR"; public static final String X509_CAN_LOGIN_KEY = "IAM_X509_CAN_LOGIN"; public static final String X509_AUTHN_REQUESTED_PARAM = "x509ClientAuth"; private final X509AuthenticationCredentialExtractor credentialExtractor; private final AuthenticationSuccessHandler successHandler; public IamX509PreauthenticationProcessingFilter(X509AuthenticationCredentialExtractor extractor, AuthenticationManager authenticationManager, AuthenticationSuccessHandler successHandler) { setCheckForPrincipalChanges(false); setAuthenticationManager(authenticationManager); this.credentialExtractor = extractor; this.successHandler = successHandler; } protected boolean x509AuthenticationRequested(HttpServletRequest request) { return (request.getParameter(X509_AUTHN_REQUESTED_PARAM) != null); } protected void storeCredentialInSession(HttpServletRequest request, IamX509AuthenticationCredential cred) { HttpSession session = request.getSession(false); if (session != null && !cred.failedVerification()) { LOG.debug("Storing X.509 {} credential in session ", cred); session.setAttribute(X509_CREDENTIAL_SESSION_KEY, cred); } } protected Optional<IamX509AuthenticationCredential> extractCredential( HttpServletRequest request) { Optional<IamX509AuthenticationCredential> credential = credentialExtractor.extractX509Credential(request); if (!credential.isPresent()) { LOG.debug("No X.509 client credential found in request"); } if (credential.isPresent() && credential.get().failedVerification()) { LOG.warn("X.509 client credential failed verification: {}", credential.get().verificationError()); return Optional.empty(); } credential.ifPresent(c -> storeCredentialInSession(request, c)); return credential; } protected void logX509CredentialInfo(IamX509AuthenticationCredential cred) { LOG.debug("Found valid X.509 credential in request with principal subject '{}'", cred.getSubject()); } @Override protected Object getPreAuthenticatedPrincipal(HttpServletRequest request) { Optional<IamX509AuthenticationCredential> credential = extractCredential(request); if (!credential.isPresent()) { return null; } credential.ifPresent(this::logX509CredentialInfo); return credential.get().getSubject(); } @Override protected Object getPreAuthenticatedCredentials(HttpServletRequest request) { return extractCredential(request).orElse(null); } @Override protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, Authentication authentication) { request.setAttribute(X509_CAN_LOGIN_KEY, Boolean.TRUE); if (x509AuthenticationRequested(request)) { try { super.successfulAuthentication(request, response, authentication); successHandler.onAuthenticationSuccess(request, response, authentication); } catch (IOException | ServletException e) { throw new X509AuthenticationError(e); } } } }
[ "andrea.ceccanti@gmail.com" ]
andrea.ceccanti@gmail.com
5e56444b26067f09279510ac278b4d07cba4cd3a
a901abdca092650e0eb277f04c988200796b1d7d
/aart-main/aart-web/src/main/java/edu/ku/cete/report/model/OrganizationManagementAuditDao.java
54e639e500b2e39b8c5c4196db382a787c5d2d51
[]
no_license
krishnamohankaruturi/secret
5acafbde49b9fa9e24f89534d14e7b01f863f775
4da83d113d3620d4c2c84002fecbe4bdd759c1a2
refs/heads/master
2022-03-24T22:09:41.325033
2019-11-15T12:14:07
2019-11-15T12:14:07
219,771,956
0
0
null
null
null
null
UTF-8
Java
false
false
652
java
package edu.ku.cete.report.model; import java.sql.Timestamp; import java.util.Date; import java.util.List; import java.util.Map; import org.apache.ibatis.annotations.Param; import edu.ku.cete.report.domain.OrganizationManagementAudit; public interface OrganizationManagementAuditDao { void insertManagementAudit(OrganizationManagementAudit organizationManagementAudit); List<OrganizationManagementAudit> getOrganizationManagementAuditHistory( @Param("startDateTimes")Date startDateTimes,@Param("endDateTimes")Date endDateTimes, @Param("filterValues") Map<String,String> filterValues,@Param("offset") int offset,@Param("limit") int limit); }
[ "Venkatakrishna.k@CTL.local" ]
Venkatakrishna.k@CTL.local
b5f8793d530bca697c4e46cfc12fa76beb8555e8
9a7ec216a1deeab63e5bf293381d06cf25419251
/batch13022014/core/new/InstanceFactoryMethod/src/com/ifm/test/IFMTest.java
0ab02c0d728c66cc7c3416cfa0aa515a043b4b5c
[]
no_license
Mallikarjun0535/Spring
63b2fb705af3477402639557dbda1378fe20b538
041f538c7ae2eca113df7cb9277e438ec6221c08
refs/heads/master
2020-06-04T00:22:21.910592
2019-06-20T19:18:09
2019-06-20T19:18:09
191,792,835
0
0
null
null
null
null
UTF-8
Java
false
false
542
java
package com.ifm.test; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.xml.XmlBeanFactory; import org.springframework.core.io.ClassPathResource; import com.ifm.beans.GoogleMapRenderer; public class IFMTest { public static void main(String[] args) { BeanFactory factory = new XmlBeanFactory(new ClassPathResource( "com/ifm/common/application-context.xml")); GoogleMapRenderer gmr = factory.getBean("googleMapRenderer", GoogleMapRenderer.class); gmr.render("src1", "dest1"); } }
[ "mallik.mitta@outlook.com" ]
mallik.mitta@outlook.com
36e4ccaeea5735ae016f846a11468796a2b267ab
21bcd1da03415fec0a4f3fa7287f250df1d14051
/sources/p195e/p196a/p199x0/p463g/C13707s.java
bb85519b05bbc608f95181df72ac7dd26d31f900
[]
no_license
lestseeandtest/Delivery
9a5cc96bd6bd2316a535271ec9ca3865080c3ec8
bc3fae8f30804a2520e6699df92c2e6a4a0a7cfc
refs/heads/master
2022-04-24T12:14:22.396398
2020-04-25T21:50:29
2020-04-25T21:50:29
258,875,870
0
1
null
null
null
null
UTF-8
Java
false
false
6,170
java
package p195e.p196a.p199x0.p463g; import java.util.concurrent.PriorityBlockingQueue; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import p195e.p196a.C12282j0; import p195e.p196a.C12282j0.C12285c; import p195e.p196a.p198t0.C5937f; import p195e.p196a.p199x0.p450a.C12348e; import p195e.p196a.p199x0.p451b.C12390b; import p195e.p196a.p439b1.C12205a; import p195e.p196a.p447u0.C12314c; import p195e.p196a.p447u0.C12315d; /* renamed from: e.a.x0.g.s */ /* compiled from: TrampolineScheduler */ public final class C13707s extends C12282j0 { /* renamed from: b */ private static final C13707s f39655b = new C13707s(); /* renamed from: e.a.x0.g.s$a */ /* compiled from: TrampolineScheduler */ static final class C13708a implements Runnable { /* renamed from: N */ private final long f39656N; /* renamed from: a */ private final Runnable f39657a; /* renamed from: b */ private final C13710c f39658b; C13708a(Runnable runnable, C13710c cVar, long j) { this.f39657a = runnable; this.f39658b = cVar; this.f39656N = j; } public void run() { if (!this.f39658b.f39664O) { long a = this.f39658b.mo41875a(TimeUnit.MILLISECONDS); long j = this.f39656N; if (j > a) { try { Thread.sleep(j - a); } catch (InterruptedException e) { Thread.currentThread().interrupt(); C12205a.m54894b((Throwable) e); return; } } if (!this.f39658b.f39664O) { this.f39657a.run(); } } } } /* renamed from: e.a.x0.g.s$b */ /* compiled from: TrampolineScheduler */ static final class C13709b implements Comparable<C13709b> { /* renamed from: N */ final int f39659N; /* renamed from: O */ volatile boolean f39660O; /* renamed from: a */ final Runnable f39661a; /* renamed from: b */ final long f39662b; C13709b(Runnable runnable, Long l, int i) { this.f39661a = runnable; this.f39662b = l.longValue(); this.f39659N = i; } /* renamed from: a */ public int compareTo(C13709b bVar) { int a = C12390b.m55559a(this.f39662b, bVar.f39662b); return a == 0 ? C12390b.m55557a(this.f39659N, bVar.f39659N) : a; } } /* renamed from: e.a.x0.g.s$c */ /* compiled from: TrampolineScheduler */ static final class C13710c extends C12285c implements C12314c { /* renamed from: N */ final AtomicInteger f39663N = new AtomicInteger(); /* renamed from: O */ volatile boolean f39664O; /* renamed from: a */ final PriorityBlockingQueue<C13709b> f39665a = new PriorityBlockingQueue<>(); /* renamed from: b */ private final AtomicInteger f39666b = new AtomicInteger(); /* renamed from: e.a.x0.g.s$c$a */ /* compiled from: TrampolineScheduler */ final class C13711a implements Runnable { /* renamed from: a */ final C13709b f39667a; C13711a(C13709b bVar) { this.f39667a = bVar; } public void run() { C13709b bVar = this.f39667a; bVar.f39660O = true; C13710c.this.f39665a.remove(bVar); } } C13710c() { } @C5937f /* renamed from: a */ public C12314c mo41876a(@C5937f Runnable runnable) { return mo43082a(runnable, mo41875a(TimeUnit.MILLISECONDS)); } /* renamed from: d */ public boolean mo41878d() { return this.f39664O; } public void dispose() { this.f39664O = true; } @C5937f /* renamed from: a */ public C12314c mo41877a(@C5937f Runnable runnable, long j, @C5937f TimeUnit timeUnit) { long a = mo41875a(TimeUnit.MILLISECONDS) + timeUnit.toMillis(j); return mo43082a(new C13708a(runnable, this, a), a); } /* access modifiers changed from: 0000 */ /* renamed from: a */ public C12314c mo43082a(Runnable runnable, long j) { if (this.f39664O) { return C12348e.INSTANCE; } C13709b bVar = new C13709b(runnable, Long.valueOf(j), this.f39663N.incrementAndGet()); this.f39665a.add(bVar); if (this.f39666b.getAndIncrement() != 0) { return C12315d.m55416a((Runnable) new C13711a(bVar)); } int i = 1; while (!this.f39664O) { C13709b bVar2 = (C13709b) this.f39665a.poll(); if (bVar2 == null) { i = this.f39666b.addAndGet(-i); if (i == 0) { return C12348e.INSTANCE; } } else if (!bVar2.f39660O) { bVar2.f39661a.run(); } } this.f39665a.clear(); return C12348e.INSTANCE; } } C13707s() { } /* renamed from: f */ public static C13707s m58559f() { return f39655b; } @C5937f /* renamed from: a */ public C12285c mo41871a() { return new C13710c(); } @C5937f /* renamed from: a */ public C12314c mo42021a(@C5937f Runnable runnable) { C12205a.m54881a(runnable).run(); return C12348e.INSTANCE; } @C5937f /* renamed from: a */ public C12314c mo42023a(@C5937f Runnable runnable, long j, TimeUnit timeUnit) { try { timeUnit.sleep(j); C12205a.m54881a(runnable).run(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); C12205a.m54894b((Throwable) e); } return C12348e.INSTANCE; } }
[ "zsolimana@uaedomain.local" ]
zsolimana@uaedomain.local
065940c8fad629312eb0fefddcfdd471b751a553
18d44967684db4763b18edc4744b7acef6c5ecf7
/src/main/java/net/andreinc/jbvext/annotations/misc/validators/OneOfStringsValidator.java
440f964d93e85558a641a2307e451c091b498a3b
[ "Apache-2.0" ]
permissive
fulj/java-bean-validation-extension
e5891286de6b08d8ce6bd41e2fe33babe911d169
a72417329f76dc888b6d65d8611c5e2fe4fab66c
refs/heads/master
2020-09-21T15:28:25.610420
2019-11-29T10:33:47
2019-11-29T10:33:47
224,831,398
0
0
Apache-2.0
2019-11-29T10:25:30
2019-11-29T10:25:29
null
UTF-8
Java
false
false
486
java
package net.andreinc.jbvext.annotations.misc.validators; import net.andreinc.jbvext.annotations.misc.OneOfStrings; import org.apache.commons.lang3.StringUtils; import javax.validation.ConstraintValidatorContext; public class OneOfStringsValidator extends OneOfValidator<OneOfStrings, String> { @Override public boolean isValid(String value, ConstraintValidatorContext context) { return super.isValid(value, annotation.value(), StringUtils::equals, context); } }
[ "andreinicolinciobanu@deloitte.co.uk" ]
andreinicolinciobanu@deloitte.co.uk
40ed2a313a6d570cef92fdf395fca39704ff1256
3bb9e1a187cb72e2620a40aa208bf94e5cee46f5
/mobile_catalog/src/ong/eu/soon/mobile/client/model/PossibleValue.java
113c0ce5c0e588308543aa94a69bbe24478e0cb8
[]
no_license
eusoon/Mobile-Catalog
2e6f766864ea25f659f87548559502358ac5466c
869d7588447117b751fcd1387cd84be0bd66ef26
refs/heads/master
2021-01-22T23:49:12.717052
2013-12-10T08:22:20
2013-12-10T08:22:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,786
java
/* This file is part of Cyclos (www.cyclos.org). A project of the Social Trade Organisation (www.socialtrade.org). Cyclos 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. Cyclos 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 Cyclos; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package ong.eu.soon.mobile.client.model; import ong.eu.soon.mobile.client.InfoproMobile; /** * Overlay type for custom possible values */ public class PossibleValue extends Entity { protected PossibleValue() { } public final native String getValue() /*-{ return $wnd.cleanString(this.value); }-*/; public final native Long getParentId() /*-{ var val = $wnd.cleanString(this.parentId); return $wnd.isNumeric(val) ? @java.lang.Long::valueOf(Ljava/lang/String;)(val) : null; }-*/; public final boolean isDefault() { if(InfoproMobile.get().getGeneralData().getApplicationVersion().equals("3.7")) { ensureDefault(); } return isDefaultNative(); } private final native boolean isDefaultNative() /*-{ return this.defaultValue; }-*/; private final boolean ensureDefault() { return false; } }
[ "eusoon@gmail.com" ]
eusoon@gmail.com
5ac36e1223e465c23f1056bc309bdee26e54212a
b4b62c5c77ec817db61820ccc2fee348d1d7acc5
/src/main/java/com/alipay/api/domain/AlipayCreditAutofinanceVidGetModel.java
18ee55469455bcf065899430efc430a32f1e71a3
[ "Apache-2.0" ]
permissive
zhangpo/alipay-sdk-java-all
13f79e34d5f030ac2f4367a93e879e0e60f335f7
e69305d18fce0cc01d03ca52389f461527b25865
refs/heads/master
2022-11-04T20:47:21.777559
2020-06-15T08:31:02
2020-06-15T08:31:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,039
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 获取汽车金融核身使用的ID * * @author auto create * @since 1.0, 2016-10-17 16:44:36 */ public class AlipayCreditAutofinanceVidGetModel extends AlipayObject { private static final long serialVersionUID = 1691893952752439547L; /** * 机构编号 */ @ApiField("orgcode") private String orgcode; /** * 支付宝账号数字ID */ @ApiField("uid") private String uid; /** * 当前安装的支付宝钱包版本号 */ @ApiField("version") private String version; public String getOrgcode() { return this.orgcode; } public void setOrgcode(String orgcode) { this.orgcode = orgcode; } public String getUid() { return this.uid; } public void setUid(String uid) { this.uid = uid; } public String getVersion() { return this.version; } public void setVersion(String version) { this.version = version; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
387ffd3b0d0160f5a54656cfe4ce88c7b867fd73
e7e497b20442a4220296dea1550091a457df5a38
/main_project/socialgraph/friendsoffriends/src/main/java/com/renren/datamining/friendsoffriends/ReadFoFTableOneToAll.java
5badabfad77ff0dc0ef74b0ff37a29ba93463d67
[]
no_license
gunner14/old_rr_code
cf17a2dedf8dfcdcf441d49139adaadc770c0eea
bb047dc88fa7243ded61d840af0f8bad22d68dee
refs/heads/master
2021-01-17T18:23:28.154228
2013-12-02T23:45:33
2013-12-02T23:45:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,453
java
/************************************************************************************************** * Developer: Xiongjunwu * Email: junwu.xiong@renren-inc.com * Function: Write model final ranking values to fof table in HBase * Date: 2012-07-02 ********************************************************************************************************************* * HBase table format * rowkey columnfamily:quailfier:value * hostId f | fofId | fof value structure(unit: rank1|rank2(-1)|mutualfriendnumber|mutualFriendIds) *********************************************************************************************************************/ package com.renren.datamining.friendsoffriends; import java.io.IOException; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.OptionBuilder; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; import org.apache.commons.cli.PosixParser; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.client.HTable; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.io.ImmutableBytesWritable; import org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil; import org.apache.hadoop.hbase.mapreduce.TableMapper; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.lib.output.NullOutputFormat; import org.apache.hadoop.util.GenericOptionsParser; public class ReadFoFTableOneToAll { public static class ReadFoFTableMap extends TableMapper<Text, Text> { public static final long CountUnit = 100000; public static long mapperCount = 0; private HTable fofTable; protected void setup( org.apache.hadoop.mapreduce.Mapper<ImmutableBytesWritable, Result, Text, Text>.Context context) throws IOException, InterruptedException { fofTable = new HTable(context.getConfiguration(), context.getConfiguration().get("FOF_TABLE")); } protected void cleanup( org.apache.hadoop.mapreduce.Mapper<ImmutableBytesWritable, Result, Text, Text>.Context context) throws IOException, InterruptedException { fofTable.close(); } public void map(ImmutableBytesWritable row, Result values, Context context) { final int hostId = Bytes.toInt(row.get()); // System.out.print(" hostId " + hostId + " fofId " + fofId); int fofId = 0; float rank = 0.0F; int mutualFriendNumber = 0; int mutualFriendId = 0; for (KeyValue kv : values.raw()) { fofId = Bytes.toInt(kv.getQualifier()); rank = Bytes.toFloat(kv.getValue(), 0); // System.out.print(" hostId " + hostId + " fofId " + fofId + " rank " + rank); mutualFriendNumber = Bytes.toInt(kv.getValue(), 2 * Bytes.SIZEOF_INT, Bytes.SIZEOF_INT); // System.out.print(" mutual friend number " + mutualFriendNumber); if (mutualFriendNumber > 0 && (mutualFriendNumber + 3 == (kv.getValueLength()) / 4 * Bytes.SIZEOF_BYTE)) { for (int i = 0; i < mutualFriendNumber; ++i) { mutualFriendId = Bytes.toInt(kv.getValue(), (i + 3) * Bytes.SIZEOF_INT, Bytes.SIZEOF_INT); } } else { System.out.println("mutualFriendNumber " + mutualFriendNumber + " value length " + kv.getValueLength()); } } if (++mapperCount % CountUnit == 0) { context.setStatus("mapperCount " + mapperCount); } } } private final String fofTableName; private final Configuration conf; private ReadFoFTableOneToAll(String fofTableName, Configuration conf) { this.fofTableName = fofTableName; this.conf = conf; } public int doIt() throws IOException, InterruptedException, ClassNotFoundException { System.out.println("[Predictor1] doIt"); Job job = new Job(this.conf); job.getConfiguration().set("FOF_TABLE", this.fofTableName); job.setJarByClass(ReadFoFTableOneToAll.class); job.setMapperClass(ReadFoFTableMap.class); job.setNumReduceTasks(0); job.getConfiguration().set("mapred.map.tasks.speculative.execution", "false"); job.getConfiguration().set("hbase.regionserver.lease.period", "300000"); job.getConfiguration().set("hbase.rpc.timeout", "400000"); job.getConfiguration().set("mapred.queue.names","q2"); job.getConfiguration().set("mapred.job.queue.name","q2"); Scan scan = new Scan(); TableMapReduceUtil.initTableMapperJob(this.fofTableName, scan, ReadFoFTableMap.class, Text.class, Text.class, job); job.setOutputFormatClass(NullOutputFormat.class); return job.waitForCompletion(true) ? 0 : 1; } @SuppressWarnings("static-access") private static ReadFoFTableOneToAll parseArgs(String[] args) throws IOException, ParseException { Options opts = new Options(); opts.addOption(OptionBuilder.hasArg(true).isRequired(true) .withDescription("Input fof table").withLongOpt("fof") .create('f')); Configuration conf = HBaseConfiguration.create(); String[] otherArgs = new GenericOptionsParser(conf, args) .getRemainingArgs(); PosixParser parser = new PosixParser(); CommandLine cmd = parser.parse(opts, otherArgs); String fofTableName = cmd.getOptionValue('f'); return new ReadFoFTableOneToAll(fofTableName, conf); } public static void main(String[] args) throws Exception { ReadFoFTableOneToAll pred = parseArgs(args); pred.doIt(); } }
[ "liyong19861014@gmail.com" ]
liyong19861014@gmail.com
63adbf592d0baf479485021e9e6bbe8b0fec800c
ed3240a7cbf90ec71bb2c3e4c0d0c7dfe50b308d
/Swing56-ModalDialogs/src/main/java/com/jin/gui/ProgressDialog.java
3ef9634361eb4ecc2db19c84fc6dcfeed7db2c16
[]
no_license
cicadasworld/java-swing-demo
85ae5ab1586cf75ba55d0520ae7d93458ef79ec2
f2f374942a237ab20a9ce733e820eacccdb4afd4
refs/heads/master
2022-11-11T22:03:54.867406
2020-06-26T10:20:54
2020-06-26T10:20:54
275,127,960
0
0
null
null
null
null
UTF-8
Java
false
false
311
java
package com.jin.gui; import java.awt.*; import javax.swing.*; public class ProgressDialog extends JDialog { public ProgressDialog(Window parent) { super(parent, "Messages Downloading...", ModalityType.APPLICATION_MODAL); setLocationRelativeTo(parent); setSize(400, 200); } }
[ "flyterren@163.com" ]
flyterren@163.com
07588ca7462958c5a90639398aaab5033856f5c9
74630cd0589b55dfd7e4de97ed456ae2547caeaa
/ArtOfEncryptionAndDecryption/src/main/java/ch9/s3/RSACoder.java
301bfc06382535912f7d74676b295324d0f3c230
[]
no_license
xiaozhiliaoo/java-security-practice
e794098a9f6e77ac49113cd9ed1754588aa690be
684ed306b83cb75f6497218eb03321d351786ea3
refs/heads/master
2023-04-30T16:51:09.228209
2021-05-11T12:40:33
2021-05-11T12:40:33
297,676,684
0
0
null
null
null
null
UTF-8
Java
false
false
3,805
java
/** * 2008-6-11 */ package ch9.s3; import java.security.*; import java.security.interfaces.RSAPrivateKey; import java.security.interfaces.RSAPublicKey; import java.security.spec.PKCS8EncodedKeySpec; import java.security.spec.X509EncodedKeySpec; import java.util.HashMap; import java.util.Map; /** * RSA安全编码组件 * * @author 梁栋 * @version 1.0 */ public abstract class RSACoder { /** * 数字签名 * 密钥算法 */ public static final String KEY_ALGORITHM = "RSA"; /** * 数字签名 * 签名/验证算法 */ public static final String SIGNATURE_ALGORITHM = "SHA1withRSA"; /** * 公钥 */ private static final String PUBLIC_KEY = "RSAPublicKey"; /** * 私钥 */ private static final String PRIVATE_KEY = "RSAPrivateKey"; /** * RSA密钥长度 默认1024位, * 密钥长度必须是64的倍数, * 范围在512至65536位之间。 */ private static final int KEY_SIZE = 512; /** * 签名 * * @param data * 待签名数据 * @param privateKey * 私钥 * @return byte[] 数字签名 * @throws Exception */ public static byte[] sign(byte[] data, byte[] privateKey) throws Exception { // 转换私钥材料 PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(privateKey); // 实例化密钥工厂 KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM); // 取私钥匙对象 PrivateKey priKey = keyFactory.generatePrivate(pkcs8KeySpec); // 实例化Signature Signature signature = Signature.getInstance(SIGNATURE_ALGORITHM); // 初始化Signature signature.initSign(priKey); // 更新 signature.update(data); // 签名 return signature.sign(); } /** * 校验 * * @param data * 待校验数据 * @param publicKey * 公钥 * @param sign * 数字签名 * * @return boolean 校验成功返回true 失败返回false * @throws Exception * */ public static boolean verify(byte[] data, byte[] publicKey, byte[] sign) throws Exception { // 转换公钥材料 X509EncodedKeySpec keySpec = new X509EncodedKeySpec(publicKey); // 实例化密钥工厂 KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM); // 生成公钥 PublicKey pubKey = keyFactory.generatePublic(keySpec); // 实例化Signature Signature signature = Signature.getInstance(SIGNATURE_ALGORITHM); // 初始化Signature signature.initVerify(pubKey); // 更新 signature.update(data); // 验证 return signature.verify(sign); } /** * 取得私钥 * * @param keyMap * @return * @throws Exception */ public static byte[] getPrivateKey(Map<String, Object> keyMap) throws Exception { Key key = (Key) keyMap.get(PRIVATE_KEY); return key.getEncoded(); } /** * 取得公钥 * * @param keyMap * @return * @throws Exception */ public static byte[] getPublicKey(Map<String, Object> keyMap) throws Exception { Key key = (Key) keyMap.get(PUBLIC_KEY); return key.getEncoded(); } /** * 初始化密钥 * * @return Map 密钥对儿 Map * @throws Exception */ public static Map<String, Object> initKey() throws Exception { // 实例化密钥对儿生成器 KeyPairGenerator keyPairGen = KeyPairGenerator .getInstance(KEY_ALGORITHM); // 初始化密钥对儿生成器 keyPairGen.initialize(KEY_SIZE); // 生成密钥对儿 KeyPair keyPair = keyPairGen.generateKeyPair(); // 公钥 RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic(); // 私钥 RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate(); // 封装密钥 Map<String, Object> keyMap = new HashMap<String, Object>(2); keyMap.put(PUBLIC_KEY, publicKey); keyMap.put(PRIVATE_KEY, privateKey); return keyMap; } }
[ "xiaozhiliaoo@gmail.com" ]
xiaozhiliaoo@gmail.com
75a570fe18c96b8fe6fe286c79bcaa5029c2d5c4
06e34596185c90f3c1cce7cbca5cfb4f2594782c
/xgen4j/src/test-gen/java/com/rodrigodev/xgen4j/test/message/descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation/Information.java
8d7fd158d2ff7894c58bb6ae507ce010c67341a9
[ "MIT" ]
permissive
RodrigoQuesadaDev/XGen4J
3e45593c1de9f842b2e2de682bec6b59c34d5ab7
8d7791494521f54cbf8d89b5e12001e295cff3f4
refs/heads/master
2021-01-21T05:00:42.559899
2015-07-28T10:11:13
2015-07-28T10:11:13
39,287,751
0
0
null
null
null
null
UTF-8
Java
false
false
6,365
java
package com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation; import com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.ErrorInfo.CustomMessageGeneratorErrorDescription; import com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.ErrorInfo.PlainTextErrorDescription; import java.util.*; import java.util.concurrent.atomic.AtomicBoolean; /** * Autogenerated by XGen4J on January 1, 0001. */ public class Information { private static List<ErrorInfo> errorInfoList; private static Map<String, ErrorInfo> idToErrorInfoMap; private static final AtomicBoolean loaded = new AtomicBoolean(); private static void load() { if (loaded.compareAndSet(false, true)) { errorInfoList = new ArrayList<>(); idToErrorInfoMap = new HashMap<>(); errorInfoList.add(new ErrorInfo( com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.RootError.class, new ExceptionInfo(com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.RootException.class), com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.RootError.CODE, false )); errorInfoList.add(new ErrorInfo( com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.c1.C1Error.class, new ExceptionInfo(com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.c1.C1Exception.class), com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.c1.C1Error.CODE, true )); errorInfoList.add(new ErrorInfo( com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.c1.c2.C2Error.class, new ExceptionInfo(com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.c1.c2.C2Exception.class), com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.c1.c2.C2Error.CODE, true )); errorInfoList.add(new ErrorInfo( com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.c1.c2.c3.C3Error.class, new ExceptionInfo(com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.c1.c2.c3.C3Exception.class), com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.c1.c2.c3.C3Error.CODE, new CustomMessageGeneratorErrorDescription<>(com.rodrigodev.xgen4j.test.message.MessageTests.TestMessageGeneratorObjectChild.class), true )); errorInfoList.add(new ErrorInfo( com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.e1.E1Error.class, new ExceptionInfo(com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.e1.E1Exception.TYPE, com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.e1.E1Exception.class), com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.e1.E1Error.CODE, false )); errorInfoList.add(new ErrorInfo( com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.e1.e2.E2Error.class, new ExceptionInfo(com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.e1.e2.E2Exception.TYPE, com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.e1.e2.E2Exception.class), com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.e1.e2.E2Error.CODE, false )); errorInfoList.add(new ErrorInfo( com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.e1.e2.e3.E3Error.class, new ExceptionInfo(com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.e1.e2.e3.E3Exception.TYPE, com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.e1.e2.e3.E3Exception.class), com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.e1.e2.e3.E3Error.CODE, new CustomMessageGeneratorErrorDescription<>(com.rodrigodev.xgen4j.test.message.MessageTests.TestMessageGeneratorObjectChild.class), false )); errorInfoList = Collections.unmodifiableList(errorInfoList); for (ErrorInfo errorInfo : errorInfoList) { idToErrorInfoMap.put(errorInfo.code().id(), errorInfo); } loaded.set(true); } } public static List<ErrorInfo> list() { load(); return errorInfoList; } public static ErrorInfo forId(String id) { if (id == null) throw new IllegalArgumentException("id"); load(); return idToErrorInfoMap.get(id); } }
[ "rodrigoquesada@gmail.com" ]
rodrigoquesada@gmail.com
7df77d022e38aace2ce70094b030c1a55640be99
0d8eb76ba339a581a5db235780edbd49355f7fc4
/src/Unit8/InstructionExamples/ArrayStats.java
39ded37758e9b044c3d68c6ad7800792df8f3807
[]
no_license
INeedAUniqueUsername/AP-Computer-Science-A
cfb6630f9cba9cc5b887f37db176483ae4868c7e
45937a15125b4b10b14bb0f6789e8adee6a5ee6f
refs/heads/master
2020-12-30T22:43:53.954433
2017-11-28T19:29:27
2017-11-28T19:29:27
80,654,507
0
0
null
2017-04-29T05:27:32
2017-02-01T19:16:45
HTML
WINDOWS-1252
Java
false
false
769
java
package Unit8.InstructionExamples; //© A+ Computer Science - www.apluscompsci.com //Name - //Date - //Class - //Lab - import static java.lang.System.*; import java.util.Arrays; import java.util.Scanner; public class ArrayStats { //instance variable private int[] nums; //constructor public ArrayStats(int[] n) { setNums(n); } //set method public void setNums(int[] n) { nums = n; } public int getNumGroupsOfSize(int size) { int result = 0; int lookFor = 0; int lookForSize = 0; for(int n : nums) { if(n == lookFor) { lookForSize++; if(lookForSize == size) { result++; } } else { lookFor = n; lookForSize = 0; } } return result; } public String toString() { return ""+Arrays.toString(nums); } }
[ "alexiscomical445@gmail.com" ]
alexiscomical445@gmail.com
21718f825caeeb364474a5501cab078a4afda789
88c02d49d669c7637bbca9fd1f570cc7292f484f
/AndroidJniGenerate/GetJniCode/xwebruntime_javacode/org/chromium/webauth/mojom/PublicKeyCredentialType.java
afea99f7baf98dbbdb49d6aace7c28d35528b086
[]
no_license
ghost461/AndroidMisc
1af360cf36ae212a81814f9a4057884290dbe12e
dfa4c9115c0198755c9ff6c5e5c9ea3b56c9daff
refs/heads/master
2020-09-07T19:17:00.028887
2019-11-11T02:55:33
2019-11-11T02:55:33
220,887,476
0
0
null
null
null
null
UTF-8
Java
false
false
645
java
package org.chromium.webauth.mojom; import org.chromium.mojo.bindings.DeserializationException; public final class PublicKeyCredentialType { private static final boolean IS_EXTENSIBLE = false; public static final int PUBLIC_KEY; private PublicKeyCredentialType() { super(); } public static boolean isKnownValue(int arg0) { if(arg0 != 0) { return 0; } return 1; } public static void validate(int arg1) { if(PublicKeyCredentialType.isKnownValue(arg1)) { return; } throw new DeserializationException("Invalid enum value."); } }
[ "lingmilch@sina.com" ]
lingmilch@sina.com
092e5b6cee7afe8b48a35ab30d6f79fc122d89d2
e9d1b2db15b3ae752d61ea120185093d57381f73
/mytcuml-src/src/java/components/xmi_writer_diagram_interchange_plugin/trunk/src/java/tests/com/topcoder/xmi/writer/transformers/diagram/failuretests/PropertyTransformerFailureTests.java
b2311064fc0c1b1c113c21f7696170be0905787b
[]
no_license
kinfkong/mytcuml
9c65804d511ad997e0c4ba3004e7b831bf590757
0786c55945510e0004ff886ff01f7d714d7853ab
refs/heads/master
2020-06-04T21:34:05.260363
2014-10-21T02:31:16
2014-10-21T02:31:16
25,495,964
1
0
null
null
null
null
UTF-8
Java
false
false
831
java
/* * Copyright (C) 2006 TopCoder Inc., All Rights Reserved. */ package com.topcoder.xmi.writer.transformers.diagram.failuretests; import com.topcoder.diagraminterchange.Property; import com.topcoder.xmi.writer.transformers.diagram.elementtransformers.PropertyTransformer; /** * <p> * Failure tests for class PropertyTransformer. Tests the exceptions in invalid condition. * </p> * * @author magicpig * @version 1.0 */ public class PropertyTransformerFailureTests extends TransformerFailureBase { /** * Sets up testing environment. * * @throws Exception when error occurs */ protected void setUp() throws Exception { super.setUp(); element = new Property(); suhClassName = "PropertyTransformerFailureTests"; this.instance = new PropertyTransformer(); } }
[ "kinfkong@126.com" ]
kinfkong@126.com
dc2416110a1a442f0e7b5be7ae889f94df235391
99c63774ee82050778dedc04ee91e7e22357f265
/src/GTKEncapsulate/OOTextView.java
9e4e8b0b9fd6f83608e9b964d66ed87ac1d3b96c
[]
no_license
jueqingsizhe66/TestGtk
f1746e5898cde9033601cea8a956f3d18c6eadf1
09c1625b26df3726b95cf51856c644436e651dab
refs/heads/master
2021-01-23T16:43:29.454239
2015-03-25T01:49:17
2015-03-25T01:49:17
29,845,235
0
0
null
null
null
null
GB18030
Java
false
false
3,997
java
package GTKEncapsulate; import com.rupeng.gtk4j.GTK; /** * @author 叶昭良 * @time 2015年2月4日下午11:08:44 * @version GTKEncapsulateOOTextView V1.0 */ public class OOTextView extends OOContainer { public OOTextView() { //new OOWidget().setId(GTK.gtk_text_view_new()); 方法只能是对象进行调用,除了静态方法 //当你继承了一个类 ,才可以直接使用该方法 setId(GTK.gtk_text_view_new()); } /* // GtkWrapMode start public static final int GTK_WRAP_NONE = findConst("GTK_WRAP_NONE"); public static final int GTK_WRAP_CHAR = findConst("GTK_WRAP_CHAR"); public static final int GTK_WRAP_WORD = findConst("GTK_WRAP_WORD"); public static final int GTK_WRAP_WORD_CHAR = findConst("GTK_WRAP_WORD_CHAR");*/ /** * * @param tvType 设置textview现实文本的模式,一般有四种类型,最常用GTK_WRAP_WORD */ public void setType(int tvType) { GTK.gtk_text_view_set_wrap_mode(this.getId(), tvType); } public void setType() { GTK.gtk_text_view_set_wrap_mode(this.getId(), GTK.GTK_WRAP_WORD_CHAR); } /** * * @param isEditable Textview是否可以改写 */ public void setEditable(boolean isEditable) { GTK.gtk_text_view_set_editable(getId(), isEditable); } /** * 获取textview的所有信息(不能逐行 是我有所不解的) */ public String getText() { int buffer = GTK.gtk_text_view_get_buffer(this.getId()); return GTK.gtk_text_buffer_get_text(buffer); } /** * * @param message 设置消息 到textview当中 */ public void setText(String message) { int buffer = GTK.gtk_text_view_get_buffer(this.getId()); GTK.gtk_text_buffer_set_text(buffer, message); } /** * * @param width 滚动条的高度(超过则出现) * @param height 滚动条的高度(超过则出现) */ public void addScrollBar(OOGrid og,int start,int width, int height) { OOScrollBar osb = new OOScrollBar(); osb.setWidgetSize(width, height); osb.addView(this); osb.show(); og.add(osb, start); } /** * * @param message 插入信息到textview当中 */ public void insertTextAtEnd(String message) { int buffer = GTK.gtk_text_view_get_buffer(this.getId()); OOTextIter ooiApple = new OOTextIter(); int iter = ooiApple.getId(); GTK.gtk_text_buffer_get_end_iter(buffer, iter); GTK.gtk_text_buffer_insert(buffer, iter, message); //每一次使用完TextIter都得释放 ooiApple.free(); } /** * * @param message 在开头处插入信息 */ public void insertTextAtStart(String message) { int buffer = GTK.gtk_text_view_get_buffer(this.getId()); OOTextIter ooiApple = new OOTextIter(); int iter = ooiApple.getId(); GTK.gtk_text_buffer_get_start_iter(buffer, iter); GTK.gtk_text_buffer_insert(buffer, iter, message); //每一次使用完TextIter都得释放 ooiApple.free(); } /** * * @param message 要插入的信息 * @param number 从头开始算的第几个字符 */ public void insertTextAtOffsetChar(String message, int number) { int buffer = GTK.gtk_text_view_get_buffer(this.getId()); OOTextIter ooiApple = new OOTextIter(); int iter = ooiApple.getId(); GTK.gtk_text_buffer_get_iter_at_offset(buffer, iter, number); GTK.gtk_text_buffer_insert(buffer, iter, message); //每一次使用完TextIter都得释放 ooiApple.free(); } /** * * @param message 待插入的消息 * @param lineNumber buffer中行数(\n) */ public void insertTextAtLine(String message,int lineNumber) { int buffer = GTK.gtk_text_view_get_buffer(this.getId()); OOTextIter ooiApple = new OOTextIter(); int iter = ooiApple.getId(); GTK.gtk_text_buffer_get_iter_at_line(buffer, iter, lineNumber); GTK.gtk_text_buffer_insert(buffer, iter, message); //每一次使用完TextIter都得释放 ooiApple.free(); } }
[ "zhaoturkkey@163.com" ]
zhaoturkkey@163.com
a0f257341d190f34168192ccc665a519f6e2f871
bf4c38f33e9352d9fae0f1581862677af21ab5ca
/IoT2/fr.inria.diverse.iot2.model/src/iot2/impl/SystemImpl.java
0373d621805e7b21750fe01966aa9e8c72fa8bf3
[]
no_license
diverse-project/melange-examples
c0a2b7ecb0659a22e21e1c18202b3682579c7ffa
f6b809429a625104f68f0d8321dd10861de724bf
refs/heads/master
2021-01-19T06:29:01.262950
2017-06-28T13:09:43
2017-06-28T13:09:43
95,668,567
0
1
null
null
null
null
UTF-8
Java
false
false
8,118
java
/** */ package iot2.impl; import iot2.Board; import iot2.HWComponent; import iot2.Iot2Package; import iot2.Sketch; import java.util.Collection; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>System</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link iot2.impl.SystemImpl#getName <em>Name</em>}</li> * <li>{@link iot2.impl.SystemImpl#getComponents <em>Components</em>}</li> * <li>{@link iot2.impl.SystemImpl#getBoards <em>Boards</em>}</li> * <li>{@link iot2.impl.SystemImpl#getSketch <em>Sketch</em>}</li> * </ul> * </p> * * @generated */ public class SystemImpl extends MinimalEObjectImpl.Container implements iot2.System { /** * The default value of the '{@link #getName() <em>Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getName() * @generated * @ordered */ protected static final String NAME_EDEFAULT = null; /** * The cached value of the '{@link #getName() <em>Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getName() * @generated * @ordered */ protected String name = NAME_EDEFAULT; /** * The cached value of the '{@link #getComponents() <em>Components</em>}' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getComponents() * @generated * @ordered */ protected EList<HWComponent> components; /** * The cached value of the '{@link #getBoards() <em>Boards</em>}' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getBoards() * @generated * @ordered */ protected EList<Board> boards; /** * The cached value of the '{@link #getSketch() <em>Sketch</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getSketch() * @generated * @ordered */ protected Sketch sketch; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected SystemImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return Iot2Package.Literals.SYSTEM; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getName() { return name; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setName(String newName) { String oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Iot2Package.SYSTEM__NAME, oldName, name)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<HWComponent> getComponents() { if (components == null) { components = new EObjectContainmentEList<HWComponent>(HWComponent.class, this, Iot2Package.SYSTEM__COMPONENTS); } return components; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<Board> getBoards() { if (boards == null) { boards = new EObjectContainmentEList<Board>(Board.class, this, Iot2Package.SYSTEM__BOARDS); } return boards; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Sketch getSketch() { return sketch; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetSketch(Sketch newSketch, NotificationChain msgs) { Sketch oldSketch = sketch; sketch = newSketch; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Iot2Package.SYSTEM__SKETCH, oldSketch, newSketch); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setSketch(Sketch newSketch) { if (newSketch != sketch) { NotificationChain msgs = null; if (sketch != null) msgs = ((InternalEObject)sketch).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Iot2Package.SYSTEM__SKETCH, null, msgs); if (newSketch != null) msgs = ((InternalEObject)newSketch).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Iot2Package.SYSTEM__SKETCH, null, msgs); msgs = basicSetSketch(newSketch, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Iot2Package.SYSTEM__SKETCH, newSketch, newSketch)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case Iot2Package.SYSTEM__COMPONENTS: return ((InternalEList<?>)getComponents()).basicRemove(otherEnd, msgs); case Iot2Package.SYSTEM__BOARDS: return ((InternalEList<?>)getBoards()).basicRemove(otherEnd, msgs); case Iot2Package.SYSTEM__SKETCH: return basicSetSketch(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case Iot2Package.SYSTEM__NAME: return getName(); case Iot2Package.SYSTEM__COMPONENTS: return getComponents(); case Iot2Package.SYSTEM__BOARDS: return getBoards(); case Iot2Package.SYSTEM__SKETCH: return getSketch(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case Iot2Package.SYSTEM__NAME: setName((String)newValue); return; case Iot2Package.SYSTEM__COMPONENTS: getComponents().clear(); getComponents().addAll((Collection<? extends HWComponent>)newValue); return; case Iot2Package.SYSTEM__BOARDS: getBoards().clear(); getBoards().addAll((Collection<? extends Board>)newValue); return; case Iot2Package.SYSTEM__SKETCH: setSketch((Sketch)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case Iot2Package.SYSTEM__NAME: setName(NAME_EDEFAULT); return; case Iot2Package.SYSTEM__COMPONENTS: getComponents().clear(); return; case Iot2Package.SYSTEM__BOARDS: getBoards().clear(); return; case Iot2Package.SYSTEM__SKETCH: setSketch((Sketch)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case Iot2Package.SYSTEM__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case Iot2Package.SYSTEM__COMPONENTS: return components != null && !components.isEmpty(); case Iot2Package.SYSTEM__BOARDS: return boards != null && !boards.isEmpty(); case Iot2Package.SYSTEM__SKETCH: return sketch != null; } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (name: "); result.append(name); result.append(')'); return result.toString(); } } //SystemImpl
[ "degueule@cwi.nl" ]
degueule@cwi.nl
e369e67bce871eaac9ffec60bec2ae746e0f4043
c3bb807d1c1087254726c4cd249e05b8ed595aaa
/src/oc/whfb/units/vf/VFBanner.java
e9a02bdd0efd4fcc20edaa931a26f65fc49b5b6f
[]
no_license
spacecooky/OnlineCodex30k
f550ddabcbe6beec18f02b3e53415ed5c774d92f
db6b38329b2046199f6bbe0f83a74ad72367bd8d
refs/heads/master
2020-12-31T07:19:49.457242
2014-05-04T14:23:19
2014-05-04T14:23:19
55,958,944
0
0
null
null
null
null
ISO-8859-1
Java
false
false
2,510
java
package oc.whfb.units.vf; import oc.BuildaHQ; import oc.CommonMagicItems; import oc.OptionsGruppeEintrag; import oc.OptionsUpgradeGruppeUnique; import oc.RuestkammerVater; public class VFBanner extends RuestkammerVater { OptionsUpgradeGruppeUnique o1; int maxCosts = 25; boolean isAST = false; public VFBanner() { grundkosten = 0; } @Override public void initButtons(boolean... defaults) { // defaults[0] = AST // defaults[1] = Blutritter // defaults[2] = Verfluchte/ Fluchritter isAST = defaults[0]; if(defaults[0]) maxCosts = 125; if(defaults[1]) maxCosts = 75; if(defaults[2]) maxCosts = 50; if(maxCosts >= 125) ogE.addElement(new OptionsGruppeEintrag(BuildaHQ.translate("Drakenhofbanner"), 125)); if(maxCosts >= 75) ogE.addElement(new OptionsGruppeEintrag(BuildaHQ.translate("Banner der Blutfeste"), 75)); if(maxCosts >= 45) ogE.addElement(new OptionsGruppeEintrag(BuildaHQ.translate("Banner der Hügelgräber"), 45)); if(maxCosts >= 40) ogE.addElement(new OptionsGruppeEintrag(BuildaHQ.translate("Kreischendes Banner"), 40)); if(maxCosts >= 35) ogE.addElement(new OptionsGruppeEintrag(BuildaHQ.translate("Königliche Standarte"), BuildaHQ.translate("Königliche Standarte von Strigos"), 35)); ogE.addElement(new OptionsGruppeEintrag(BuildaHQ.translate("Ikone der Vergeltung"), 25)); ogE.addElement(new OptionsGruppeEintrag(BuildaHQ.translate("Banner der toten Legion"), 25)); ogE.addElement(new OptionsGruppeEintrag(BuildaHQ.translate("Fluchfahne Mousillons"), BuildaHQ.translate("Fluchfahne von Mousillon"), 25)); ogE.addElement(new OptionsGruppeEintrag(BuildaHQ.translate("Banner der Albträume"), BuildaHQ.translate("Banner der ewigen Albträume"), 25)); ogE.addElement(new OptionsGruppeEintrag(BuildaHQ.translate("Standarte d. Lebenskraft"), BuildaHQ.translate("Standarte der höllischen Lebenskraft"), 25)); ogE.addElement(new OptionsGruppeEintrag(BuildaHQ.translate("Standarte des Untods"), BuildaHQ.translate("Standarte des immerwährenden Untodes"), 15)); ogE.addElement(new OptionsGruppeEintrag(BuildaHQ.translate("Höllenfeuerbanner"), 10)); CommonMagicItems.addCommonBanner(ogE, maxCosts, 25); add(o1 = new OptionsUpgradeGruppeUnique(ID, randAbstand, cnt, "", ogE)); setUeberschrift(BuildaHQ.translate("Magische Standarten")); sizeSetzen(100, 100, 285, KAMMER_HOEHE + cnt + 10); } @Override public void refreshen() { if(!isAST) if(!o1.isSelected()) o1.setSelected(0, true); setButtonState(BuildaHQ.noErrors); } }
[ "spacecooky@b551ab73-3a01-0010-9fae-47f737f7a8aa" ]
spacecooky@b551ab73-3a01-0010-9fae-47f737f7a8aa
b22fce12be341699e1b96a55d7e67a885840bb0b
04b1803adb6653ecb7cb827c4f4aa616afacf629
/media/midi/java/src/org/chromium/midi/MidiInputPortAndroid.java
f866c51e24d083ac4f563be3d3f4a3a1eb7b39d0
[ "BSD-3-Clause" ]
permissive
Samsung/Castanets
240d9338e097b75b3f669604315b06f7cf129d64
4896f732fc747dfdcfcbac3d442f2d2d42df264a
refs/heads/castanets_76_dev
2023-08-31T09:01:04.744346
2021-07-30T04:56:25
2021-08-11T05:45:21
125,484,161
58
49
BSD-3-Clause
2022-10-16T19:31:26
2018-03-16T08:07:37
null
UTF-8
Java
false
false
3,062
java
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.midi; import android.annotation.TargetApi; import android.media.midi.MidiDevice; import android.media.midi.MidiOutputPort; import android.media.midi.MidiReceiver; import android.os.Build; import org.chromium.base.annotations.CalledByNative; import org.chromium.base.annotations.JNINamespace; import java.io.IOException; // Note "InputPort" is named in the Web MIDI manner. It corresponds to MidiOutputPort class in the // Android API. /** * A MidiInputPortAndroid provides data to the associated midi::MidiInputPortAndroid object. */ @JNINamespace("midi") @TargetApi(Build.VERSION_CODES.M) class MidiInputPortAndroid { /** * The underlying port. */ private MidiOutputPort mPort; /** * A pointer to a midi::MidiInputPortAndroid object. */ private long mNativeReceiverPointer; /** * The device this port belongs to. */ private final MidiDevice mDevice; /** * The index of the port in the associated device. */ private final int mIndex; /** * constructor * @param device the device this port belongs to. * @param index the index of the port in the associated device. */ MidiInputPortAndroid(MidiDevice device, int index) { mDevice = device; mIndex = index; } /** * Registers this object to the underlying port so as to the C++ function will be called with * the given C++ object when data arrives. * @param nativeReceiverPointer a pointer to a midi::MidiInputPortAndroid object. * @return true if this operation succeeds or the port is already open. */ @CalledByNative boolean open(long nativeReceiverPointer) { if (mPort != null) { return true; } mPort = mDevice.openOutputPort(mIndex); if (mPort == null) { return false; } mNativeReceiverPointer = nativeReceiverPointer; mPort.connect(new MidiReceiver() { @Override public void onSend(byte[] bs, int offset, int count, long timestamp) { synchronized (MidiInputPortAndroid.this) { if (mPort == null) { return; } nativeOnData(mNativeReceiverPointer, bs, offset, count, timestamp); } } }); return true; } /** * Closes the port. */ @CalledByNative synchronized void close() { if (mPort == null) { return; } try { mPort.close(); } catch (IOException e) { // We can do nothing here. Just ignore the error. } mNativeReceiverPointer = 0; mPort = null; } private static native void nativeOnData( long nativeMidiInputPortAndroid, byte[] bs, int offset, int count, long timestamp); }
[ "sunny.nam@samsung.com" ]
sunny.nam@samsung.com
89238e183a9a1fb2434782ac8e2bfb792e41ea53
d122ee87845d3814e9547c53cc9f9ed820b01bf9
/src/main/java/krasa/mavenhelper/action/OpenTerminalAction.java
c26f90012675091a42da4d3eccfad891a1b16775
[ "Apache-2.0" ]
permissive
lxk696/MavenHelper
e6613471a606c94e6c2a0682afa3ea95b5cf47ae
b6ccd84cd6070e0eb2d77be0197f043499ba8366
refs/heads/master
2023-03-28T00:36:25.368016
2021-03-25T16:40:58
2021-03-25T16:40:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,716
java
package krasa.mavenhelper.action; import com.intellij.ide.plugins.IdeaPluginDescriptor; import com.intellij.ide.plugins.PluginManager; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.Presentation; import com.intellij.openapi.extensions.PluginId; import com.intellij.openapi.project.DumbAware; import com.intellij.openapi.project.Project; import com.intellij.openapi.vfs.VirtualFile; import org.jetbrains.idea.maven.utils.actions.MavenActionUtil; import org.jetbrains.plugins.terminal.TerminalView; public class OpenTerminalAction extends AnAction implements DumbAware { private boolean pluginEnabled; public OpenTerminalAction() { pluginEnabled = isPluginEnabled(); } public void actionPerformed(AnActionEvent e) { Project project = getEventProject(e); if (project == null) { return; } VirtualFile fileByUrl = Utils.getPomDir(e); if (fileByUrl != null) { TerminalView.getInstance(project).openTerminalIn(fileByUrl); } } @Override public void update(AnActionEvent e) { super.update(e); Presentation p = e.getPresentation(); p.setEnabled(isAvailable(e)); p.setVisible(isVisible(e)); } protected boolean isAvailable(AnActionEvent e) { return pluginEnabled && MavenActionUtil.hasProject(e.getDataContext()); } protected boolean isVisible(AnActionEvent e) { return pluginEnabled && MavenActionUtil.getMavenProject(e.getDataContext()) != null; } private boolean isPluginEnabled() { IdeaPluginDescriptor plugin = PluginManager.getPlugin(PluginId.getId("org.jetbrains.plugins.terminal")); if (plugin != null) { return plugin.isEnabled(); } return false; } }
[ "vojta.krasa@gmail.com" ]
vojta.krasa@gmail.com
b7e2435aa055c00fd57a4172c5ed11b98c542761
3dbd673dfb183fda78d5909f3e0b0eea0ab329e4
/MiscSecurity/SigDump/app/src/main/java/com/commonsware/android/signature/dump/SignatureFragment.java
980ca15d872f15a4655eae0bcf9e43a1ea825afb
[ "Apache-2.0" ]
permissive
LT5505/cw-omnibus
32e5425d47ee822f09e00d8548a450111d7a970d
0d76c6ac659a54f1ea0c7b28c15c1261c6e652c9
refs/heads/master
2021-04-29T08:13:48.829179
2016-12-24T14:07:35
2016-12-24T14:07:35
77,652,362
1
0
null
2016-12-30T02:00:53
2016-12-30T02:00:53
null
UTF-8
Java
false
false
2,502
java
/*** Copyright (c) 2013 CommonsWare, LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. From _The Busy Coder's Guide to Android Development_ https://commonsware.com/Android */ package com.commonsware.android.signature.dump; import android.app.Fragment; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import java.io.ByteArrayInputStream; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Locale; public class SignatureFragment extends Fragment { DateFormat fmt=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.US); @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return(inflater.inflate(R.layout.sig, container, false)); } void show(byte[] raw) { CertificateFactory cf=null; try { cf=CertificateFactory.getInstance("X509"); } catch (CertificateException e) { Log.e(getClass().getSimpleName(), "Exception getting CertificateFactory", e); return; } X509Certificate c=null; ByteArrayInputStream bin=new ByteArrayInputStream(raw); try { c=(X509Certificate)cf.generateCertificate(bin); } catch (CertificateException e) { Log.e(getClass().getSimpleName(), "Exception getting X509Certificate", e); return; } TextView tv=(TextView)getView().findViewById(R.id.subject); tv.setText(c.getSubjectDN().toString()); tv=(TextView)getView().findViewById(R.id.issuer); tv.setText(c.getIssuerDN().toString()); tv=(TextView)getView().findViewById(R.id.valid); tv.setText(fmt.format(c.getNotBefore()) + " to " + fmt.format(c.getNotAfter())); } }
[ "mmurphy@commonsware.com" ]
mmurphy@commonsware.com
8ad72bf4dc6b53b1b4eeee5e29f05430f7821825
62a18caaf370a9d161058a622a359321425b7033
/src/farruh/edu/jumbocs/stackqueuedequeue/deque/Deque.java
aacf86dd47d4a16e3b86ac6f245bcdc5a46d7941
[]
no_license
farruhha/jumbocs
01e69b04a5ecc93388e28eef3d55bb4ab6b965e1
2a2731746bddc738adfbff78acecc08bc6a90f68
refs/heads/master
2021-09-12T04:50:32.950433
2018-04-14T15:39:31
2018-04-14T15:39:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
248
java
package farruh.edu.jumbocs.stackqueuedequeue.deque; public interface Deque<E> { int size(); boolean isEmpty(); E first(); E last(); void addFirst(E e); void addLast(E e); E removeFirst(); E removeLast(); }
[ "germany-2013@mail.ru" ]
germany-2013@mail.ru
fbd8e7473e3e4d4567eaf4209f08eb02fb6e9e83
58df55b0daff8c1892c00369f02bf4bf41804576
/src/bnk.java
9f1e60e25fac2ace508bb27f42355154777b4906
[]
no_license
gafesinremedio/com.google.android.gm
0b0689f869a2a1161535b19c77b4b520af295174
278118754ea2a262fd3b5960ef9780c658b1ce7b
refs/heads/master
2020-05-04T15:52:52.660697
2016-07-21T03:39:17
2016-07-21T03:39:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,567
java
import com.android.ex.photo.views.PhotoView; public final class bnk implements Runnable { public boolean a; private final PhotoView b; private float c; private float d; private boolean e; private float f; private float g; private float h; private long i; private boolean j; public bnk(PhotoView paramPhotoView) { b = paramPhotoView; } public final void a() { a = false; j = true; } public final boolean a(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4) { if (a) { return false; } c = paramFloat3; d = paramFloat4; f = paramFloat2; i = System.currentTimeMillis(); g = paramFloat1; if (f > g) {} for (boolean bool = true;; bool = false) { e = bool; h = ((f - g) / 200.0F); a = true; j = false; b.post(this); return true; } } public final void run() { if (j) { return; } long l1 = System.currentTimeMillis(); long l2 = i; float f1 = g; float f2 = h; f1 = (float)(l1 - l2) * f2 + f1; b.a(f1, c, d); boolean bool2; if (f1 != f) { bool2 = e; if (f1 <= f) { break label128; } } label128: for (boolean bool1 = true;; bool1 = false) { if (bool2 == bool1) { b.a(f, c, d); a(); } if (j) { break; } b.post(this); return; } } } /* Location: * Qualified Name: bnk * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
0e76d5cce348f390f9a44991264e9aec76739586
3395c15ec3e3e671b211db151dd422e89e5c995a
/jalorx-services/service-i18n/src/main/java/io/jalorx/i18n/service/I18NService.java
0795d2872ebd0ade54ad17fbb8e1de522c37b353
[]
no_license
wangscript007/jalorx
15e0f4d776d58280e86be98414663b9765be1d0c
e5a6e5b5ec4cf2e7d408bdba1c50b55971c6b079
refs/heads/main
2023-08-10T18:03:07.898660
2021-09-08T00:26:15
2021-09-08T00:26:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
507
java
package io.jalorx.i18n.service; import java.util.List; import javax.transaction.Transactional; import io.jalorx.boot.Pair; import io.jalorx.boot.service.BaseService; import io.jalorx.i18n.entity.I18N; import io.micronaut.transaction.annotation.ReadOnly; /** * 国际化Service. * * @author Bruce */ @Transactional() public interface I18NService extends BaseService<I18N> { @ReadOnly I18N getLastUpdateTime(String languageCode); @ReadOnly List<Pair> getI18NMessage(String languageCode); }
[ "chenjpu@gmail.com" ]
chenjpu@gmail.com
1cdad04c41c1665560c162406f1d7bb9f5b2b760
2bc2eadc9b0f70d6d1286ef474902466988a880f
/tags/mule-2.0.0-M2/transports/xfire/src/test/java/org/mule/providers/soap/xfire/testmodels/XFireComplexTypeService.java
da5b2429cc0a0ca4caba8009f1cef1496405905d
[]
no_license
OrgSmells/codehaus-mule-git
085434a4b7781a5def2b9b4e37396081eaeba394
f8584627c7acb13efdf3276396015439ea6a0721
refs/heads/master
2022-12-24T07:33:30.190368
2020-02-27T19:10:29
2020-02-27T19:10:29
243,593,543
0
0
null
2022-12-15T23:30:00
2020-02-27T18:56:48
null
UTF-8
Java
false
false
602
java
/* * $Id$ * -------------------------------------------------------------------------------------- * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com * * The software in this package is published under the terms of the CPAL v1.0 * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */ package org.mule.providers.soap.xfire.testmodels; import org.mule.tck.testmodels.services.Person; public class XFireComplexTypeService { public boolean addPersonWithConfirmation(Person person) { return true; } }
[ "tcarlson@bf997673-6b11-0410-b953-e057580c5b09" ]
tcarlson@bf997673-6b11-0410-b953-e057580c5b09
a60b261b0e2fd0cb2af10a2047bbee8adcf6adec
00e51f2de904cd91f1154b28b2f415488d93916c
/src/leet/_301_350/_349_Intersection_of_two_arrays.java
0a03a978120ff1007774adf89bc55cd6faf11d7e
[]
no_license
LiFangCoding/Leet
1701d8ba44278980eb2c4d758cb3e8cc53e1abef
fe4a31d7ddc9523dba5c0eb9857a2ddc05534bbe
refs/heads/master
2021-06-16T15:41:20.443028
2021-04-14T13:12:39
2021-04-14T13:12:39
189,739,892
0
0
null
null
null
null
UTF-8
Java
false
false
1,358
java
package leet._301_350; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; /** * Given two arrays, write a function to compute their intersection. * <p> * Example 1: * <p> * Input: nums1 = [1,2,2,1], nums2 = [2,2] * Output: [2] * Example 2: * <p> * Input: nums1 = [4,9,5], nums2 = [9,4,9,8,4] * Output: [9,4] * Note: * <p> * Each element in the result must be unique. * The result can be in any order. * <p> * 来源:力扣(LeetCode) * 链接:https://leetcode-cn.com/problems/intersection-of-two-arrays * 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。 */ public class _349_Intersection_of_two_arrays { class Sol_set { public int[] intersection(int[] nums1, int[] nums2) { Set<Integer> set = new HashSet<>(); List<Integer> list = new ArrayList<>(); for (int x : nums1) { set.add(x); } for (int x : nums2) { if (set.contains(x)) { list.add(x); set.remove(x); } } int[] res = new int[list.size()]; for (int i = 0; i < res.length; i++) { res[i] = list.get(i); } return res; } } }
[ "fanglihust@gmail.com" ]
fanglihust@gmail.com
2fe20dfe567f197310d19dd2fa707dd39c9b1954
9eb88736f632b25d2908106d56c415a69e8b72cf
/bibsonomy/bibsonomy-recommender/src/main/java/org/bibsonomy/recommender/tags/AbstractTagRecommender.java
f9a97e14b6877b72ff542d9e99126ea0c8c13da5
[]
no_license
jppazmin/bibsonomy-social
8aabcc77d4f5f75f31b0dfb1112968ab62598941
09766fe30744dfbe226b4d8a2f6dc5849920b41a
refs/heads/master
2016-08-02T21:09:20.835596
2013-06-18T05:03:34
2013-06-18T05:03:34
10,136,522
3
1
null
null
null
null
UTF-8
Java
false
false
5,405
java
/** * * BibSonomy-Recommender - Various methods to provide recommendations for BibSonomy * * Copyright (C) 2006 - 2011 Knowledge & Data Engineering Group, * University of Kassel, Germany * http://www.kde.cs.uni-kassel.de/ * * This program 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 * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser 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 org.bibsonomy.recommender.tags; import java.util.Collection; import java.util.SortedSet; import java.util.TreeSet; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.bibsonomy.model.Post; import org.bibsonomy.model.RecommendedTag; import org.bibsonomy.model.Resource; import org.bibsonomy.model.comparators.RecommendedTagComparator; import org.bibsonomy.services.recommender.TagRecommender; import org.bibsonomy.util.TagStringUtils; /** * The basic skeleton to implement a tag recommender. * * @author rja * @version $Id: AbstractTagRecommender.java,v 1.5 2010-07-14 11:42:29 nosebrain Exp $ */ public abstract class AbstractTagRecommender implements TagRecommender { private static final Log log = LogFactory.getLog(AbstractTagRecommender.class); private static final int DEFAULT_NUMBER_OF_TAGS_TO_RECOMMEND = 5; /** * The maximal number of tags the recommender shall return on a call to * {@link #getRecommendedTags(Post)}. */ protected int numberOfTagsToRecommend = DEFAULT_NUMBER_OF_TAGS_TO_RECOMMEND; /** * Should the recommender return only tags cleaned according to * {@link TagStringUtils#cleanTag(String)} and removed according to * {@link TagStringUtils#isIgnoreTag(String)}? */ protected boolean cleanTags = false; /** * Returns user's five overall most popular tags * * @see org.bibsonomy.services.recommender.TagRecommender#getRecommendedTags(org.bibsonomy.model.Post) */ @Override public SortedSet<RecommendedTag> getRecommendedTags(final Post<? extends Resource> post) { final SortedSet<RecommendedTag> recommendedTags = new TreeSet<RecommendedTag>(new RecommendedTagComparator()); this.addRecommendedTags(recommendedTags, post); return recommendedTags; } /** * @return The (maximal) number of tags this recommender shall return. */ public int getNumberOfTagsToRecommend() { return this.numberOfTagsToRecommend; } /** Set the (maximal) number of tags this recommender shall return. The default is {@value #DEFAULT_NUMBER_OF_TAGS_TO_RECOMMEND}. * * @param numberOfTagsToRecommend */ public void setNumberOfTagsToRecommend(int numberOfTagsToRecommend) { this.numberOfTagsToRecommend = numberOfTagsToRecommend; } @Override public void addRecommendedTags(final Collection<RecommendedTag> recommendedTags, final Post<? extends Resource> post) { log.debug("Getting tag recommendations for " + post); this.addRecommendedTagsInternal(recommendedTags, post); if (log.isDebugEnabled()) log.debug("Recommending tags " + recommendedTags); } protected abstract void addRecommendedTagsInternal(Collection<RecommendedTag> recommendedTags, Post<? extends Resource> post); @Override public void setFeedback(Post<? extends Resource> post) { log.debug("got post with id " + post.getContentId() + " as feedback."); this.setFeedbackInternal(post); } protected abstract void setFeedbackInternal(Post<? extends Resource> post); /** * @return The current value of cleanTags. Defaults to <code>false</code>. */ public boolean isCleanTags() { return this.cleanTags; } /** * Should the recommender return only tags cleaned according to * {@link TagStringUtils#cleanTag(String)} and removed according to * {@link TagStringUtils#isIgnoreTag(String)}? * The default is <code>false</code> * * @param cleanTags */ public void setCleanTags(boolean cleanTags) { this.cleanTags = cleanTags; } /** * Cleans the tag depending on the setting of {@link #cleanTags}. * If it is <code>false</code> (default), the tag is returned as is. * If it is <code>true</code>, the tag is cleaned according to {@link TagStringUtils#cleanTag(String)} * and checked agains {@link TagStringUtils#isIgnoreTag(String)}. * If it should be ignored, <code>null</code> is returned, else the * cleaned tag. * * This method should be used by all recommenders extending this class before * adding tags to the result set. * * @param tag * @return The tag - either cleaned or not, or <code>null</code> if it is * an ignore tag. */ protected String getCleanedTag(final String tag) { if (cleanTags) { final String cleanedTag = TagStringUtils.cleanTag(tag); if (TagStringUtils.isIgnoreTag(cleanedTag)) { return null; } return cleanedTag; } return tag; } }
[ "juanpablotec4@gmail.com" ]
juanpablotec4@gmail.com
ede65b11724d72dc31757f8f1800d84c23fd63f9
df1bd8592db706162c19e494e6b8dd49a39e558f
/Lecture 3 - Code Examples/src/lesson03/classes/CarDemo.java
4e3aa73592c872329acf8d28c7e5f02f9533b022
[]
no_license
georgepetrof/CourseAutomationPragmatic18
5f0c0b56aff3133b8a3de9a60646a18ff3241f57
a0078d60db733f49437ebc06da63bcf89f197bd7
refs/heads/master
2020-04-01T17:49:14.663601
2018-11-09T14:26:26
2018-11-09T14:26:26
153,452,785
0
0
null
null
null
null
UTF-8
Java
false
false
809
java
package lesson03.classes; public class CarDemo { public static void main(String[] args) { Car bmw = new Car(); Car golf; golf = new Car(); golf.model = "VW Golf 1"; golf.maxSpeed = 200; golf.color = "Blue"; golf.gear = 1; golf.currentSpeed = 0; Person nikola = new Person(); nikola.name = "Nikola Kamenov"; nikola.age = 23; golf.owner = nikola; Person ivan = new Person(); ivan.name = "Ivan"; golf.owner = ivan; System.out.println("The owner of the golf is " + golf.owner.name); // // // // System.out.println("Max speed of " + golf.model + " is " + golf.maxSpeed); // bmw.maxSpeed = 300; // // if (bmw.maxSpeed > golf.maxSpeed) { // System.out.println("The BMW is faster"); // } else { // System.out.println("The VW is faster"); // } } }
[ "you@example.com" ]
you@example.com
010ae1c742f8e5c76b4af8f3fb46c508435d1392
7c99fb61569e2d16115538ebcd8c0a120f68f088
/src/main/java/com/isaccanedo/servlets/WelcomeServlet.java
4118ad5a1768d88edff9816fd1ec91b7930d7436
[]
no_license
isaccanedo/intro-to-servlets
711ddaa3e190f7fa27211582c48ede740490ed2b
ef42c74e969825d54374dab63cd9e2a0e0e49079
refs/heads/master
2023-05-05T12:53:12.153723
2021-06-04T00:12:46
2021-06-04T00:12:46
373,674,474
0
0
null
null
null
null
UTF-8
Java
false
false
1,713
java
package com.isaccanedo.servlets; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Optional; /** * Created by adam. */ @WebServlet(name = "WelcomeServlet", urlPatterns = "/welcome") public class WelcomeServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { CookieReader cookieReader = new CookieReader(request); Optional<String> uiColor = cookieReader.readCookie("uiColor"); Optional<String> userName = cookieReader.readCookie("userName"); if (!userName.isPresent()) { response.sendRedirect("/login"); } else { request.setAttribute("uiColor", uiColor.orElse("blue")); request.setAttribute("userName", userName.get()); request.setAttribute("sessionAttribute", request.getSession() .getAttribute("sampleKey")); RequestDispatcher dispatcher = request.getRequestDispatcher("/WEB-INF/jsp/welcome.jsp"); dispatcher.forward(request, response); } } @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException { Cookie userNameCookieRemove = new Cookie("userName", ""); userNameCookieRemove.setMaxAge(0); response.addCookie(userNameCookieRemove); response.sendRedirect("/login"); } }
[ "isaccanedo@gmail.com" ]
isaccanedo@gmail.com
ea77495136bfcce285898f24f30d738febe9f4c2
35b38551822161c6cd70862f4f91547cd187855e
/src/com/vst/itv52/v1/activity/SettingAboutUs.java
a7d2a769e3292fba8a1ae88ba2865daebf2a5a78
[]
no_license
windygu/VSTV
8a26a79721235edbc41bf2ea73eefc61226892c1
5a33430ac873963eb90182ecde8cf41fcc0a8a3c
refs/heads/master
2021-05-28T18:02:14.265377
2014-03-17T03:00:41
2014-03-17T03:00:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,948
java
package com.vst.itv52.v1.activity; import com.vst.itv52.v1.R; import com.vst.itv52.v1.custom.UpdateDialog; import com.vst.itv52.v1.service.TaskService; import android.content.Intent; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.os.Bundle; import android.view.KeyEvent; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.TextView; public class SettingAboutUs extends BaseActivity implements OnClickListener { private TextView version; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.set_about); version = (TextView) findViewById(R.id.set_about_version); version.setText("版本号:" + getAPKVersionName()); Button update = (Button) findViewById(R.id.set_check_update); update.setOnClickListener(this); } private String getAPKVersionName() { PackageManager packageManager = this.getPackageManager(); PackageInfo packInfo = null; try { packInfo = packageManager.getPackageInfo(this.getPackageName(), 0); } catch (NameNotFoundException e) { e.printStackTrace(); } return packInfo.versionName; } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { this.finish(); overridePendingTransition(R.anim.zoomin, R.anim.zoomout); } return super.onKeyDown(keyCode, event); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.set_check_update: Intent service = new Intent(SettingAboutUs.this, TaskService.class); service.putExtra(TaskService.PARAM_IN_MSG, TaskService.PARAM_UPDATE_APK); SettingAboutUs.this.startService(service); new UpdateDialog(this).show(); break; } } }
[ "djun100@qq.com" ]
djun100@qq.com
41989e62d0e920da82bbc678f74deb4b4eed2887
b6e1b1aed4ba7cfe893909695ba93ac3f3c98efd
/GetAquote_Pricing Code - Copy/Slingshot/src/bg/framework/app/functional/entities/FunctionalCategory.java
20021755a16901f84c3f8c6f8f9fe8482a273456
[]
no_license
Syedbasha82/Automation
40908c0026fd486c371ccb7754c749d2d55f71f0
be0b278b78a5e1e0b8decde1b4e2b804435d068e
refs/heads/master
2021-04-03T06:29:45.484929
2018-03-16T06:02:15
2018-03-16T06:02:15
124,533,774
0
0
null
null
null
null
UTF-8
Java
false
false
4,140
java
package bg.framework.app.functional.entities; public class FunctionalCategory { public static final String Contactus = "Contactus"; public static final String ChangeEmailAddress = "ChangeEmailAddress"; public static final String ForgottenEmail = "ForgottenEmail"; public static final String ForgotEmail = "ForgotEmail"; public static final String ForgotPassword = "ForgotPassword"; public static final String ForgottenPassword = "ForgottenPassword"; public static final String Regression = "Regression"; public static final String Acquisition = "Acquisition"; public static final String PriceFinder = "PriceFinder"; public static final String GetaQuoteSS = "GetaQuoteSS"; public static final String AccountSummary = "AccountSummary"; public static final String SubmitMeterRead = "SubmitMeterRead"; public static final String BG = "BG"; public static final String Fusion = "Fusion"; public static final String RegresBGBMS = "RegresBGBMS"; public static final String BGRRegistration = "BGRRegistration"; public static final String Registration = "Registration"; public static final String InProgress = "InProgress"; public static final String Conversion = "Conversion"; public static final String GAP = "GAP"; public static final String InsuranceQuote = "InsuranceQuote"; public static final String HelpAndAdvice = "HelpAndAdvice"; public static final String Login = "Login"; public static final String GetAQuoteBadData = "GetAQuoteBadData"; public static final String ManagePersonalDetails = "ManagePersonalDetails"; public static final String Refactoring = "Refactoring"; public static final String SiteSearch = "SiteSearch"; public static final String GetAQuotePriceChanges = "GetAQuotePriceChanges"; public static final String Services ="Services"; public static final String Complex ="Complex"; public static final String Obsolete ="Obsolete"; public static final String Smoke ="Smoke"; public static final String Zeus ="Zeus"; public static final String Qtp ="Qtp"; public static final String EssCallBack ="EssCallBack"; public static final String AccountOverview ="AccountOverview"; public static final String PBFlag ="PBFlag"; public static final String HomeMove="HomeMove"; public static final String OpenMeterRead = "OpenMeterRead"; public static final String MakeAPayment ="MakeAPayment"; public static final String RequestPaymentCard ="RequestPaymentCard"; public static final String Nectar = "Nectar"; public static final String BillHistory="BillHistory"; public static final String OnHold="OnHold"; public static final String ASVIB = "ASVIB"; public static final String MessageCentre = "MessageCentre"; public static final String EmergenyPostCode = "EmergenyPostCode"; public static final String PaymentHistory ="PaymentHistory"; public static final String Ddcps ="Ddcps"; public static final String MeterBoxKey ="MeterBoxKey"; public static final String Upsell ="Upsell"; public static final String CHIAppointment ="CHIAppointment"; public static final String Saber = "Saber"; public static final String PredictNextBill = "PredictNextBill"; public static final String RefactoringSubmitMeterRead = "RefactoringSubmitMeterRead"; public static final String RefactoringMakeAPayment = "RefactoringMakeAPayment"; public static final String RefactoringBookAnAppointment = "RefactoringBookAnAppointment"; public static final String BetterDeal = "BetterDeal"; public static final String Slingshot = "Slingshot"; public static final String BGBRegistration = "BGBRegistration"; public static final String CsaAgent = "CsaAgent"; public static final String DirectDebit = "DirectDebit"; public static final String ViewBill = "ViewBill"; public static final String AuditTrial = "AuditTrial"; public static final String Tetris = "tetris"; public static final String RP3Smoke = "RP3Smoke"; public static final String Slingshot_Broker = "Slingshot_Broker"; public static final String TariffList = "TariffList"; }
[ "shobanbabu.manohar@cognizant.com" ]
shobanbabu.manohar@cognizant.com
8bef270a684c94b320e5c61886d825d9a25eaae6
4f886387a6c0c86b39d799c0270bfc8eabf11e8c
/JAVA/stsWorkspace/Chapter34/src/A01CurrentThreadName.java
8b60b9b36ca8dcf2d95809a4507d10bcab57f93d
[]
no_license
rumen-scholar/kosmo41_KimCheolEon
38d3cbdd7576784440c95b6291656e11eb20915e
3ea53334f6b8178c8f85c8bc5bf23d58429bb3a0
refs/heads/master
2020-03-21T04:41:23.634173
2018-12-20T09:19:06
2018-12-20T09:19:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
253
java
public class A01CurrentThreadName { public static void main(String[] args) { // TODO Auto-generated method stub Thread ct = Thread.currentThread(); String name = ct.getName(); //쓰레드의 이름을 반환 System.out.println(name); } }
[ "kchy12345@gmail.com" ]
kchy12345@gmail.com
78799af2cdcc764eda197f07728c4fd7219ef099
d66be5471ac454345de8f118ab3aa3fe55c0e1ee
/providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageBlobSignerLiveTest.java
5859814454919bdb3d54349d5fc3440af85aea0d
[ "Apache-2.0" ]
permissive
adiantum/jclouds
3405b8daf75b8b45e95a24ff64fda6dc3eca9ed6
1cfbdf00f37fddf04249feedd6fc18ee122bdb72
refs/heads/master
2021-01-18T06:02:46.877904
2011-04-05T07:14:18
2011-04-05T07:14:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,113
java
/** * * Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com> * * ==================================================================== * 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.jclouds.googlestorage.blobstore; import org.jclouds.s3.blobstore.integration.S3BlobSignerLiveTest; import org.testng.annotations.Test; /** * * @author Adrian Cole */ @Test(groups = "live", testName = "GoogleStorageBlobSignerLiveTest") public class GoogleStorageBlobSignerLiveTest extends S3BlobSignerLiveTest { }
[ "adrian@jclouds.org" ]
adrian@jclouds.org
f5262f8e9482783510f0ec6646ed85ec5deeb28c
4e516583021b884f45c1763698d38996fed326f6
/pcgen/code/src/java/pcgen/persistence/lst/output/prereq/PrerequisiteDeityAlignWriter.java
172b03d0435d6e16e214e4e2c27fc1a080363cba
[]
no_license
Manichee/pcgen
d993d04e75a8398b8cb9d577a717698a5ae8e3e9
5fb3937e5e196d2c0b244e9b4dacab2aecca381f
refs/heads/master
2020-04-09T01:55:53.634379
2016-04-11T03:41:50
2016-04-11T03:41:50
23,060,834
0
0
null
2014-08-18T22:37:19
2014-08-18T06:20:19
Java
UTF-8
Java
false
false
2,363
java
/* * PrerequisiteDeityAlign.java * * Copyright 2004 (C) Frugal <frugal@purplewombat.co.uk> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Created on 18-Dec-2003 * * Current Ver: $Revision: 1.3 $ * * Last Editor: $Author: binkley $ * * Last Edited: $Date: 2005/10/18 20:23:56 $ * */ package pcgen.persistence.lst.output.prereq; import pcgen.core.prereq.Prerequisite; import pcgen.core.prereq.PrerequisiteOperator; import pcgen.persistence.PersistenceLayerException; import java.io.IOException; import java.io.Writer; public class PrerequisiteDeityAlignWriter extends AbstractPrerequisiteWriter implements PrerequisiteWriterInterface { /* (non-Javadoc) * @see pcgen.persistence.lst.output.prereq.PrerequisiteWriterInterface#kindHandled() */ public String kindHandled() { return "deityalign"; } /* (non-Javadoc) * @see pcgen.persistence.lst.output.prereq.PrerequisiteWriterInterface#operatorsHandled() */ public PrerequisiteOperator[] operatorsHandled() { return new PrerequisiteOperator[] { PrerequisiteOperator.EQ, PrerequisiteOperator.NEQ } ; } /* (non-Javadoc) * @see pcgen.persistence.lst.output.prereq.PrerequisiteWriterInterface#write(java.io.Writer, pcgen.core.prereq.Prerequisite) */ public void write(Writer writer, Prerequisite prereq) throws PersistenceLayerException { checkValidOperator(prereq, operatorsHandled()); try { if (prereq.getOperator().equals(PrerequisiteOperator.NEQ)) { writer.write('!'); } writer.write("PREDEITYALIGN:"); writer.write(prereq.getOperand()); } catch (IOException e) { throw new PersistenceLayerException(e.getMessage()); } } }
[ "tladdjr@gmail.com" ]
tladdjr@gmail.com
1577d6b2bf265c1d22768df429e6b4707188969a
ab3eccd0be02fb3ad95b02d5b11687050a147bce
/apis/browser-api/src/main/java/fr/lteconsulting/jsinterop/browser/UnionOfBooleanAndConstrainBooleanParameters.java
87a4dc1fb46bd919395d08fe71767767d1915115
[]
no_license
ibaca/typescript2java
263fd104a9792e7be2a20ab95b016ad694a054fe
0b71b8a3a4c43df1562881f0816509ca4dafbd7e
refs/heads/master
2021-04-27T10:43:14.101736
2018-02-23T11:37:16
2018-02-23T11:37:18
122,543,398
0
0
null
2018-02-22T22:33:30
2018-02-22T22:33:29
null
UTF-8
Java
false
false
892
java
package fr.lteconsulting.jsinterop.browser; import jsinterop.annotations.JsOverlay; import jsinterop.annotations.JsPackage; import jsinterop.annotations.JsType; import jsinterop.base.Js; /** * Union adapter * */ @JsType(isNative=true, namespace=JsPackage.GLOBAL, name="?") public interface UnionOfBooleanAndConstrainBooleanParameters { @JsOverlay default Boolean asBoolean() { return Js.cast( this ); } @JsOverlay static UnionOfBooleanAndConstrainBooleanParameters ofBoolean(Boolean value) { return Js.cast( value ); } @JsOverlay default ConstrainBooleanParameters asConstrainBooleanParameters() { return Js.cast( this ); } @JsOverlay static UnionOfBooleanAndConstrainBooleanParameters ofConstrainBooleanParameters(ConstrainBooleanParameters value) { return Js.cast( value ); } }
[ "ltearno@gmail.com" ]
ltearno@gmail.com
05da5fea65adb8225f69631f1e0385961e737f8d
71f6a93e3b2edd8b5103f95d07733c255ae43bcf
/src/test/java/com/github/jamesnetherton/lolcat4j/internal/console/ConsolePainterTest.java
146c10b1e1d36fcb4a60ddef74ddaabf51ec4054
[ "MIT" ]
permissive
jamesnetherton/lolcat4j
2804e9755fbdd84cbdb7217aaaec6c12d0aea9a5
16f2643c60060c92e15824c6f0f23963f3ba1331
refs/heads/master
2023-08-04T18:01:12.000728
2023-07-29T07:39:30
2023-07-29T07:39:30
50,685,470
2
0
MIT
2023-07-04T12:38:11
2016-01-29T19:20:23
Java
UTF-8
Java
false
false
4,930
java
/* * #%L * lolcat4j * %% * Copyright (C) 2016 James Netherton * %% * 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. * #L% */ package com.github.jamesnetherton.lolcat4j.internal.console; import com.github.jamesnetherton.lolcat4j.Lol; import com.github.jamesnetherton.lolcat4j.internal.console.utils.LoggingPrintStream; import com.github.jamesnetherton.lolcat4j.internal.console.utils.NonWritableOutputStream; import org.junit.jupiter.api.Test; import java.io.PrintStream; import java.net.URI; import java.nio.file.Files; import java.nio.file.Paths; import static org.junit.jupiter.api.Assertions.assertEquals; public class ConsolePainterTest { private static final String LOL_TXT = "lol.txt"; private static final String LOL_ANSI_TXT = "lolAnsi.txt"; private static final String LOL_TABS_TXT = "lolTabs.txt"; @Test public void testNonAnimatedOutput() throws Exception { LoggingPrintStream printStream = new LoggingPrintStream(new NonWritableOutputStream()); String fileContent = readFile(LOL_TXT); String expectedResult = readFile("nonAnimatedExpected.txt"); Lol lol = Lol.builder() .seed(1) .frequency(3.0) .spread(3.0) .text(fileContent) .build(); ConsolePainter consolePainter = createPainter(printStream, lol); consolePainter.paint(lol); assertEquals(expectedResult, printStream.getLoggedOutput()); } @Test public void testAnimatedOutput() throws Exception { LoggingPrintStream printStream = new LoggingPrintStream(new NonWritableOutputStream()); String fileContent = readFile(LOL_TXT); String expectedResult = readFile("animatedExpected.txt"); Lol lol = Lol.builder() .animate() .duration(2) .speed(200.0) .seed(1) .frequency(3.0) .spread(3.0) .text(fileContent) .build(); ConsolePainter consolePainter = createPainter(printStream, lol); consolePainter.paint(lol); assertEquals(expectedResult, printStream.getLoggedOutput()); } @Test public void testStripAnsi() throws Exception { LoggingPrintStream printStream = new LoggingPrintStream(new NonWritableOutputStream()); String fileContent = readFile(LOL_ANSI_TXT); String expectedResult = readFile("nonAnimatedExpected.txt"); Lol lol = Lol.builder() .seed(1) .frequency(3.0) .spread(3.0) .text(fileContent) .build(); ConsolePainter consolePainter = createPainter(printStream, lol); consolePainter.paint(lol); assertEquals(expectedResult, printStream.getLoggedOutput()); } @Test public void testStripTabs() throws Exception { LoggingPrintStream printStream = new LoggingPrintStream(new NonWritableOutputStream()); String fileContent = readFile(LOL_TABS_TXT); String expectedResult = readFile("nonAnimatedReplacedTabsExpected.txt"); Lol lol = Lol.builder() .seed(1) .frequency(3.0) .spread(3.0) .text(fileContent) .build(); ConsolePainter consolePainter = createPainter(printStream, lol); consolePainter.paint(lol); assertEquals(expectedResult, printStream.getLoggedOutput()); } private ConsolePainter createPainter(PrintStream printStream, Lol lol) { ConsolePrinter printer = new ConsolePrinter(printStream); if (lol.isAnimate()) { return new AnimatedConsolePainter(printer); } return new ConsolePainter(printer); } private String readFile(String fileName) throws Exception { URI uri = getClass().getResource(fileName).toURI(); return new String(Files.readAllBytes(Paths.get(uri))); } }
[ "jamesnetherton@gmail.com" ]
jamesnetherton@gmail.com
193ab4f8bc84e2404e63a0d66c36ddef4b1f9b85
2181dd498f49d1885ed455b2a32e95c3ab269042
/BehaviouralPatterns/src/com/training/visitor/example2/BookCart.java
121af164ecd2ebc2cfc10a99c03752a62cfb6118
[]
no_license
vatsank/JavaDesignPatterns
353c129f95ba2c25ad66270338c580b1c384e1b4
1599ce091e32da0bb67423a4ff70fde0f8a16194
refs/heads/master
2020-04-13T08:52:40.050157
2018-12-27T11:46:46
2018-12-27T11:46:46
163,094,787
0
1
null
null
null
null
UTF-8
Java
false
false
375
java
package com.training.visitor.example2; public class BookCart implements MyVisitable{ Integer bookList[] = {245,526,768,112,130}; public Integer[] getBookList() { return bookList; } public void setBookList(Integer[] bookList) { this.bookList = bookList; } @Override public void accept(MyVisitor visitor) { visitor.visit(this); } }
[ "'vatsank@gmail.com'" ]
'vatsank@gmail.com'
ebda0fc601bb9fc73060cceea73c0012ef7ce8bb
377e5e05fb9c6c8ed90ad9980565c00605f2542b
/bin/platform/bootstrap/gensrc/de/hybris/platform/processengine/model/DynamicProcessDefinitionModel.java
7fb0f50dfd95c57b019220c521631bc24c83024b
[]
no_license
automaticinfotech/HybrisProject
c22b13db7863e1e80ccc29774f43e5c32e41e519
fc12e2890c569e45b97974d2f20a8cbe92b6d97f
refs/heads/master
2021-07-20T18:41:04.727081
2017-10-30T13:24:11
2017-10-30T13:24:11
108,957,448
0
0
null
null
null
null
UTF-8
Java
false
false
2,902
java
/* * ---------------------------------------------------------------- * --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! --- * --- Generated at 30 Oct, 2017 12:11:59 PM --- * ---------------------------------------------------------------- * * [y] hybris Platform * * Copyright (c) 2000-2016 SAP SE * All rights reserved. * * This software is the confidential and proprietary information of SAP * Hybris ("Confidential Information"). You shall not disclose such * Confidential Information and shall use it only in accordance with the * terms of the license agreement you entered into with SAP Hybris. * */ package de.hybris.platform.processengine.model; import de.hybris.platform.core.model.AbstractDynamicContentModel; import de.hybris.platform.core.model.ItemModel; import de.hybris.platform.servicelayer.model.ItemModelContext; /** * Generated model class for type DynamicProcessDefinition first defined at extension processing. */ @SuppressWarnings("all") public class DynamicProcessDefinitionModel extends AbstractDynamicContentModel { /**<i>Generated model type code constant.</i>*/ public final static String _TYPECODE = "DynamicProcessDefinition"; /** * <i>Generated constructor</i> - Default constructor for generic creation. */ public DynamicProcessDefinitionModel() { super(); } /** * <i>Generated constructor</i> - Default constructor for creation with existing context * @param ctx the model context to be injected, must not be null */ public DynamicProcessDefinitionModel(final ItemModelContext ctx) { super(ctx); } /** * <i>Generated constructor</i> - Constructor with all mandatory attributes. * @deprecated Since 4.1.1 Please use the default constructor without parameters * @param _code initial attribute declared by type <code>AbstractDynamicContent</code> at extension <code>core</code> * @param _content initial attribute declared by type <code>AbstractDynamicContent</code> at extension <code>core</code> */ @Deprecated public DynamicProcessDefinitionModel(final String _code, final String _content) { super(); setCode(_code); setContent(_content); } /** * <i>Generated constructor</i> - for all mandatory and initial attributes. * @deprecated Since 4.1.1 Please use the default constructor without parameters * @param _code initial attribute declared by type <code>AbstractDynamicContent</code> at extension <code>core</code> * @param _content initial attribute declared by type <code>AbstractDynamicContent</code> at extension <code>core</code> * @param _owner initial attribute declared by type <code>Item</code> at extension <code>core</code> */ @Deprecated public DynamicProcessDefinitionModel(final String _code, final String _content, final ItemModel _owner) { super(); setCode(_code); setContent(_content); setOwner(_owner); } }
[ "santosh.kshirsagar@automaticinfotech.com" ]
santosh.kshirsagar@automaticinfotech.com
eaca65204089a18c7f53fc1bd119fc3b5cfa4c92
3f29e3da9b73acc14ebcec329517a3303ceaa7c6
/tomcat_files/7.0.0/Server.java
e96ea6de7c8913a0d7470fb1357bbe5716a4dd35
[ "Apache-2.0", "MIT" ]
permissive
plumer/codana
c4ec3057096b64c5956b8484a4e41729895304fc
8c9e95614265005ae4e49527eed24d6a8bbdd5fc
refs/heads/master
2021-01-20T06:59:45.350722
2015-05-27T10:12:14
2015-05-27T10:12:14
33,281,148
1
0
null
null
null
null
UTF-8
Java
false
false
4,509
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.catalina; import org.apache.catalina.deploy.NamingResources; /** * A <code>Server</code> element represents the entire Catalina * servlet container. Its attributes represent the characteristics of * the servlet container as a whole. A <code>Server</code> may contain * one or more <code>Services</code>, and the top level set of naming * resources. * <p> * Normally, an implementation of this interface will also implement * <code>Lifecycle</code>, such that when the <code>start()</code> and * <code>stop()</code> methods are called, all of the defined * <code>Services</code> are also started or stopped. * <p> * In between, the implementation must open a server socket on the port number * specified by the <code>port</code> property. When a connection is accepted, * the first line is read and compared with the specified shutdown command. * If the command matches, shutdown of the server is initiated. * <p> * <strong>NOTE</strong> - The concrete implementation of this class should * register the (singleton) instance with the <code>ServerFactory</code> * class in its constructor(s). * * @author Craig R. McClanahan * @version $Id: Server.java 940008 2010-05-01 13:31:46Z markt $ */ public interface Server extends Lifecycle { // ------------------------------------------------------------- Properties /** * Return descriptive information about this Server implementation and * the corresponding version number, in the format * <code>&lt;description&gt;/&lt;version&gt;</code>. */ public String getInfo(); /** * Return the global naming resources. */ public NamingResources getGlobalNamingResources(); /** * Set the global naming resources. * * @param globalNamingResources The new global naming resources */ public void setGlobalNamingResources (NamingResources globalNamingResources); /** * Return the port number we listen to for shutdown commands. */ public int getPort(); /** * Set the port number we listen to for shutdown commands. * * @param port The new port number */ public void setPort(int port); /** * Return the address on which we listen to for shutdown commands. */ public String getAddress(); /** * Set the address on which we listen to for shutdown commands. * * @param address The new address */ public void setAddress(String address); /** * Return the shutdown command string we are waiting for. */ public String getShutdown(); /** * Set the shutdown command we are waiting for. * * @param shutdown The new shutdown command */ public void setShutdown(String shutdown); // --------------------------------------------------------- Public Methods /** * Add a new Service to the set of defined Services. * * @param service The Service to be added */ public void addService(Service service); /** * Wait until a proper shutdown command is received, then return. */ public void await(); /** * Return the specified Service (if it exists); otherwise return * <code>null</code>. * * @param name Name of the Service to be returned */ public Service findService(String name); /** * Return the set of Services defined within this Server. */ public Service[] findServices(); /** * Remove the specified Service from the set associated from this * Server. * * @param service The Service to be removed */ public void removeService(Service service); }
[ "liukunaa22@126.com" ]
liukunaa22@126.com
8f895616b64a67d2200dec596546b4a68493a586
1ca86d5d065372093c5f2eae3b1a146dc0ba4725
/spring-security-modules/spring-5-security/src/main/java/com/surya/manuallogout/SimpleSecurityConfiguration.java
69806fbf425ac9050a99b1131b56c01582c1ecce
[]
no_license
Suryakanta97/DemoExample
1e05d7f13a9bc30f581a69ce811fc4c6c97f2a6e
5c6b831948e612bdc2d9d578a581df964ef89bfb
refs/heads/main
2023-08-10T17:30:32.397265
2021-09-22T16:18:42
2021-09-22T16:18:42
391,087,435
0
1
null
null
null
null
UTF-8
Java
false
false
3,123
java
package com.surya.manuallogout; import org.springframework.context.annotation.Configuration; import org.springframework.core.annotation.Order; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.web.authentication.logout.HeaderWriterLogoutHandler; import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler; import org.springframework.security.web.header.writers.ClearSiteDataHeaderWriter; import javax.servlet.http.Cookie; import static org.springframework.security.web.header.writers.ClearSiteDataHeaderWriter.Directive.*; @Configuration @EnableWebSecurity public class SimpleSecurityConfiguration { @Order(3) @Configuration public static class DefaultLogoutConfiguration extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity http) throws Exception { http .antMatcher("/basic/**") .authorizeRequests(authz -> authz.anyRequest().permitAll()) .logout(logout -> logout .logoutUrl("/basic/basiclogout") ); } } @Order(2) @Configuration public static class AllCookieClearingLogoutConfiguration extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity http) throws Exception { http .antMatcher("/cookies/**") .authorizeRequests(authz -> authz.anyRequest().permitAll()) .logout(logout -> logout .logoutUrl("/cookies/cookielogout") .addLogoutHandler(new SecurityContextLogoutHandler()) .addLogoutHandler((request, response, auth) -> { for (Cookie cookie : request.getCookies()) { String cookieName = cookie.getName(); Cookie cookieToDelete = new Cookie(cookieName, null); cookieToDelete.setMaxAge(0); response.addCookie(cookieToDelete); } }) ); } } @Order(1) @Configuration public static class ClearSiteDataHeaderLogoutConfiguration extends WebSecurityConfigurerAdapter { private static final ClearSiteDataHeaderWriter.Directive[] SOURCE = {CACHE, COOKIES, STORAGE, EXECUTION_CONTEXTS}; @Override protected void configure(HttpSecurity http) throws Exception { http .antMatcher("/csd/**") .authorizeRequests(authz -> authz.anyRequest().permitAll()) .logout(logout -> logout .logoutUrl("/csd/csdlogout") .addLogoutHandler(new HeaderWriterLogoutHandler(new ClearSiteDataHeaderWriter(SOURCE))) ); } } }
[ "suryakanta97@github.com" ]
suryakanta97@github.com
1c75a22070991d87bf6fda245071325e06750e68
2bf30c31677494a379831352befde4a5e3d8ed19
/controllersvc/src/main/java/com/emc/storageos/vcentercontroller/exceptions/VcenterControllerExceptions.java
cb23da4afc13f98394468658253e48a902a347c8
[]
no_license
dennywangdengyu/coprhd-controller
fed783054a4970c5f891e83d696a4e1e8364c424
116c905ae2728131e19631844eecf49566e46db9
refs/heads/master
2020-12-30T22:43:41.462865
2015-07-23T18:09:30
2015-07-23T18:09:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,374
java
/* * Copyright 2015 EMC Corporation * All Rights Reserved */ package com.emc.storageos.vcentercontroller.exceptions; import com.emc.storageos.svcs.errorhandling.annotations.DeclareServiceCode; import com.emc.storageos.svcs.errorhandling.annotations.MessageBundle; import com.emc.storageos.svcs.errorhandling.resources.ServiceCode; @MessageBundle public interface VcenterControllerExceptions { @DeclareServiceCode(ServiceCode.VCENTER_CONTROLLER_ERROR) public VcenterControllerException clusterException(final String details, final Throwable e); @DeclareServiceCode(ServiceCode.VCENTER_CONTROLLER_ERROR) public VcenterControllerException hostException(final String details, final Throwable e); @DeclareServiceCode(ServiceCode.VCENTER_CONTROLLER_ERROR) public VcenterControllerException unexpectedException(final String opName, final Throwable e); @DeclareServiceCode(ServiceCode.VCENTER_CONTROLLER_ERROR) public VcenterControllerException objectNotFoundException(final String opName, final Throwable e); @DeclareServiceCode(ServiceCode.VCENTER_CONTROLLER_ERROR) public VcenterControllerException objectConnectionException(final String opName, final Throwable e); @DeclareServiceCode(ServiceCode.VCENTER_CONTROLLER_ERROR) public VcenterControllerException serverConnectionException(final String opName, final Throwable e); }
[ "review-coprhd@coprhd.org" ]
review-coprhd@coprhd.org
484230b59247ad099d6c0b1b3daec9f3c39937d3
20d7a12575ffa0b3b3095a83a16f6c0b6a02e133
/src/main/java/cn/gtmap/estateplat/server/core/service/BdcZsQlrRelService.java
718d168fdbd9dee90f9be40143b02abab8a1f0db
[]
no_license
MrLiJun88/estateplat-service
937e52cb81951e411a0bc4c8317d93a3455227f8
0ba27a9251ce2cd712efe76f8cbe0b769b970cc9
refs/heads/master
2022-12-07T13:32:32.727808
2020-08-13T04:07:12
2020-08-13T04:07:12
287,170,568
0
0
null
null
null
null
UTF-8
Java
false
false
2,918
java
package cn.gtmap.estateplat.server.core.service; import cn.gtmap.estateplat.model.server.core.BdcQlr; import cn.gtmap.estateplat.model.server.core.BdcXm; import cn.gtmap.estateplat.model.server.core.BdcZs; import cn.gtmap.estateplat.model.server.core.BdcZsQlrRel; import java.util.List; /** * * @author <a href="mailto:zhaodongdong@gtmap.cn">zdd</a> * @version V1.0, 15-3-23 * @description 不动产登记证书权利人关系服务 */ public interface BdcZsQlrRelService { /** * zdd 根据权利人ID 查找关系表 * * @param qlrid * @return */ List<BdcZsQlrRel> queryBdcZsQlrRelByQlrid(final String qlrid); /** * zdd 删除权利人证书关系表根据权利人ID * * @param qlrid */ void delBdcZsQlrRelByQlrid(final String qlrid); /** * zx 删除证书和权利人证书关系表根据权利人ID * * @param qlrid */ void delBdcZsAndZsQlrRelByQlrid(final String qlrid); /** * zx 删除证书和权利人证书关系表根据证书ID * @param zsid */ void delZsQlrRelByZsid(final String zsid); /** * zdd 根据项目信息、证书信息、权利人信息生成权利人证书关系表 * @param bdcXm 是否分别持证信息判读 * @param bdcZsList * @param bdcQlrList * @return */ public List<BdcZsQlrRel> creatBdcZsQlrRel(BdcXm bdcXm,List<BdcZs> bdcZsList,List<BdcQlr> bdcQlrList); /** * 通过proid查询当前项目证书权利人关系 * @param proid * @return */ public List<BdcZsQlrRel> queryBdcZsQlrRelByProid(final String proid); /** * @param * @author <a href="mailto:juyulin@gtmap.cn">juyulin</a> * @rerutn * @description 根据证书信息、权利人信息、共有人信息生成权利人证书关系表(任意流程) */ public List<BdcZsQlrRel> creatBdcZsQlrRelArbitrary(BdcZs bdcZs,BdcQlr bdcQlr,List<BdcQlr> gyrList); /** * 交叉共有,多个权利人中只有一个持证人,为其他权利人生成权利人证书关系表 * @param bdcZs * @param czrList * @param qlrList * @return */ public List<BdcZsQlrRel> creatBdcZsQlrRelForOtherQlrExceptCzr(BdcZs bdcZs,List<BdcQlr> czrList,List<BdcQlr> qlrList,BdcXm bdcXm); /** * @param bdcZsList * @author <a href="mailto:liujie@gtmap.cn">liujie</a> * @rerutn * @description 根据bdcZsList批量删除证书权利人关系表 */ void batchDelBdcZsQlrRelByBdcZsList(List<BdcZs> bdcZsList); /** * @param bdcQlrList * @author <a href="mailto:liujie@gtmap.cn">liujie</a> * @rerutn * @description 根据bdcQlrList批量删除证书权利人关系表 */ void batchDelBdcZsQlrRelByBdcQlrList(List<BdcQlr> bdcQlrList); }
[ "1424146780@qq.com" ]
1424146780@qq.com
a567af96b458ae16efce1bda2ad860114b5bd524
5e0a70caf18c913b246cbfbfc390cd9cbc74d66d
/gs-assistant-web/src/main/java/com/fbee/modules/mybatis/entity/CtlParamsEntity.java
93127147a6d6789b038fd9617d8f46859f4632b4
[]
no_license
lzcrwxl/gs-assistant
7c42fa0d5c139750993c76086ea813350799322e
41a20bfee84101564559b8f6619e6a1bd534ff49
refs/heads/master
2021-09-07T23:06:10.776268
2018-01-24T01:53:58
2018-01-24T01:53:58
118,696,129
0
1
null
null
null
null
UTF-8
Java
false
false
196
java
package com.fbee.modules.mybatis.entity; import com.fbee.modules.mybatis.model.CtlParams; public class CtlParamsEntity extends CtlParams{ private static final long serialVersionUID = 1L; }
[ "lzcrwxl@163.com" ]
lzcrwxl@163.com
8773f239436cdf21dca1d461592d402565f9b1a3
96602275a8a9fdd18552df60d3b4ae4fa21034e9
/arquillian/RESTEASY-TEST-WF8/src/main/java/org/jboss/resteasy/resteasy923/SessionResourceRemote.java
068623215ab4cf1edc2740b345dc8f2a4951534b
[ "Apache-2.0" ]
permissive
tedwon/Resteasy
03bb419dc9f74ea406dc1ea29d8a6b948b2228a8
38badcb8c2daae2a77cea9e7d70a550449550c49
refs/heads/master
2023-01-18T22:03:43.256889
2016-06-29T15:37:45
2016-06-29T15:37:45
62,353,131
0
0
NOASSERTION
2023-01-02T22:02:20
2016-07-01T01:29:16
Java
UTF-8
Java
false
false
311
java
package org.jboss.resteasy.resteasy923; import javax.ejb.Remote; import javax.ws.rs.Path; /** * * @author <a href="ron.sigal@jboss.com">Ron Sigal</a> * @version $Revision: 1.1 $ * * Copyright Mar 26, 2014 */ @Remote @Path("test") public interface SessionResourceRemote extends SessionResourceParent { }
[ "rsigal@redhat.com" ]
rsigal@redhat.com
8b1565f74ae3a4ba1c34b3902795cded513a8ce6
eb3ad750a23be626d4190eeb48d1047cb8e32c3e
/BWCommon/src/main/java/com/nvarghese/beowulf/common/cobra/js/ScriptableDelegate.java
d9cf8f420c0a0a824fb253012be373b90f6c0ec2
[]
no_license
00mjk/beowulf-1
1ad29e79e2caee0c76a8b0bd5e15c24c22017d56
d28d7dfd6b9080130540fc7427bfe7ad01209ade
refs/heads/master
2021-05-26T23:07:39.561391
2013-01-23T03:09:44
2013-01-23T03:09:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,366
java
/* * GNU LESSER GENERAL PUBLIC LICENSE Copyright (C) 2006 The Lobo Project * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software Foundation, Inc., * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * Contact info: lobochief@users.sourceforge.net */ package com.nvarghese.beowulf.common.cobra.js; import org.mozilla.javascript.Scriptable; /** * Java classes used in Javascript should implement this interface. While all * classes can be mapped to JavaScript, implementing this interface ensures that * the Java object proxy is not garbage collected as long as the Java object is * not garbage collected. */ public interface ScriptableDelegate { public void setScriptable(Scriptable scriptable); public Scriptable getScriptable(); }
[ "nibin012@gmail.com" ]
nibin012@gmail.com
acfd234d122fffc46cb80146704e12ca76b3f77e
89e104c8ca4c4ae91f4e1970c4997cf45ae1d8af
/core/src/main/java/com/alibaba/alink/operator/stream/utils/MapStreamOp.java
66aea0090647dc5293151800c896d612cebc11db
[ "Apache-2.0" ]
permissive
robotoil/Alink
6026bfdff9c3ff02baa18d8fb18f76caf68fe067
e9675e1736e89d4f16c5691eddd1346c0c730d2b
refs/heads/master
2021-12-14T02:26:13.449897
2021-11-27T18:59:13
2021-11-27T18:59:13
225,504,970
0
0
Apache-2.0
2019-12-03T01:39:27
2019-12-03T01:39:26
null
UTF-8
Java
false
false
1,310
java
package com.alibaba.alink.operator.stream.utils; import org.apache.flink.ml.api.misc.param.Params; import org.apache.flink.streaming.api.datastream.DataStream; import org.apache.flink.table.api.TableSchema; import org.apache.flink.types.Row; import com.alibaba.alink.common.mapper.Mapper; import com.alibaba.alink.common.mapper.MapperAdapter; import com.alibaba.alink.operator.stream.StreamOperator; import java.util.function.BiFunction; /** * class for a flat map {@link StreamOperator}. * * @param <T> class type of the {@link MapStreamOp} implementation itself. */ public class MapStreamOp<T extends MapStreamOp<T>> extends StreamOperator<T> { private final BiFunction<TableSchema, Params, Mapper> mapperBuilder; public MapStreamOp(BiFunction<TableSchema, Params, Mapper> mapperBuilder, Params params) { super(params); this.mapperBuilder = mapperBuilder; } @Override public T linkFrom(StreamOperator<?>... inputs) { StreamOperator<?> in = checkAndGetFirst(inputs); try { Mapper mapper = this.mapperBuilder.apply(in.getSchema(), this.getParams()); DataStream<Row> resultRows = in.getDataStream().map(new MapperAdapter(mapper)); this.setOutput(resultRows, mapper.getOutputSchema()); return (T) this; } catch (Exception ex) { throw new RuntimeException(ex); } } }
[ "xuyang1706@gmail.com" ]
xuyang1706@gmail.com
fad9bd9ffd9d40fe90e8e09c88abfdc5674c32c4
8cb955b7dec248679ec64b82f4c7df5812b8531b
/lib/tomahawk12-1.1.14/src/org/apache/myfaces/shared_tomahawk/taglib/html/HtmlInputSecretTagBase.java
13b423bbf2ee8ade9e1b51828fae4b5c88e4da97
[]
no_license
vtomic85/TCMS
dedf989a417616340308f1071c116251ac43e953
20aff23c5510e54c7e0abff19eaf84a777701380
refs/heads/master
2022-12-05T11:34:09.255605
2021-02-12T13:34:44
2021-02-12T13:34:44
36,179,350
0
0
null
null
null
null
UTF-8
Java
false
false
5,723
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.myfaces.shared_tomahawk.taglib.html; import org.apache.myfaces.shared_tomahawk.renderkit.html.HTML; import javax.faces.component.UIComponent; /** * @author Manfred Geiler (latest modification by $Author: cagatay $) * @author Martin Marinschek * @version $Revision: 606793 $ $Date: 2007-12-25 10:20:46 -0500 (Tue, 25 Dec 2007) $ * @deprecated use {@link HtmlInputSecretELTagBase} instead */ public abstract class HtmlInputSecretTagBase extends HtmlInputTagBase { // UIComponent attributes --> already implemented in UIComponentTagBase // user role attributes --> already implemented in UIComponentTagBase // HTML universal attributes --> already implemented in HtmlComponentTagBase // HTML event handler attributes --> already implemented in HtmlComponentTagBase // HTML input attributes relevant for password-input private String _accesskey; private String _align; private String _alt; private String _datafld; private String _datasrc; private String _dataformatas; private String _disabled; private String _maxlength; private String _onblur; private String _onchange; private String _onfocus; private String _onselect; private String _readonly; private String _size; private String _tabindex; // UIOutput attributes // value and converterId --> already implemented in UIComponentTagBase // UIInput attributes // --> already implemented in HtmlInputTagBase // HTMLInputSecret attributes private String _redisplay; public void release() { super.release(); _accesskey=null; _align=null; _alt=null; _datafld=null; _datasrc=null; _dataformatas=null; _disabled=null; _maxlength=null; _onblur=null; _onchange=null; _onfocus=null; _onselect=null; _readonly=null; _size=null; _tabindex=null; _redisplay=null; } protected void setProperties(UIComponent component) { super.setProperties(component); setStringProperty(component, org.apache.myfaces.shared_tomahawk.renderkit.html.HTML.ACCESSKEY_ATTR, _accesskey); setStringProperty(component, org.apache.myfaces.shared_tomahawk.renderkit.html.HTML.ALIGN_ATTR, _align); setStringProperty(component, org.apache.myfaces.shared_tomahawk.renderkit.html.HTML.ALT_ATTR, _alt); setBooleanProperty(component, org.apache.myfaces.shared_tomahawk.renderkit.html.HTML.DISABLED_ATTR, _disabled); setIntegerProperty(component, org.apache.myfaces.shared_tomahawk.renderkit.html.HTML.MAXLENGTH_ATTR, _maxlength); setStringProperty(component, HTML.ONBLUR_ATTR, _onblur); setStringProperty(component, org.apache.myfaces.shared_tomahawk.renderkit.html.HTML.ONCHANGE_ATTR, _onchange); setStringProperty(component, org.apache.myfaces.shared_tomahawk.renderkit.html.HTML.ONFOCUS_ATTR, _onfocus); setStringProperty(component, org.apache.myfaces.shared_tomahawk.renderkit.html.HTML.ONSELECT_ATTR, _onselect); setBooleanProperty(component, org.apache.myfaces.shared_tomahawk.renderkit.html.HTML.READONLY_ATTR, _readonly); setIntegerProperty(component, HTML.SIZE_ATTR, _size); setStringProperty(component, org.apache.myfaces.shared_tomahawk.renderkit.html.HTML.TABINDEX_ATTR, _tabindex); setBooleanProperty(component, org.apache.myfaces.shared_tomahawk.renderkit.JSFAttr.REDISPLAY_ATTR, _redisplay); } public void setAccesskey(String accesskey) { _accesskey = accesskey; } public void setAlign(String align) { _align = align; } public void setAlt(String alt) { _alt = alt; } public void setDatafld(String datafld) { _datafld = datafld; } public void setDatasrc(String datasrc) { _datasrc = datasrc; } public void setDataformatas(String dataformatas) { _dataformatas = dataformatas; } public void setDisabled(String disabled) { _disabled = disabled; } public void setMaxlength(String maxlength) { _maxlength = maxlength; } public void setOnblur(String onblur) { _onblur = onblur; } public void setOnchange(String onchange) { _onchange = onchange; } public void setOnfocus(String onfocus) { _onfocus = onfocus; } public void setOnselect(String onselect) { _onselect = onselect; } public void setReadonly(String readonly) { _readonly = readonly; } public void setSize(String size) { _size = size; } public void setTabindex(String tabindex) { _tabindex = tabindex; } public void setRedisplay(String redisplay) { _redisplay = redisplay; } }
[ "vladimir.tomic.la@gmail.com" ]
vladimir.tomic.la@gmail.com